Py-Exhaust-MA
Exhaust-MA is a highly optimized Redcode simulator. Py-Exhaust-MA is the python bindings for Exhaust-MA.
Installation
Use pip to install Py-Exhaust-MA.
pip install exhaust-ma
Usage
from exhaust_ma import Warrior, Core, CoreSettings
jaguar = "jaguar.rc"
imp = "imp.rc"
cs = CoreSettings()
w1 = Warrior.from_filename(cs, jaguar)
w2 = Warrior.from_filename(cs, imp)
c = Core(cs)
c.load_warriors([w1, w2])
print(c.run())
Exhaust-MA includes a set of warriors which you can access using importlib.resources:
import importlib.resources
jaguar = importlib.resources.files("exhaust_ma") / "exhaust-ma" / "jaguar.rc"
A full list of included files can be found In the exhaust-MA repository.
Contributing
To get going:
# Clone the git repository
git clone git@github.com:SuperDoxin/py-exhaust-ma.git
cd py-exhaust-ma
# Update the submodules. This is needed for building the exhaust-ma cffi
# library
git submodule init
git submodule update
# Activate pre-commit hooks
pre-commit install
At this point running
uv run -m exhaust_ma
Should output
BattleResult(dead=[Warrior(name='imp.rc')], alive={Warrior(name='jaguar.rc')})
If it doesn't something has gone wrong, If you need further assistance open an issue and include all the output of all the commands you have run and I'll see what I can do.
Pull requests are more than welcome. As long as you've installed the pre-commit hooks most code style issues should be checked automatically.
Updating/adding tests is appreciated but by no means a requirement for a PR to get accepted.
License
Metadata
Release files for exhaust-ma 0.0.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| exhaust_ma-0.0.6.tar.gz | 51.8 kB | Without provenance | Details for exhaust_ma-0.0.6.tar.gz |
Release files / exhaust_ma-0.0.6.tar.gz
| Download URL | exhaust_ma-0.0.6.tar.gz |
|---|---|
| Size | 51.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
62036ffe32f0dee66b9a579b630852343cb259835ce524936c7622d96b62b4ee
|
|
BLAKE2b-256 checksum How to use checksums |
09305729ffdd25a434d7f4807e1f62df60d4e404929a0ea296b55f01ee19c8bd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.5
|
Security for exhaust-ma 0.0.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.