Skip to main content

oplanet

Lightweight Python wrapper around the NASA Exoplanet Archive and the SVO database with practical helpers for stellar aliases, photometry, and system/planet properties.

This package is built to make exoplanet metadata easier to use in notebooks and scripts by exposing a simple object API and automatically selecting the most reliable published values.

Installation

pip install oplanet
python -m oplanet.setup

From GitHub

pip install "git+https://github.com/ProfesseurShadoko/oplanet.git"
python -m oplanet.setup

Quick examples

For a guided walkthrough with explanations and runnable cells, see examples.ipynb.

1. Resolve star names and aliases

from oplanet import parse_star_name, get_star_aliases

print(parse_star_name("TOI 1478"))
print(get_star_aliases("TOI 1478"))

2. Explore a system, its star, and its planets

from oplanet import NSystem

system = NSystem("LHS 1140")

print(system.star_name)
print(system.n_planets)

# Returns [value, err1, err2] when available,
# or [nan, upper_limit, lower_limit] when only limits exist
print(system.distance_pc)
print(system.star.age_myr)

print(system.b.mass_mjup)
print(system.b.orbital_period_yrs)

3. One-line import for common API

from oplanet import NSystem, get_star_aliases, get_photometry_jy, SFilter

4. Pretty-print helpers (display and print_column)

from oplanet import NSystem

system = NSystem("LHS 1140")

# Human-readable summary of system properties
system.display()

# Human-readable summary for star and a planet
system.star.display()
system.b.display()

Returned values

Most numeric property getters in the object API return a NumPy array with 3 entries:

  • value: best selected value
  • err_pos: positive uncertainty
  • err_neg: negative uncertainty

When no direct value is available and only limits are present, the returned array is:

  • nan, limit_upper, limit_lower

Examples:

system = NSystem("LHS 1140")

age = system.star.age_myr
distance = system.distance_pc

print(age)       # e.g. [value, err_pos, err_neg] or [nan, upper, lower]
print(distance)  # same convention

Data behavior

On import, the loader keeps a local CSV cache in oplanet/data, removes older archive snapshots, and refreshes stale files automatically. Filters retrieved from the SVO database are also stored locally.

Notes

  • Internet access is needed for Simbad/Vizier queries and first-time archive download.
  • The support for exoplanet.eu will be added once the database becomes more reliable and code friendly.

License

MIT

Metadata

Release files for oplanet 2.2.7

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

Source distribution (sdist)

Source distribution for oplanet 2.2.7
File Size Uploaded Provenance
oplanet-2.2.7.tar.gz 46.7 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for oplanet 2.2.7
File Interpreter ABI Platform
oplanet-2.2.7-py3-none-any.whl Python 3 none any Details

Total release size: 95.3 kB

Release files / oplanet-2.2.7.tar.gz

Download URL oplanet-2.2.7.tar.gz
Size 46.7 kB
Tags Source
SHA-256 checksum
How to use checksums
efd28e401edd4a8c8ec9b677537b8d1b759ddd0064d2cbacb54a40896bf4ebf3
BLAKE2b-256 checksum
How to use checksums
111709d37a1ac1c82c8cf778a6c97d9eb69fb7f10d41cad5a2920a522cabf1b1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.11

Release files / oplanet-2.2.7-py3-none-any.whl

Download URL oplanet-2.2.7-py3-none-any.whl
Size 48.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ec515c99e171180ea3b265063e7aecf2a4ff707eae80629480d37da77a314b2e
BLAKE2b-256 checksum
How to use checksums
4d95c997a7d4ca8345f07e3272c41ca1c0c4e2171e4b58ebf20ebcd67cee6769
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.11

Security for oplanet 2.2.7

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.

Release history Release notifications | RSS feed

This release

2.2.7 This release

2 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