Skip to main content

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.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kesspy 0.4.0
File Size Uploaded Provenance Actions
kesspy-0.4.0.tar.gz 22.7 kB Without provenance Details for kesspy-0.4.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for kesspy 0.4.0
File Actions
kesspy-0.4.0-cp310-abi3-win_arm64.whl CPython 3.10 abi3 Windows ARM64 Details for kesspy-0.4.0-cp310-abi3-win_arm64.whl
kesspy-0.4.0-cp310-abi3-win_amd64.whl CPython 3.10 abi3 Windows x86-64 Details for kesspy-0.4.0-cp310-abi3-win_amd64.whl
kesspy-0.4.0-cp310-abi3-musllinux_1_2_x86_64.whl CPython 3.10 abi3 Linux musl 1.2+ x86-64 Details for kesspy-0.4.0-cp310-abi3-musllinux_1_2_x86_64.whl
kesspy-0.4.0-cp310-abi3-musllinux_1_2_aarch64.whl CPython 3.10 abi3 Linux musl 1.2+ ARM64 Details for kesspy-0.4.0-cp310-abi3-musllinux_1_2_aarch64.whl
kesspy-0.4.0-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.10 abi3 Linux glibc 2.17+ x86-64 Details for kesspy-0.4.0-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
kesspy-0.4.0-cp310-abi3-manylinux2014_armv7l.manylinux_2_17_armv7l.whl CPython 3.10 abi3 Linux glibc 2.17+ ARMv7l Details for kesspy-0.4.0-cp310-abi3-manylinux2014_armv7l.manylinux_2_17_armv7l.whl
kesspy-0.4.0-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl CPython 3.10 abi3 Linux glibc 2.17+ ARM64 Details for kesspy-0.4.0-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
kesspy-0.4.0-cp310-abi3-macosx_11_0_arm64.whl CPython 3.10 abi3 macOS 11.0+ ARM64 Details for kesspy-0.4.0-cp310-abi3-macosx_11_0_arm64.whl
kesspy-0.4.0-cp310-abi3-macosx_10_12_x86_64.whl CPython 3.10 abi3 macOS 10.12+ x86-64 Details for kesspy-0.4.0-cp310-abi3-macosx_10_12_x86_64.whl

Total release size: 2.6 MB

Release files / kesspy-0.4.0.tar.gz

Download URL kesspy-0.4.0.tar.gz
Size 22.7 kB
Tags Source
SHA-256 checksum
How to use checksums
462c6276f1b9d39ce5f30dc90f0bc5a6bf60e71d963f49b279d5cf772194df86
BLAKE2b-256 checksum
How to use checksums
2ed3c6a2e9108af8b92848d657a4d8ba670c8817a665289415bbce540c3379cf
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.4.0-cp310-abi3-win_arm64.whl

Download URL kesspy-0.4.0-cp310-abi3-win_arm64.whl
Size 152.2 kB
Tags CPython 3.10 Windows ARM64 abi3
SHA-256 checksum
How to use checksums
70d6f86de9f070e123bd3b69bb8d12b8eab5fe1331b95e826ea6ee3656d69f79
BLAKE2b-256 checksum
How to use checksums
73ddebcfbf1472c5f9070abba485f5a6cae7f08e47c211a4b84d8216eb2a78c4
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.4.0-cp310-abi3-win_amd64.whl

Download URL kesspy-0.4.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
00b77e8306d09176dc1517aa071f6cad3985ee1e126a87d27b4e224dc92a9afe
BLAKE2b-256 checksum
How to use checksums
62220ddf6e8f9e5e727f5ba7dc97bd2509b112ce5b3a0c14da760a475ab5d872
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.4.0-cp310-abi3-musllinux_1_2_x86_64.whl

Download URL kesspy-0.4.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
1cdf10303376135fec957be64108b896e650462766a2bb6e5ccd0bb2fa493eb9
BLAKE2b-256 checksum
How to use checksums
9d667e564cccbfd5a118d983768adceca95cac45116fea8f14152d79c5162a3b
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.4.0-cp310-abi3-musllinux_1_2_aarch64.whl

Download URL kesspy-0.4.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
53600cd15a2dd05daf7ee11c474dd84bf45b94c5dbbc84d527dbc9ff7fbc1351
BLAKE2b-256 checksum
How to use checksums
e61cf53b06ffa21fd61a8b46d8a4e6076497506f92428009eb7c55d71b27f02c
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.4.0-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL kesspy-0.4.0-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 266.7 kB
Tags CPython 3.10 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
da85700d67cfea9e928c888a15ba68d447414262b9c3d0d3a0705ffdda6d7bd0
BLAKE2b-256 checksum
How to use checksums
936841e56da605579ac99b4c73364305fd7b70c46134317a5c5c0f804d8a5eb4
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.4.0-cp310-abi3-manylinux2014_armv7l.manylinux_2_17_armv7l.whl

Download URL kesspy-0.4.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
6a964d54cbf60841045d3e99a0106302adf3aa0770755323003ef1c77c0d5aff
BLAKE2b-256 checksum
How to use checksums
86bc01eb220953df6482e7c19cb1645798a3c1a27743722dc4f89131f4c3cf19
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.4.0-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL kesspy-0.4.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
64633bdc8011b11f3ed955d8ff56b89713fcd1f5e9b3b47900bfb17964aed08b
BLAKE2b-256 checksum
How to use checksums
0fc762a60e17734d093d1804fa35b932b56cf6ebf3c64e6a6c2ec0fc46076c7b
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.4.0-cp310-abi3-macosx_11_0_arm64.whl

Download URL kesspy-0.4.0-cp310-abi3-macosx_11_0_arm64.whl
Size 244.8 kB
Tags CPython 3.10 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
01d1b0405ea2e4888ddacaaa0bf8e704a6934b39687a3d60f7636d2b7da43ac4
BLAKE2b-256 checksum
How to use checksums
2bc3f03cc71dde98ca2c5d5849ad388c10b696ffcac6438c83b39557444a2c3f
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.4.0-cp310-abi3-macosx_10_12_x86_64.whl

Download URL kesspy-0.4.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
a8324767650b898c92ecdd031f93c26ea9a224ea7af9b2a410ac8c9721994de3
BLAKE2b-256 checksum
How to use checksums
0a1f88f3052a0f6556fe7222b74fc8e11dbfa1f213c27c732f6a2effd6becd34
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.4.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.

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