Skip to main content

Astrora - Rust-Backed Astrodynamics Library

Python 3.8+ Rust 1.90+ License: MIT

A modern, high-performance orbital mechanics library combining Python's ease of use with Rust's computational performance.

Overview

Astrora is a ground-up modernization of astrodynamics computing, delivering 10-100x performance improvements over pure Python implementations while maintaining an intuitive Python API.

Background

The original poliastro library was archived on October 14, 2023. While active forks like hapsira continue development, Astrora represents a new approach that:

  • Leverages the mature Rust astrodynamics ecosystem (2024-2025)
  • Implements cutting-edge Python-Rust integration patterns
  • Provides 10-100x performance improvements over pure Python
  • Maintains API compatibility with poliastro where practical

Features

Core Capabilities

  • High-performance orbit propagators

    • Keplerian propagation (analytical)
    • Cowell's method with perturbations
    • Numerical integrators (RK4, DOPRI5, DOP853)
    • 10-50x faster than pure Python
  • Perturbation models

    • Earth oblateness (J2, J3, J4)
    • Atmospheric drag (exponential model)
    • Third-body effects (Sun, Moon)
    • Solar radiation pressure
  • Coordinate transformations

    • GCRS ↔ ITRS ↔ TEME
    • Batch transformations with 20-80x speedup
    • Full time-dependent rotations
  • Lambert solvers

    • Universal variable formulation
    • Izzo's algorithm
    • Batch processing with 50-100x speedup
  • Orbital mechanics

    • Classical orbital elements ↔ Cartesian state vectors
    • Anomaly conversions (true, eccentric, mean)
    • Orbit classification and analysis
  • Maneuvers

    • Hohmann transfers
    • Bi-elliptic transfers
    • Impulsive burns (Δv calculations)
  • Visualization

    • 2D/3D static plots
    • Interactive 3D visualizations (Plotly)
    • Ground track plotting
    • Porkchop plots for transfer analysis
    • Orbit animations (GIF, MP4, HTML)
  • Satellite operations

    • TLE/OMM parsing and propagation
    • Lifetime estimation
    • Ground station visibility
    • Eclipse predictions

Installation

Install using uv for the fastest experience:

# Install uv
curl -LsSf https://astral.sh/uv/install.sh | sh

# Install Astrora
uv pip install astrora

Traditional Installation

pip install astrora

From Source

For development or latest features:

git clone https://github.com/cachemcclure/astrora.git
cd astrora
uv venv --python 3.12
source .venv/bin/activate
uv pip install -e ".[dev]"
maturin develop --release

Complete Installation Guide - Detailed instructions for all platforms and use cases

Quick Start

import numpy as np
from astrora import Orbit, bodies
from astrora._core import hohmann_transfer

# Create an orbit from state vectors
orbit = Orbit.from_vectors(
    bodies.Earth,
    r=np.array([7000e3, 0.0, 0.0]),  # Position (m)
    v=np.array([0.0, 7546.0, 0.0])   # Velocity (m/s)
)

print(f"Semi-major axis: {orbit.a/1e3:.1f} km")
print(f"Period: {orbit.period/3600:.2f} hours")
print(f"Eccentricity: {orbit.ecc:.6f}")

# Propagate the orbit forward in time
orbit_after_1hr = orbit.propagate(3600.0)  # 1 hour later
print(f"True anomaly after 1 hour: {orbit_after_1hr.nu:.2f} rad")

# Calculate a Hohmann transfer from LEO to GEO
result = hohmann_transfer(7000e3, 42164e3, bodies.Earth.mu)
print(f"Total Δv: {result['delta_v_total']/1000:.2f} km/s")
print(f"Transfer time: {result['transfer_time']/3600:.2f} hours")

# Visualize (requires matplotlib)
from astrora.plotting import plot_orbit
plot_orbit(orbit)

Performance

Real-world benchmarks on Apple M2 Pro:

  • Numerical propagation: 10-50x faster than pure Python
  • Lambert problem (batch): 50-100x faster with Rayon parallelization
  • Coordinate transformations (batch): 20-80x faster with SIMD
  • Overall workflows: 5-10x typical improvement

Technical Stack

  • Python 3.8+: High-level API and user interface
  • Rust 1.90+: Performance-critical computations
  • PyO3 0.22: Seamless Rust-Python bindings with stable ABI
  • maturin: Build system for Rust-backed Python packages
  • uv: Ultra-fast package management (10-100x faster than pip)

