KessPy
KessPy is a Python library that uses the NASA Standard Breakup Model to simulate explosion and collision events in orbit, which is important for managing space debris and preventing collisions with other orbiting objects. It is a Python wrapper around Kessler.rs, a Rust implementation of the NASA Standard Breakup Model, which provides significant performance gains over purely Python-based implementations. More information about Kessler.rs can be found on its GitHub page at https://github.com/reecehumphreys/kessler.
IMPORTANT: Until this package reaches version 1.0, the API is subject to change and the accuracy of results cannot be guaranteed.
Installation
KessPy needs Python 3.10 or later. Install it with pip, which also installs numpy:
pip install kesspy
Getting Started
All inputs and outputs are SI (metres, kilograms, metres per second).
import numpy as np
from kesspy import SatKind, collision, explosion
# An 839 kg rocket body exploding, modelling fragments down to 10 cm.
debris = explosion(839.0, SatKind.RocketBody, 0.1, seed=42)
print(f"{len(debris.mass)} fragments, mean mass {np.mean(debris.mass)} kg")
# A 5 kg object hitting a 500 kg spacecraft at 9.5 km/s.
debris = collision(500.0, SatKind.Spacecraft, 5.0, SatKind.Spacecraft, 9_500.0, 0.1)
Leave out seed for a different result each run. A given seed gives the same fragments on every platform, and the
same as the Rust and JavaScript packages. Input outside the model's range (a non-positive mass or speed, or a minimum
size outside 1 mm to 1 m) raises ValueError.
Result Data Format
Both functions return a Fragments object whose fields are numpy float32 arrays with one row per fragment:
| field | unit | shape |
|---|---|---|
characteristic_length |
m | (n,) |
am_ratio |
m²/kg | (n,) |
area |
m² | (n,) |
mass |
kg | (n,) |
delta_v |
m/s | (n, 3) |
Fragments start where the event happened; add delta_v to the parent's velocity to get each fragment's velocity.
Contributing
If you find a bug or have a feature request, please open an issue on the KessPy GitHub repository:
https://github.com/ReeceHumphreys/kessler/issues
If you'd like to contribute to the project, feel free to fork the repository and submit a pull request. To build and test it locally (needs Rust and uv):
cd kesspy
uv venv && uv pip install -e . pytest
.venv/bin/pytest
License
Kessler is distributed under the terms of the MIT license. See the LICENSE file for details.
TODO
- Update the documentation to reflect the new API
- Add tests for the new API
Metadata
Release files for kesspy 0.3.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 |
|---|---|---|---|---|
| kesspy-0.3.0.tar.gz | 22.5 kB | Without provenance | Details for kesspy-0.3.0.tar.gz |
Built distributions (wheels)
Total release size: 2.6 MB
Release files / kesspy-0.3.0.tar.gz
| Download URL | kesspy-0.3.0.tar.gz |
|---|---|
| Size | 22.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a10af640f91748e391a1b8330cfbf37262f7661fc5b9e080744429449bb98953
|
|
BLAKE2b-256 checksum How to use checksums |
3b911a049c98dd5b6995c72c068e04f0091472447aa5db4bf8e68729b3aa3221
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / kesspy-0.3.0-cp310-abi3-win_arm64.whl
| Download URL | kesspy-0.3.0-cp310-abi3-win_arm64.whl |
|---|---|
| Size | 152.2 kB |
| Tags | CPython 3.10 Windows ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
a6840cdbddd3bc08afcee4559c86e7905dd2f70215d50904d0e1e2dc9940412d
|
|
BLAKE2b-256 checksum How to use checksums |
35c64a0e2bf0aabb65221e46e2ad4a546c223ff4e61a5b665524c9c01ae6e1e3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / kesspy-0.3.0-cp310-abi3-win_amd64.whl
| Download URL | kesspy-0.3.0-cp310-abi3-win_amd64.whl |
|---|---|
| Size | 157.0 kB |
| Tags | CPython 3.10 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
41cf1865c84bbec522b4a7827d7fb878087e5d7db229d2a5105caeee3c44b973
|
|
BLAKE2b-256 checksum How to use checksums |
5905ae2f0ea42d25c0f857c16b6b97efe6becc1109f7d56f19cff6f56a8db9be
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / kesspy-0.3.0-cp310-abi3-musllinux_1_2_x86_64.whl
| Download URL | kesspy-0.3.0-cp310-abi3-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 477.5 kB |
| Tags | CPython 3.10 Linux musl 1.2+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
2f70d08f6994ad69e467bda9fecb2e55783e4e7ad77a6d018dda62b13ebec181
|
|
BLAKE2b-256 checksum How to use checksums |
ec18f91db34c996e2b4ff08cc30b3a5e2ab967172e32c587d691c2dc9e48476d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / kesspy-0.3.0-cp310-abi3-musllinux_1_2_aarch64.whl
| Download URL | kesspy-0.3.0-cp310-abi3-musllinux_1_2_aarch64.whl |
|---|---|
| Size | 442.9 kB |
| Tags | CPython 3.10 Linux musl 1.2+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
becf8de00f65835e0273ecd84752dca0e26a823f8d741f76ca9894dd849483cf
|
|
BLAKE2b-256 checksum How to use checksums |
da28bfd5966577f05588cf0bcea309aaa63238699f47c8a41f9361e9421f6d81
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / kesspy-0.3.0-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
| Download URL | kesspy-0.3.0-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl |
|---|---|
| Size | 266.6 kB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
a0c0448005ecaa98c65c8245369c9b0b195968c137f930a13cdee8ebbb5d72dc
|
|
BLAKE2b-256 checksum How to use checksums |
7db8e2132209bcd7437fdb741aefa2b2376c69cfc98f2c6cd7f265055f8447f0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / kesspy-0.3.0-cp310-abi3-manylinux2014_armv7l.manylinux_2_17_armv7l.whl
| Download URL | kesspy-0.3.0-cp310-abi3-manylinux2014_armv7l.manylinux_2_17_armv7l.whl |
|---|---|
| Size | 280.7 kB |
| Tags | CPython 3.10 Linux glibc 2.17+ ARMv7l abi3 |
|
SHA-256 checksum How to use checksums |
bbb4b041a2838f162dfcd8d1239a559db523b64ae9db7781ad7e807e9e8765b0
|
|
BLAKE2b-256 checksum How to use checksums |
53ef722cde293eb427591f2a5a1326413256317776d10a17d5804e585794bf0c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / kesspy-0.3.0-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
| Download URL | kesspy-0.3.0-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl |
|---|---|
| Size | 265.3 kB |
| Tags | CPython 3.10 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
23a4e938bb54d8622438abc0bbec2252076b07738b2e2b57ad967d536304d51e
|
|
BLAKE2b-256 checksum How to use checksums |
dd9aa91e99284e78cb570bcaa46cd0516b92c142fd06380c992171900f8000ac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / kesspy-0.3.0-cp310-abi3-macosx_11_0_arm64.whl
| Download URL | kesspy-0.3.0-cp310-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 244.7 kB |
| Tags | CPython 3.10 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
9d289f7d82a30949eae62935de6bb46850cefce1724dd03aa1a67147aa78b76b
|
|
BLAKE2b-256 checksum How to use checksums |
be0d509cf3acd34923a8387e5bb8f59a09d3a39b7b9816eefa7186b3590c4e14
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / kesspy-0.3.0-cp310-abi3-macosx_10_12_x86_64.whl
| Download URL | kesspy-0.3.0-cp310-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 252.5 kB |
| Tags | CPython 3.10 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
c672dbbb0885386968a0a0fdd0389ae7fb59b3029d3ccf3e267a8ec5794365fa
|
|
BLAKE2b-256 checksum How to use checksums |
19f1e9d31920c5be4300d2b0df76e5f52c95a749f314598e36eb6ea953738a45
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.8 {"installer":{"name":"uv","version":"0.13.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for kesspy 0.3.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.