No project description provided
Project description
Quick Spice Manager
Documentation: https://luca-penasa.github.io/quick-spice-manager
Source Code: https://github.com/luca-penasa/quick-spice-manager
PyPI: https://pypi.org/project/quick-spice-manager/
quick-spice-manager provides a straightforward way to download, cache, and load ESA SPICE kernels for use with planetary-coverage. The core of the library is an FTP-based download engine that fetches kernels directly from the ESA public FTP server (spiftp.esac.esa.int) with parallel transfers and progress reporting. On top of that, SpiceManager wraps planetary_coverage.TourConfig to handle metakernel resolution, local caching, and environment-based overrides — so you can get a loaded kernel set in a single line.
Supported missions include JUICE, SOLAR-ORBITER, BEPICOLOMBO, MARS-EXPRESS, ROSETTA, and many more.
Installation
pip install quick-spice-manager
Usage
Basic usage
from quick_spice_manager import SpiceManager
# Downloads kernels automatically from the ESA FTP server and loads them.
# Kernels are cached in the platform user-cache directory and reused on
# subsequent calls — no re-download unless the cache is cleared.
sm = SpiceManager(spacecraft="JUICE", mk="plan")
# Access the underlying planetary_coverage.TourConfig
tc = sm.tour_config
# Inspect coverage timestamps, compute geometry, etc.
print(tc.coverage)
Listing available metakernels
sm = SpiceManager(spacecraft="JUICE")
print(sm.metakernels) # e.g. ['plan', 'ops', ...]
Inspecting the current configuration
# Returns a pandas DataFrame — renders as a table in Jupyter
print(sm.config)
Cache management
print(sm.cache_size) # human-readable size of the kernel cache
sm.clear_cache() # delete cached kernels (will re-download on next use)
Using a local metakernel
Pass an absolute path to an existing .tm file to skip FTP resolution:
sm = SpiceManager(
spacecraft="JUICE",
mk="/path/to/my_local.tm",
kernels_dir="/path/to/kernels",
)
tc = sm.tour_config
Environment variable overrides
Two environment variables (readable from a .env file in the working directory) let you override the FTP-based workflow without changing code:
| Variable | Effect |
|---|---|
SPICE_METAKERNEL |
Path to a local metakernel file. Disables automatic FTP download. |
SPICE_DIRECTORY |
Directory containing the kernel files referenced by the metakernel. |
# .env
SPICE_METAKERNEL=/data/kernels/juice_ops.tm
SPICE_DIRECTORY=/data/kernels
Supported missions
The FTP downloader supports the following ESA missions (case-insensitive, common aliases accepted):
| Mission | Accepted names |
|---|---|
| BepiColombo | BEPICOLOMBO, MPO, MTM, MMO |
| Comet Interceptor | COMET-INTERCEPTOR |
| EnVision | ENVISION |
| ExoMars 2016 | EXOMARS2016, TGO, EDM |
| ExoMars RSP | EXOMARSRSP |
| Gaia | GAIA |
| Hera | HERA |
| Huygens | HUYGENS, CASP |
| INTEGRAL | INTEGRAL |
| JUICE | JUICE |
| JWST | JWST |
| Mars Express | MARS-EXPRESS, MEX, BEAGLE2 |
| Rosetta | ROSETTA |
| SMART-1 | SMART-1 |
| Solar Orbiter | SOLAR-ORBITER, SOLO |
| Venus Express | VENUS-EXPRESS, VEX |
Logging
Logging is disabled by default. Enable it for debugging:
from quick_spice_manager import log_enable, log_enable_debug
log_enable() # INFO level
log_enable_debug() # DEBUG level
Development
- Clone this repository
- Requirements:
- uv
- Python 3.10+
- Create a virtual environment and install the dependencies
uv sync
Testing
uv run pytest
Documentation
The documentation is automatically generated from the content of the docs directory and from the docstrings of the public signatures of the source code. The documentation is updated and published as a Github Pages page automatically as part each release.
Releasing
Manual release
Releases are done with the command, e.g. incrementing patch:
uv run just bump patch
# also push, of course:
git push origin main --tags
this will update the changelog, commit it, and make a corresponding tag.
as the CI is not yet configured for publish on pypi it can be done by hand:
uv build
uv publish --build path/to/wheel
Automatic release - to be fixed
Trigger the Draft release workflow (press Run workflow). This will update the changelog & version and create a GitHub release which is in Draft state.
Find the draft release from the GitHub releases and publish it. When a release is published, it'll trigger release workflow which creates PyPI release and deploys updated documentation.
Updating with copier
To update the skeleton of the project using copier:
uvx copier update --defaults
Pre-commit
Pre-commit hooks run all the auto-formatting (ruff format), linters (e.g. ruff and mypy), and other quality
checks to make sure the changeset is in good shape before a commit/push happens.
You can install the hooks with (runs for each commit):
pre-commit install
Or if you want them to run only for each push:
pre-commit install -t pre-push
Or if you want e.g. want to run all checks manually for all files:
pre-commit run --all-files
This project was generated using a fork of the wolt-python-package-cookiecutter template.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file quick_spice_manager-0.1.3.tar.gz.
File metadata
- Download URL: quick_spice_manager-0.1.3.tar.gz
- Upload date:
- Size: 19.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.10 {"installer":{"name":"uv","version":"0.10.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Manjaro Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2ca9ae0091d8ac14f4420c52d67dbd73a8119c50b3ef0ecef7d949a5ecf22a4b
|
|
| MD5 |
bcd4538da2c6c9b69c0973f9c0c84c68
|
|
| BLAKE2b-256 |
b5ae595b6903d4080ddab6aa1b42aab16c2d34d9be344cf9b9daa243f498111e
|
File details
Details for the file quick_spice_manager-0.1.3-py3-none-any.whl.
File metadata
- Download URL: quick_spice_manager-0.1.3-py3-none-any.whl
- Upload date:
- Size: 21.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.10 {"installer":{"name":"uv","version":"0.10.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Manjaro Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f83ff4fff55abf3a93a808a7bd62e4cae756c740932121dccd39f4f24e6f0c6f
|
|
| MD5 |
939518a4a8ce1dc6be2ff2436fe30093
|
|
| BLAKE2b-256 |
2bd0257e9f5e8388bceac5c871ce11bceba54606744f17e94667c725a19675ef
|