Scientific Libraries:

  • nalgebra: Linear algebra operations
  • hifitime: Nanosecond-precision time handling
  • rayon: Data parallelism for batch operations
  • astropy: Astronomical calculations and units
  • numpy: Array operations

Documentation

Examples

Check the examples/ directory for comprehensive usage examples:

  • Basic orbit creation and propagation
  • Coordinate transformations
  • Lambert problem solving
  • Porkchop plots for mission planning
  • Ground track visualization
  • Orbit animations
  • Satellite operations

Contributing

Contributions are welcome! This project is in active development.

Development Setup

# Clone the repository
git clone https://github.com/cachemcclure/astrora.git
cd astrora

# Set up development environment
uv venv --python 3.12
source .venv/bin/activate
uv pip install -e ".[dev,docs,test]"

# Build Rust extension
maturin develop --release

# Run tests
pytest tests/ -v

# Check coverage
pytest --cov=astrora --cov-report=html

Code Quality

We maintain high code quality standards:

  • Rust: All public APIs documented, >90% test coverage target
  • Python: NumPy-style docstrings, >85% test coverage target
  • Testing: 636+ tests (Rust + Python), comprehensive integration tests
  • Benchmarking: Continuous performance tracking via GitHub Actions
  • Linting: rustfmt, clippy, black, ruff
  • Type checking: mypy for Python

Areas for Contribution

  • Additional perturbation models (Harris-Priester atmosphere, NRLMSISE-00)
  • More Lambert solver algorithms
  • GPU acceleration for batch operations
  • Advanced maneuver optimization
  • Documentation and tutorials
  • Performance improvements

Roadmap

  • PyPI release with pre-built wheels (Linux, macOS, Windows)
  • Complete user guide and tutorials
  • Jupyter notebook examples
  • Advanced gravity models (EGM2008)
  • Constellation design tools
  • Low-thrust trajectory optimization
  • Integration with mission analysis tools

Project Status

Current Version: 0.1.0 (Alpha)

Test Status:

  • 636+ tests passing (473 Rust, 163+ Python)
  • 73.96% overall Rust coverage (~87% excluding PyO3 bindings)
  • Comprehensive benchmark suite
  • Continuous integration via GitHub Actions

Phase Completion:

  • Phase 1-8: Core functionality (propagators, coordinates, plotting)
  • Phase 9-10: Advanced features (SIMD optimization, satellite operations)
  • Phase 11: Documentation (in progress)
  • Phase 12: Testing and quality assurance (14/17 complete)

Performance Benchmarks

Measured on Apple M2 Pro (10-core, 16GB RAM):

Operation Astrora (Rust) Pure Python Speedup
RK4 propagation (1000 steps) 5.0 μs 12.6 μs 2.5x
Lambert solver (single) 8.2 μs 45 μs 5.5x
Lambert batch (1000) 2.1 ms 45 ms 21x
Coordinate transform (single) 1.8 μs 8.5 μs 4.7x
Coordinate batch (1000) 1.2 ms 8.5 ms 7.1x
Cross product 2.75 μs 75.5 μs 27.5x

Note: Actual speedups depend on CPU, problem size, and operation type. Batch operations see higher speedups due to Rayon parallelization.

License

MIT License - See LICENSE for details

Citation

If you use Astrora in your research, please cite:

