nultra
nultra is a small Python library for building systems around the Nultra
aperture:
A_gamma(t) = [0.5 * (1 + sin(omega * t + phi))] ** gamma
A_gamma,eta(t) = 0 if A_gamma(t) < eta
= A_gamma(t) otherwise
The result is a deterministic temporal gate. When A_gamma,eta(t) == 0.0, the
system is in a hard null plateau. Applications can use that plateau as the only
valid moment for state transitions such as block proposals, checkpoints,
maintenance updates, or simulation events.
Version 0.2.0 adds rotating aperture parameters. The tuple
(omega, phi, gamma, eta) can rotate only during a valid null plateau, making
future safe windows a moving target while keeping honest participants in sync.
Installation
pip install nultra
To run the optional NultraChain dashboard:
pip install "nultra[demo]"
Quickstart
from nultra import NultraOperator
op = NultraOperator(omega=0.5, gamma=2.0, eta=0.25)
t = 6.30
aperture = op.get_aperture(t)
if op.is_null_plateau(t):
print("State transition allowed")
else:
print("Gate is closed")
Blending State
The canonical Nultra blend is:
from nultra import NultraOperator
op = NultraOperator()
current_state = 10.0
candidate_state = 25.0
next_state = op.blend(current_state, candidate_state, t=1.5)
When the aperture is zero, the state is preserved. When it opens, the candidate state contributes according to the aperture value.
Rotating Aperture Parameters
Manual rotations are strictly gated:
from nultra import NultraOperator, RotationGateError
op = NultraOperator(omega=0.5, phi=0.0, gamma=2.0, eta=0.25)
try:
event = op.rotate(t=6.30, reason="checkpoint")
except RotationGateError as exc:
print(exc)
else:
print(event.old_params)
print(event.new_params)
Automatic rotation is timer-driven, but still plateau-gated:
from nultra import NultraOperator
op = NultraOperator(
omega=0.5,
gamma=2.0,
eta=0.25,
auto_rotate=True,
rotation_interval_seconds=20,
)
for t in simulation_clock():
event = op.maybe_auto_rotate(t)
if event is not None:
print("rotated", event.to_dict())
If the timer is due while the aperture is open, no rotation happens. The next null plateau accepts the rotation message.
Running the Demo
After installing the demo extra:
nultra demo
Then open:
http://127.0.0.1:5000
The dashboard includes:
- live aperture graph
- honest nodes and a Mallory attacker simulation
- blockchain explorer
- admin panel for aperture parameters
- auto-rotation toggle
- rotation interval control
- manual plateau-gated rotation button
- rotation countdown and flash banner
From a source checkout, this also works:
python run.py
Why This Is Useful
Nultra math is useful anywhere state transitions should be rare, timed, auditable, or coordinated:
- permissioned blockchain consensus
- checkpoint admission windows
- anti-spam transaction gating
- secure maintenance windows for edge devices
- simulations where mutation should happen only at deterministic moments
The package does not claim to be a complete blockchain consensus protocol by itself. It provides the reusable aperture primitive and rotation machinery that larger blockchain, security, and simulation projects can build on.
Development
Run the tests from the project root:
python -m unittest
Build a wheel:
python -m build
Metadata
Release files for nultra 0.2.0
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 |
|---|---|---|---|---|
| nultra-0.2.0.tar.gz | 34.9 kB | Without provenance | Details for nultra-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nultra-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for nultra-0.2.0-py3-none-any.whl |
Total release size: 70.2 kB
Release files / nultra-0.2.0.tar.gz
| Download URL | nultra-0.2.0.tar.gz |
|---|---|
| Size | 34.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
315bf8f3abff11f54a5c913bbd39339a638d98d83362aaab73a1827f720ed6ee
|
|
BLAKE2b-256 checksum How to use checksums |
297381910ccf49f71c5aae3f99f8456985d3220e68b723457cabfedb1390ed57
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / nultra-0.2.0-py3-none-any.whl
| Download URL | nultra-0.2.0-py3-none-any.whl |
|---|---|
| Size | 35.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e313daea21af38bf82b40cea5a8841cdfe4d73f2c7f662b31f1f2385a2c7fb08
|
|
BLAKE2b-256 checksum How to use checksums |
12f29aa3efb7bcd3a4f0d5d0a4fc4a2edf9002ff55c5efdb1f4c3a23583fb063
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Security for nultra 0.2.0
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.