Crjbsim

Latest version: v1.3

Safety actively analyzes 681812 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 2

1.3

**Full Changelog**: https://github.com/Spycho/crjbsim/compare/1.2...1.3

1.2

This release adds support for **Daemon Events**, whereby the simulation will end execution if the only events left are all Daemon Events. This is useful for things like stats recorders and logging, which could otherwise cause your simulation to run infinitely.

It is also updated to be compatible with Python 3.12 (in which there were some minor changes to Asyncio API).

Both changes should be non-breaking (the change is backwards compatible with older versions of Python).

**Full Changelog**: https://github.com/Spycho/crjbsim/compare/1.1...1.2

1.1

Adds support for scenario testing. See [test_scenarios.py](https://github.com/Spycho/crjbsim/blob/main/tests/test_scenarios.py) for an example of how to use it.

1.0

Breaking changes
Alters the `time_provider` to notionally store time in seconds, so as to match `asyncio.sleep`. In practice, all that really changes is the formatter, and you could use time in whatever units you like as long as you avoid using the `get_time_formatted` method.

New features
Adds support for using `asyncio` to build a discrete event simulation. This allows you to call `asyncio.sleep` to simulate time passing (e.g. machinery moving), and also await on instances of `asyncio.Event`. See tests/test_asyncio_des.py for an example.

0.7

0.6

Page 1 of 2

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.