Skip to main content

Orbital element database management tool

Project description

Orbitable

Orbital element database manager. Ingests TLE (Two-Line Element) and OMM (Orbit Mean-Elements Message) files into a database and generates organized output files by date and satellite.

Installation

pip install orbitable

# For MariaDB/MySQL support:
pip install orbitable[mysql]

Or with uv:

uv add orbitable

Quick Start

1. Scaffold configuration

orbitable init

This creates two files:

  • ./config.toml -- main configuration (database, ingest sources, output settings)
  • ~/.config/orbitable.toml -- user-local database credentials

Use -c to specify a different config path:

orbitable -c /etc/orbitable/config.toml init

2. Configure

Edit config.toml to set your database and ingest sources. The generated file is fully commented -- see below for a summary.

SQLite (default):

[database]
drivername = "sqlite"
name = "orbitable.db"

MariaDB/MySQL:

[database]
drivername = "mysql+pymysql"
host = "localhost"
port = 3306
name = "orbitable"
secrets_file = "/etc/orbitable/secrets.toml"

Then add your credentials to ~/.config/orbitable.toml:

username = "myuser"
password = "mypassword"

3. Ingest TLE/OMM files

Scan configured source directories:

orbitable ingest

Or ingest specific files:

orbitable ingest /path/to/20260327.tle /path/to/20260327.json

File format is auto-detected by extension:

Extension Format
.tle, .txt, .3le Two-Line Element
.json Space-Track OMM JSON
.csv OMM CSV
.xml OMM XML

Ingestion is idempotent -- duplicate records are silently skipped.

4. Generate output files

orbitable generate

This produces files in the configured output directory:

  • Date files (YYYYMMDD.tle / YYYYMMDD.omm) -- one TLE per satellite for each date (latest epoch that day)
  • Object files (25544.tle / 25544.omm) -- all TLEs for a single satellite, ordered by epoch

Automating with Cron

Orbitable is designed to run via cron rather than as a long-running service. Both ingest and generate are idempotent and safe to re-run.

Ingest and generate every 4 hours:

0 */4 * * * orbitable -c /etc/orbitable/config.toml ingest && orbitable -c /etc/orbitable/config.toml generate

Ingest hourly, generate once daily at 03:00 UTC:

0 * * * * orbitable -c /etc/orbitable/config.toml ingest
0 3 * * * orbitable -c /etc/orbitable/config.toml generate

With logging to a file:

0 */4 * * * orbitable -c /etc/orbitable/config.toml ingest >> /var/log/orbitable.log 2>&1 && orbitable -c /etc/orbitable/config.toml generate >> /var/log/orbitable.log 2>&1

Credential Resolution

Database credentials are resolved in priority order:

  1. Environment variables -- ORBITABLE_DATABASE__USERNAME / ORBITABLE_DATABASE__PASSWORD
  2. User secrets file -- ~/.config/orbitable.toml
  3. System secrets file -- path set via secrets_file in config.toml
  4. config.toml values -- not recommended for credentials

For cron jobs, either use the user secrets file or export environment variables in the crontab:

ORBITABLE_DATABASE__USERNAME=myuser
ORBITABLE_DATABASE__PASSWORD=mypassword
0 */4 * * * orbitable -c /etc/orbitable/config.toml ingest && orbitable -c /etc/orbitable/config.toml generate

CLI Reference

orbitable [-c CONFIG] COMMAND

Commands:
  init       Scaffold config.toml and ~/.config/orbitable.toml
  ingest     Ingest TLE/OMM files into the database
  generate   Generate output TLE/OMM files from the database

Options:
  -c, --config PATH   Path to config.toml (default: ./config.toml)

Configuration Reference

[database]

Field Default Description
drivername "sqlite" SQLAlchemy driver (sqlite, mysql+pymysql)
name ":memory:" Database name or file path
host Database host
port Database port
username Database username (prefer secrets file)
password Database password (prefer secrets file)
secrets_file Path to a TOML file with username/password

[[ingest.sources]]

Field Default Description
path Directory to scan for files
pattern "*.tle" Glob pattern for matching files

[output]

Field Default Description
dir "./output" Output directory

[output.formats]

Field Default Description
tle true Generate .tle output files
omm true Generate .omm (CSV) output

[output.types]

Field Default Description
date_files true YYYYMMDD files with latest TLE per satellite
object_files true Per-satellite files with all TLEs ordered by epoch

[logging]

Field Default Description
level "INFO" Log level: DEBUG, INFO, WARNING, ERROR, CRITICAL

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

orbitable-0.2.0.tar.gz (12.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

orbitable-0.2.0-py3-none-any.whl (15.3 kB view details)

Uploaded Python 3

File details

Details for the file orbitable-0.2.0.tar.gz.

File metadata

  • Download URL: orbitable-0.2.0.tar.gz
  • Upload date:
  • Size: 12.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","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}

File hashes

Hashes for orbitable-0.2.0.tar.gz
Algorithm Hash digest
SHA256 e8fb93604001ac74a5ff1cf70ab8cf21d9c15e270a8f62774d214aff98473d92
MD5 e1cba7d4ea42365677a12b2b1c1ed02f
BLAKE2b-256 b737c8bbf1cecf50d46a957e0c14b129cfc82539e2c492b6bb9a1ac63ef91a75

See more details on using hashes here.

File details

Details for the file orbitable-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: orbitable-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 15.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","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}

File hashes

Hashes for orbitable-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 641bc8599b0104948a02eddd9a0f72c77641ebcf41ff965e73cdfdf5b694270f
MD5 e179911d6a1b1c96b74e4950e6993631
BLAKE2b-256 94775ab48b2a919363a982bef0e8e90c7eeef5c525d13e5ebf7fda48ac679e84

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page