--- id: simpy version: "4.1.2" license: MIT license_treatment: permissive maintenance: active --- # simpy — Event discrete, process based simulation for Python. License: permissive · Maintenance: active · Downloads: 527.1K/mo ## What it is and what it does SimPy is a discrete-event simulation framework built on standard Python that lets you model systems as processes defined by generator functions. You define active components (customers, vehicles, agents) and shared resources (servers, counters, tunnels) and then run the simulation to observe how the system behaves over time. The framework handles the event scheduling and process coordination for you. It's designed for scenarios where you want to understand system behavior through simulation—how queues form, how resources get congested, how timing affects outcomes. You can run simulations as fast as the computer allows, synchronized to wall-clock time, or step through events manually for debugging. The framework is not suited for continuous simulations or fixed-step models where processes don't interact. Use it for: - Model customer flows through a bank or retail checkout to understand queue lengths and service times. - Simulate vehicle routing and congestion in a transportation network to optimize dispatch. - Test agent-based models where multiple autonomous entities interact with shared resources. - Prototype manufacturing or production systems to find bottlenecks before building. - Evaluate IT infrastructure (server load, request queuing) under different traffic patterns. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. SimPy is a process-based discrete-event simulation framework that uses Python generator functions to model active components and shared resources, allowing simulations to run as fast as possible, in real time, or by manual stepping. Yes. SimPy is a mature, actively maintained framework with zero dependencies, permissive licensing, and broad Python version support. It solves a specific, well-defined problem—discrete-event simulation—and does so with a clean, Pythonic API. Install it if you need to model systems with interacting processes and shared resources; skip it if your problem is continuous simulation or fixed-step modeling. ## Install pip install simpy uv add simpy poetry add simpy ## Installing simpy Before you install: Low friction: pure Python wheel with no runtime dependencies, requires Python >= 3.8, and actively maintained with a recent release. License in practice: MIT license is permissive; you can use, modify, and distribute SimPy with minimal restrictions, making it suitable for both open-source and commercial projects. Quickstart: pip install simpy import simpy def clock(env, name, tick): while True: print(name, env.now) yield env.timeout(tick) env = simpy.Environment() env.process(clock(env, 'fast', 0.5)) env.run(until=2) Requires Python >= 3.8; not designed for continuous simulations or fixed-step simulations where processes don't interact. Verify before relying: - Performance characteristics and scalability limits for large-scale simulations. - Whether the package supports parallel or distributed simulation execution. - Typical use-case performance benchmarks compared to other discrete-event simulators. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 527.1K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags discrete event simulation python, process-based simulation framework, event-driven simulation, agent-based modeling python, resource congestion modeling, simulation with generators, real-time simulation framework, simulation, discrete-event, modeling [View on SkillFed](https://skillfed.io/packages/simpy) · [View on PyPI](https://pypi.org/project/simpy/)