@software{astrora2025,
  author = {McClure, Cache},
  title = {Astrora: A Rust-Backed Astrodynamics Library for Python},
  year = {2025},
  url = {https://github.com/cachemcclure/astrora},
  version = {0.1.0}
}

Acknowledgments

Support


Made by the Astrora team. Powered by Rust and Python.

Metadata

Release files for astrora 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 astrora 0.1.1
File Size Uploaded Provenance
astrora-0.1.1.tar.gz 859.9 kB Without provenance Details

Built distributions (wheels)

Table of built distributions (wheels) for astrora 0.1.1
File
astrora-0.1.1-cp38-abi3-win_amd64.whl CPython 3.8 abi3 Windows x86-64 Details
astrora-0.1.1-cp38-abi3-win32.whl CPython 3.8 abi3 Windows x86-32 Details
astrora-0.1.1-cp38-abi3-musllinux_1_2_x86_64.whl CPython 3.8 abi3 Linux musl 1.2+ x86-64 Details
astrora-0.1.1-cp38-abi3-musllinux_1_2_i686.whl CPython 3.8 abi3 Linux musl 1.2+ x86-32 Details
astrora-0.1.1-cp38-abi3-musllinux_1_2_armv7l.whl CPython 3.8 abi3 Linux musl 1.2+ ARMv7l Details
astrora-0.1.1-cp38-abi3-musllinux_1_2_aarch64.whl CPython 3.8 abi3 Linux musl 1.2+ ARM64 Details
astrora-0.1.1-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.8 abi3 Linux glibc 2.17+ x86-64 Details
astrora-0.1.1-cp38-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl CPython 3.8 abi3 Linux glibc 2.17+ ARMv7l Details
astrora-0.1.1-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.8 abi3 Linux glibc 2.17+ ARM64 Details
astrora-0.1.1-cp38-abi3-manylinux_2_12_i686.manylinux2010_i686.whl CPython 3.8 abi3 Linux glibc 2.12+ x86-32 Details
astrora-0.1.1-cp38-abi3-macosx_11_0_arm64.whl CPython 3.8 abi3 macOS 11.0+ ARM64 Details
astrora-0.1.1-cp38-abi3-macosx_10_12_x86_64.whl CPython 3.8 abi3 macOS 10.12+ x86-64 Details

Total release size: 37.3 MB

Release files / astrora-0.1.1.tar.gz

Download URL astrora-0.1.1.tar.gz
Size 859.9 kB
Tags Source
SHA-256 checksum
How to use checksums
eac159942ea8fb9928ce323fb49e1ed7f1dbdf6c18be8d4fa7b3873792ae8044
BLAKE2b-256 checksum
How to use checksums
0065c909ea8b5046f6bf13e0ce258c117bd92249647800a06988103918b3e7b4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.9.6

Release files / astrora-0.1.1-cp38-abi3-win_amd64.whl

Download URL astrora-0.1.1-cp38-abi3-win_amd64.whl
Size 773.1 kB
Tags CPython 3.8 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
1761cb9f6de02a2bd01e7623754537454f8f6dee707ee11a45ea0fae6b03e71d
BLAKE2b-256 checksum
How to use checksums
bd680d416705abc360a0c6edfffb0d0b080bd7258877548fb5da2e852b067139
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.9.6

Release files / astrora-0.1.1-cp38-abi3-win32.whl

Download URL astrora-0.1.1-cp38-abi3-win32.whl
Size 729.5 kB
Tags CPython 3.8 Windows x86-32 abi3
SHA-256 checksum
How to use checksums
c78cb426349ea881e3d3bc805dc671a2cb7873560eb3efd46767db80de0907c3
BLAKE2b-256 checksum
How to use checksums
88987591dc9fd3e72e8645f8e1521ad6d543e2e031b2186b27d8c576198ceea1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.9.6

Release files / astrora-0.1.1-cp38-abi3-musllinux_1_2_x86_64.whl

Download URL astrora-0.1.1-cp38-abi3-musllinux_1_2_x86_64.whl
Size 4.2 MB
Tags CPython 3.8 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
4b630508f19aa3596468d9dafc6ff6c60c4633ca4f2ed6ee2f6371c3923a596e
BLAKE2b-256 checksum
How to use checksums
e280f09ebe2eaeeff57608aa571a18c860f847d0a8ae3c24f08d143d7fad7609
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.9.6

Release files / astrora-0.1.1-cp38-abi3-musllinux_1_2_i686.whl

Download URL astrora-0.1.1-cp38-abi3-musllinux_1_2_i686.whl
Size 4.2 MB
Tags CPython 3.8 Linux musl 1.2+ x86-32 abi3
SHA-256 checksum
How to use checksums
bc52bd2e0d69e1dd961519051d229890e741093f7af5dc37c227657d36458436
BLAKE2b-256 checksum
How to use checksums
dfd6f64d3cb862fcb5b1d870ab3384b6298b0de19c0a0ec6265a562ef21a6131
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.9.6

Release files / astrora-0.1.1-cp38-abi3-musllinux_1_2_armv7l.whl

Download URL astrora-0.1.1-cp38-abi3-musllinux_1_2_armv7l.whl
Size 4.3 MB
Tags CPython 3.8 Linux musl 1.2+ ARMv7l abi3
SHA-256 checksum
How to use checksums
93630420a53509bbfe9d884829ad9aff89712a428ae7bdddf5a4e61ce4e82089
BLAKE2b-256 checksum
How to use checksums
a83ed9718e5a6a530a8fcb92636fcb95ae0147e9a022cc126d8673dd5bae2a2f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.9.6

Release files / astrora-0.1.1-cp38-abi3-musllinux_1_2_aarch64.whl

Download URL astrora-0.1.1-cp38-abi3-musllinux_1_2_aarch64.whl
Size 4.1 MB
Tags CPython 3.8 Linux musl 1.2+ ARM64 abi3
SHA-256 checksum
How to use checksums
34832a5377ac5c6b26cd8fb21f44091563e468444e3506fa07bd7fab4b6f12cc
BLAKE2b-256 checksum
How to use checksums
5da2b1525e9d57041a09fb79f9c4c43288ebcd3bf87bfec9abdfc0b6b8117ea9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.9.6

Release files / astrora-0.1.1-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL astrora-0.1.1-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 4.5 MB
Tags CPython 3.8 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
ff8f1647eea9f0b8b6b1cf94503be283ac4815107d2c97a58d264698603b7a80
BLAKE2b-256 checksum
How to use checksums
358848ad2705bc46ff1817c86be5a3dcc9c517a7b6d43e5ef6713b576d5fc233
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.9.6

Release files / astrora-0.1.1-cp38-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl

Download URL astrora-0.1.1-cp38-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Size 4.0 MB
Tags CPython 3.8 Linux glibc 2.17+ ARMv7l abi3
SHA-256 checksum
How to use checksums
276786d5cf0f26a14da3b270a704f526a338c913bf24886b820d8d3629306fee
BLAKE2b-256 checksum
How to use checksums
d10700704c22c18691bbc9d14b67cd03b91c616c17912d60b1c208675eb19d0b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.9.6

Release files / astrora-0.1.1-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL astrora-0.1.1-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 3.9 MB
Tags CPython 3.8 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
ab40b503bbdb19fc91bc9a40f8edf64bc756ab47c6d3f1001ed394ae51a54931
BLAKE2b-256 checksum
How to use checksums
b28b78425cd64b4f2a469fdd233b6209afcf98b53f1a3790f8b8815ad9282bfc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.9.6

Release files / astrora-0.1.1-cp38-abi3-manylinux_2_12_i686.manylinux2010_i686.whl

Download URL astrora-0.1.1-cp38-abi3-manylinux_2_12_i686.manylinux2010_i686.whl
Size 4.1 MB
Tags CPython 3.8 Linux glibc 2.12+ x86-32 abi3
SHA-256 checksum
How to use checksums
460f719aeac5ded2fedcd26ec1cdd2377f46a94b5a4859086d79179688ecd903
BLAKE2b-256 checksum
How to use checksums
8914c318c4fcf9a6564d32610bd36250d763eb30b3a11c1b7a68ca3729c2a246
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.9.6

Release files / astrora-0.1.1-cp38-abi3-macosx_11_0_arm64.whl

Download URL astrora-0.1.1-cp38-abi3-macosx_11_0_arm64.whl
Size 802.5 kB
Tags CPython 3.8 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
c43eaf2c8e6641617c50b7fdb707ffd3a507a850e138b1b9d38fd786675ca787
BLAKE2b-256 checksum
How to use checksums
42f86efd472826c087edb655628f254644ccc2be3443044433ffc8596f5949a3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.9.6

Release files / astrora-0.1.1-cp38-abi3-macosx_10_12_x86_64.whl

Download URL astrora-0.1.1-cp38-abi3-macosx_10_12_x86_64.whl
Size 861.8 kB
Tags CPython 3.8 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
0ccfa8448ce73a6bd2d05de91f7419145a19790dfcdd31d65d95e163e766a9ca
BLAKE2b-256 checksum
How to use checksums
ab8180f3bbd8b97b82d558f2b4dc79ca70e382e90d1a4f7807807b8e5a4db65c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.9.6

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

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.

Release history Release notifications | RSS feed

This release

0.1.1 This release

13 release files No 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