Skip to main content

Cimba logo

Cimba Python

Cimba Python compiles object-oriented discrete-event models to run on the Cimba C engine. A model declares its variability as inputs. The same compiled model can use distributions, recorded traces, bootstrap resamples, or fitted sources.

Python 3.11 or newer is required. Linux x86_64 and aarch64, Windows AMD64, and macOS arm64 wheels include the native engine.

pip install cimba

A queue model

import cimba as cb
from cimba import inputs


class MM1(cb.Model):
    interarrival: cb.Input[float] = inputs.dist.exponential(mean=1 / 0.75)
    service_time: cb.Input[float] = inputs.dist.exponential(mean=1)
    queue: cb.Container
    mean_queue: cb.Output[float]

    @cb.process
    def arrivals(self):
        while True:
            cb.hold(self.interarrival.next())
            self.queue.put(1)

    @cb.process
    def server(self):
        while True:
            self.queue.get(1)
            cb.hold(self.service_time.next())

    @cb.on_end
    def measure(self):
        self.mean_queue = self.queue.mean_level()


model = MM1()
results = cb.Experiment(
    model, replications=100,
    window=cb.Window(warmup=100, duration=1000), seed=123,
).run()
print(cb.analysis.summary(results[model].mean_queue))

To replay observed arrival gaps, assign model.interarrival = inputs.trace(gaps). To resample them, assign inputs.bootstrap.stationary(gaps, mean_block=7). The process code and compiled class stay the same. Input sources are independent streams, and results record their provenance and consumption.

See the documentation, standalone tutorials, and 0.6 to 0.7 migration guide.

Development

git submodule update --init --recursive
uv sync --locked
uv run pytest

The Cimba C library is an unchanged submodule. Cimba Python is Apache-2.0 licensed; see LICENSE and NOTICE.

Metadata

Release files for cimba 0.9.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cimba 0.9.4
File Size Uploaded Provenance Actions
cimba-0.9.4.tar.gz 18.3 MB With provenance Details for cimba-0.9.4.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for cimba 0.9.4
File Actions
cimba-0.9.4-cp311-abi3-win_amd64.whl CPython 3.11 abi3 Windows x86-64 Details for cimba-0.9.4-cp311-abi3-win_amd64.whl
cimba-0.9.4-cp311-abi3-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl CPython 3.11 abi3 Linux glibc 2.26+ ARM64, Linux glibc 2.28+ ARM64 Details for cimba-0.9.4-cp311-abi3-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
cimba-0.9.4-cp311-abi3-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl CPython 3.11 abi3 Linux glibc 2.24+ x86-64, Linux glibc 2.28+ x86-64 Details for cimba-0.9.4-cp311-abi3-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
cimba-0.9.4-cp311-abi3-macosx_11_0_arm64.whl CPython 3.11 abi3 macOS 11.0+ ARM64 Details for cimba-0.9.4-cp311-abi3-macosx_11_0_arm64.whl

Total release size: 19.2 MB

Release files / cimba-0.9.4.tar.gz

Download URL cimba-0.9.4.tar.gz
Size 18.3 MB
Tags Source
SHA-256 checksum
How to use checksums
5d4510cd6447d0eb1138ad7ab46607ea355391048312d39aef61cc347ae81b63
BLAKE2b-256 checksum
How to use checksums
50a34d5a506503e1a54b3e46eb731c5f7c5a61a1246da710bf42f818a43fa4fa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 3, 2026.

Transparency log

Release files / cimba-0.9.4-cp311-abi3-win_amd64.whl

Download URL cimba-0.9.4-cp311-abi3-win_amd64.whl
Size 212.4 kB
Tags CPython 3.11 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
fd9e4212bf002343a417e6a19d66e39524325f2fb3b5f69c275269c7ca61ca71
BLAKE2b-256 checksum
How to use checksums
d35c0e58f3bc7b42752b8077b791b49bf6eb5902d6413a6b8884b26aa26b44a8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 3, 2026.

Transparency log

Release files / cimba-0.9.4-cp311-abi3-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl

Download URL cimba-0.9.4-cp311-abi3-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Size 255.7 kB
Tags CPython 3.11 Linux glibc 2.26+ ARM64 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
f7e24cf52a02b55cf68f942f2b90028aa754df57ba108790d9c0087f92d411a9
BLAKE2b-256 checksum
How to use checksums
582e5bb3d03a6f05d0727368fd8da85960f59ed5d56527644d28e819e1f82c2b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 3, 2026.

Transparency log

Release files / cimba-0.9.4-cp311-abi3-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl

Download URL cimba-0.9.4-cp311-abi3-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Size 263.5 kB
Tags CPython 3.11 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
f402105450d98611a97ea9a81007812e206d52dc3ffd9819c945a01dc11ebe9e
BLAKE2b-256 checksum
How to use checksums
fdc0e288d29aeae0fcadd4fc63d52fae5479b24e445b5c864b7531bc64088e9b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 3, 2026.

Transparency log

Release files / cimba-0.9.4-cp311-abi3-macosx_11_0_arm64.whl

Download URL cimba-0.9.4-cp311-abi3-macosx_11_0_arm64.whl
Size 214.0 kB
Tags CPython 3.11 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
ec4d223ff21761a255d798c764fc2e451b2bb5b1d9de7bb1d6f700d3417c9276
BLAKE2b-256 checksum
How to use checksums
72a8a3b3830f315ac89b3c4670e43c2eba7d2c5dc20a38e40362e2e5b9fbe61d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 3, 2026.

Transparency log

Security for cimba 0.9.4

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

All 5 files in this release have been uploaded with provenance metadata.

Select from 5 files

Attestation for cimba-0.9.4.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 3, 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.9.4 This release

5 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