RASTRA
Simple Rust-backed Python module for tracing field lines.
This package is built with maturin and published to PyPI as rastra.
Build and install locally
uv pip install -e .
This installs:
rastra(Rust extension module)
If you prefer using maturin directly:
maturin develop
Minimal API usage
import numpy as np
import rastra
paths = rastra.trace_fieldlines(
xmin=0.0,
xmax=1.0,
ymin=0.0,
ymax=1.0,
nx=16,
ny=16,
bx=np.ones(16 * 16),
by=np.zeros(16 * 16),
seeds=[(0.1, 0.1), (0.2, 0.3)],
step=0.01,
max_steps=1024,
)
This project now keeps a small, non-public API focused on one task: compute field lines.
Publish to PyPI
- Create an API token on PyPI.
- Export it in your shell:
export MATURIN_PYPI_TOKEN=pypi-...
- Build the distribution artifacts locally:
uvx maturin build
- Optionally validate the built wheel in a clean environment:
uv venv /tmp/rastra-test
source /tmp/rastra-test/bin/activate
uv pip install dist/*.whl
python -c "import rastra; print(sorted(name for name in dir(rastra) if 'fieldlines' in name))"
- Publish to TestPyPI first:
uvx maturin publish --repository testpypi
- Publish to PyPI:
uvx maturin publish
The package name is configured as rastra in pyproject.toml.
Minimal repository layout
src/core Rust tracing implementation and Python bindingsCargo.tomlRust package configurationpyproject.tomlmaturin/Python packaging configuration
Minimal API
trace_fieldlines(...)fixed-step tracer (RK4)
Metadata
Release files for rastra 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| rastra-0.1.2-cp314-cp314-manylinux_2_34_x86_64.whl | CPython 3.14 | CPython 3.14 | Linux glibc 2.34+ x86-64 | Details for rastra-0.1.2-cp314-cp314-manylinux_2_34_x86_64.whl |
Release files / rastra-0.1.2-cp314-cp314-manylinux_2_34_x86_64.whl
| Download URL | rastra-0.1.2-cp314-cp314-manylinux_2_34_x86_64.whl |
|---|---|
| Size | 297.5 kB |
| Tags | CPython 3.14 Linux glibc 2.34+ x86-64 |
|
SHA-256 checksum How to use checksums |
6d0ae2e63c003a3fd8e205ddc6be2221111485f1c3c05ef7882379eaf8c23df8
|
|
BLAKE2b-256 checksum How to use checksums |
598aed1cf180450d6a88561dc69fea466fab699388a4d6d62e248f0e3e82b10c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.3
|
Security for rastra 0.1.2
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.