Celestial Rhapsody
A multi-body gravitational simulation, configured entirely through an input file. You give it initial masses, positions and velocities, and it gives you an animation of the orbits.
Install
pip install git+https://github.com/jam-sadiq/celestial-rhapsody.git
or, from a copy of this folder: pip install .
Quick start
nbody run examples/three_body.json # -> examples/three_body.gif
A minimal input file:
{
"G": 1.0,
"dt": 0.01,
"final_time": 10,
"bodies": [
{"name": "Star", "mass": 1.0, "position": [0, 0], "velocity": [0, 0]},
{"name": "Planet", "mass": 0.001, "position": [1, 0], "velocity": [0, 1]}
]
}
The original .txt format ([Global] / [Planet] sections) also works. See
examples/three_body.txt.
From Python:
from celestial_rhapsody import load_system, simulate, animate
trajectory = simulate(load_system("examples/three_body.json"), method="rk4")
animate(trajectory, "three_body.gif")
Documentation
Installation guide, tutorial, input format and API reference: https://jam-sadiq.github.io/celestial-rhapsody
To build it locally:
pip install -e ".[docs]"
cd docs && make html # open docs/build/html/index.html
Development
pip install -e ".[test]"
pytest
Authors
Jam Sadiq, in collaboration with Valeria Monserrat Aceituno Salinas, and Aditya Swardiana
License
BSD 3-Clause. See LICENSE.txt.
Metadata
Release files for celestial-rhapsody 0.1.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 |
|---|---|---|---|---|
| celestial_rhapsody-0.1.0.tar.gz | 13.6 kB | With provenance | Details for celestial_rhapsody-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| celestial_rhapsody-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for celestial_rhapsody-0.1.0-py3-none-any.whl |
Total release size: 26.2 kB
Release files / celestial_rhapsody-0.1.0.tar.gz
| Download URL | celestial_rhapsody-0.1.0.tar.gz |
|---|---|
| Size | 13.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5c213ecf725a2665cddb9bf3759d92d0577fc17458515fba66dc2955f1648663
|
|
BLAKE2b-256 checksum How to use checksums |
fc9f9f9f882ad8161cb2f493c85a4d0820a49aad404f241b074388ccee2218c4
|
| 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 Dec 2, 2026.
Transparency logRelease files / celestial_rhapsody-0.1.0-py3-none-any.whl
| Download URL | celestial_rhapsody-0.1.0-py3-none-any.whl |
|---|---|
| Size | 12.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0e6901c74340d90999344a3f5fcf210e5b42578bdd086d7f1515dbd3594c8f66
|
|
BLAKE2b-256 checksum How to use checksums |
7c046f5d3d8fa902ada2727f386e4cbb4e1874ad5808088dcaec7c37d42270ed
|
| 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 Dec 2, 2026.
Transparency logSecurity for celestial-rhapsody 0.1.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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for celestial_rhapsody-0.1.0.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 Dec 2, 2026.
Transparency logA 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.