Skip to main content

Orrery

PyPI - Version License Test lint Publish Docs

A framework for supporting MVC and observer patterns in Python

Install

pip install orrery

Update

pip install --update orrery

Documentation

Quick start

See the Tutorial page for more information

Create a model containing an initial value

from orrery.models import ValueModel
my_model = ValueModel(value=5)

Read or set the model value

my_model.value = 6
print(my_model.value)

Constant model:

from orrery.models import ConstantModel
my_model = ConstantModel(value=5)

Model containing a class (i.e. store without copying)

from orrery.models import ClassModel
my_object = MyClass()
my_model = ClassModel(my_object)

Check if a model has been given a value:

print(my_model.has_value())

Observe changes to a model:

class CallbackClass:
    def value_changed(self, model):
        print(f"New value: {model.value}")

callback_class = CallbackClass()
my_model.add_value_changed_listener(callback_class.value_changed)

Create a model which depends on other models:

from orrery.models import DependentModel, ValueModel

model_a = ValueModel(value=2)
model_b = ValueModel(value=3)
sum_model = DependentModel(
    dependencies=dict(model_a=model_a, model_b=model_b), 
    get_result=lambda dependencies: dependencies["model_a"].value + dependencies["model_b"].value
)
print(sum_model.value)

Source code

License

See license file

Copyright

© 2025 Code Choreography Limited

Metadata

Release files for orrery 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 orrery 0.1.1
File Size Uploaded
orrery-0.1.1.tar.gz 15.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for orrery 0.1.1
File Interpreter ABI Platform
orrery-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 24.1 kB

Release files / orrery-0.1.1.tar.gz

Download URL orrery-0.1.1.tar.gz
Size 15.8 kB
Tags Source
SHA-256 checksum
How to use checksums
b960c9d1e7e47a91c5c0c4c91f0792fee48ab9bd43714615cfe42718cc1d7c9f
BLAKE2b-256 checksum
How to use checksums
76ecf4dd30b5eaa0d8de90c4ec0d47d62ebb98dcede377a728f41225ced8ed1e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Oct 17, 2025.

Transparency log

Release files / orrery-0.1.1-py3-none-any.whl

Download URL orrery-0.1.1-py3-none-any.whl
Size 8.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
774db8c88462b5088c974978c81ab63d5d772b9a4273839fc935335c871a9289
BLAKE2b-256 checksum
How to use checksums
ef280585c3c60326bc9fb14c97cf0b3be9a2839359df6093f75131320f7d27c2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Oct 17, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

0.0.2

2 release files

0.0.1

2 release files

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