Skip to main content

The python package satellitetle provides functions to fetch TLEs from various online sources (currently CelesTrak (SatNOGS), CalPoly and AMSAT) and allows using custom ones or Space-Track.org.

It was forked from the python package orbit.

Usage

Fetch TLEs for a single satellite from Celestrak:

from satellite_tle import fetch_tle_from_celestrak

norad_id_iss = 25544 # ISS (ZARYA)
print(fetch_tle_from_celestrak(norad_id_iss))

Fetch a large set of TLEs for a list of satllites from all available sources:

from satellite_tle import fetch_all_tles, fetch_latest_tles
norad_ids = [25544, # ISS (ZARYA)
             48274, # CSS (Tianhe)
             40043] # TIGRISAT

# Uses default sources and compares TLE set from each source and
# returns the latest one for each satellite
tles = fetch_latest_tles(norad_ids)

for norad_id, (source, tle) in tles.items():
    print('{:5d} {:23s}: {:23s}'.format(norad_id, tle[0], source))

# Uses default sources and returns the TLE sets from all source for
# each satellite
tles = fetch_all_tles(norad_ids)

for norad_id, tle_list in tles.items():
    for source, tle in tle_list:
        print('{:5d} {:23s}: {:23s}'.format(norad_id, tle[0], source))

# Defines custom sources
sources = [
    ('CalPoly','http://mstl.atl.calpoly.edu/~ops/keps/kepler.txt'),
    ('Celestrak (active)','https://celestrak.org/NORAD/elements/active.txt')
]

# Uses custom sources (fetch_all_tles can also be used with the same
# parameters)
tles = fetch_latest_tles(norad_ids, sources=sources)

for norad_id, (source, tle) in tles.items():
    print('{:5d} {:23s}: {:23s}'.format(norad_id, tle[0], source))

spacetrack_config= {
    'identity': 'my_username',
    'password': 'my_secret_password'
}

# Uses default sources and Space-Track.org (fetch_all_tles can also
# be used with the same parameters)
tles = fetch_latest_tles(norad_ids, spacetrack_config=spacetrack_config)

for norad_id, (source, tle) in tles.items():
    print('{:5d} {:23s}: {:23s}'.format(norad_id, tle[0], source))

# Uses only Space-Track.org (fetch_all_tles can also be used with the
# same parameters)
tles = fetch_latest_tles(norad_ids, sources=[], spacetrack_config=spacetrack_config)

for norad_id, (source, tle) in tles.items():
    print('{:5d} {:23s}: {:23s}'.format(norad_id, tle[0], source))

# Uses custom sources and Space-Track.org (fetch_all_tles can also be
# used with the same parameters)
tles = fetch_latest_tles(norad_ids, sources=sources, spacetrack_config=spacetrack_config)

for norad_id, (source, tle) in tles.items():
    print('{:5d} {:23s}: {:23s}'.format(norad_id, tle[0], source))

NOTE: fetch_latest_tles and fetch_all_tles download the TLE sets from all known sources, so they should only be used when fetching TLEs for a large set of satellites.

License

MIT

Metadata

Release files for satellitetle 0.18.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 satellitetle 0.18.0
File Size Uploaded
satellitetle-0.18.0.tar.gz 6.8 kB Details

Built distribution (wheel)

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

Total release size: 14.7 kB

Release files / satellitetle-0.18.0.tar.gz

Download URL satellitetle-0.18.0.tar.gz
Size 6.8 kB
Tags Source
SHA-256 checksum
How to use checksums
d80679b2ddd0adcf956be0b06946b50a54db226dc131e12b56d55b87e1181571
BLAKE2b-256 checksum
How to use checksums
08e0138e25158749559c6a1f72e444675bad06174e2985bebc92dfca3014bc59
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.12.1.2 requests/2.32.5 setuptools/80.9.0 requests-toolbelt/1.0.0 tqdm/4.67.1 CPython/3.9.12

Release files / satellitetle-0.18.0-py3-none-any.whl

Download URL satellitetle-0.18.0-py3-none-any.whl
Size 7.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d8cf46ea6631f7ee9688be66dc79002c0d38bca0bebf58376d8ccea66e7fe9d3
BLAKE2b-256 checksum
How to use checksums
c10ff9f188594eb1f4e6d1166e06443155c19d6972f088e4babeacb69fb99eb5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.12.1.2 requests/2.32.5 setuptools/80.9.0 requests-toolbelt/1.0.0 tqdm/4.67.1 CPython/3.9.12

Release history Release notifications | RSS feed

This release

0.18.0 This release

2 release files

0.17.1

2 release files

0.17.0

2 release files

0.16.1

2 release files

0.15.1

2 release files

0.11.1

2 release files

0.10.1

2 release files

0.9.0

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.1

2 release files

0.3.0

2 release files

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