Skip to main content

Lightweight Simulation Framework

Project description

Documentation Available on PyPI MIT Licensed Cite with DOI

μSim offers a lightweight and expressive user interface, built on top of a powerful and robust simulation framework. Using the async/await capabilities of Python3, μSim allows you to both quickly and reliably build even complex simulations.

>>> from usim import delay, run
>>>
>>> async def metronome(period: float, sound: str):
...     async for now in delay(period):
...         print(sound, '@', now)
...
>>> run(metronome(period=1, sound='tick'), metronome(period=2, sound='TOCK'), till=5)
tick @ 1
TOCK @ 2
tick @ 2
tick @ 3
TOCK @ 4
tick @ 4
tick @ 5

Check out the μSim documentation for more information on creating simulations with μSim.

μSim Development

If you are reading this, you are looking at the μSim repository. Here you can find the current development version, submit issue tickets, or propose pull requests.

In order to try the most recent development version, check out and install the master branch. This branch is guaranteed to contain only working changes.

If you want to report issues or propose changes, please take a look at the contribution guidelines.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

usim-0.4.4.tar.gz (99.3 kB view hashes)

Uploaded Source

Built Distribution

usim-0.4.4-py2.py3-none-any.whl (67.4 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page