anihmm
anihmm draws small HMM-style animations in a terminal. Use it as a loading
indicator, build a custom state path, or render individual frames with
Rich.
Install
pip install anihmm
Python 3.10 or newer is required.
Use
Wrap the work you want to animate:
from anihmm import ProcessingOptions, processing_animation
with processing_animation(ProcessingOptions.random()):
run_your_work()
The animation runs in the background and stops when the block exits. When
output is redirected or captured, anihmm stays quiet automatically.
When the work finishes, you can replace the animation with a final frame and print the results:
To show fixed text on a random path:
with processing_animation(
ProcessingOptions.random(emissions="SEARCHING", seed=7)
):
run_your_work()
Async code uses the matching context manager:
from anihmm import ProcessingOptions, async_processing_animation
async with async_processing_animation(ProcessingOptions.random()):
await run_your_work()
Advance a predetermined path as individual units of work complete:
from anihmm import progress_animation
with progress_animation(columns=3) as progress:
for state, emission in (("M", "A"), ("D", None), ("M", "C")):
run_one_step()
progress.advance(state, emission=emission)
progress.finish()
Build a sequence
Use HMMSequence when a preset is not enough:
from anihmm import HMMSequence, compile_steps
sequence = HMMSequence()
for symbol in "SEARCH":
sequence.settle("M")
sequence.emit(symbol)
sequence.finish()
frames = compile_steps(sequence.build())
More examples
Generate an exact number of random emissions:
Keep fixed text while generating a different path on each loop:
Complete the unused columns of a bounded sequence with deletion states:
Preview every possible transition before settling on one:
The runnable versions are in
examples/, with explanations in
the examples guide.
Documentation
Metadata
Release files for anihmm 0.1.1
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 |
|---|---|---|---|---|
| anihmm-0.1.1.tar.gz | 25.6 kB | With provenance | Details for anihmm-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| anihmm-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for anihmm-0.1.1-py3-none-any.whl |
Total release size: 59.7 kB
Release files / anihmm-0.1.1.tar.gz
| Download URL | anihmm-0.1.1.tar.gz |
|---|---|
| Size | 25.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fdacd19292cb385a404530df18a70554dd111baa4b41e280c41ea7082d8aeb81
|
|
BLAKE2b-256 checksum How to use checksums |
e3982e04887e2e39453f1597a83146f799ab316edd2392531f16b4f8826fb38c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.
Transparency logRelease files / anihmm-0.1.1-py3-none-any.whl
| Download URL | anihmm-0.1.1-py3-none-any.whl |
|---|---|
| Size | 34.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
eeb564b2ddeb3800f1b1fbe589ee5c7b829b92b3c0c98e65df46fa7483157bc5
|
|
BLAKE2b-256 checksum How to use checksums |
1759cfd0b738d44479cc1eaa3ff224c0a8fcdfa2c3f3065f88daa7a72b2c8250
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.
Transparency logSecurity for anihmm 0.1.1
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for anihmm-0.1.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 18, 2026.
Transparency logA 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.