Skip to main content

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.

Terminal animation progressing through an HMM path

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:

Processing animation handing off to HMM result counts

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()

Work advancing a predetermined HMM path

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:

Random amino-acid emissions

Keep fixed text while generating a different path on each loop:

WAITING emitted on changing random paths

Complete the unused columns of a bounded sequence with deletion states:

Automatic deletion-state completion

Preview every possible transition before settling on one:

Candidate transition previews

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)

Source distribution for anihmm 0.1.1
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)

Table of built distributions (wheels) for anihmm 0.1.1
File Interpreter ABI Platform Actions
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 log

Release 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 log

Security 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.

Select from 2 files

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 log

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.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page