Skip to main content

python-launch-library

A simple python wrapper for the Launch Library web API. Can also be used asynchronously too.

PyPI Version Documentation Status

Available models: Agency, AgencyType, Launch, Launch Status, Pad, Location, Rocket, RocketFamily

The usage of the API is simple.

Usage

Proper documentation is available in Read The Docs.

To install, simply use pip: pip install python-launch-library

# Import the launchlibrary lib
import launchlibrary as ll

# Create an instance of the API
api = ll.Api()  # You can also specify api url, api version...

# And request the next 5 launches, for example.
launches = ll.Launch.fetch(api, next=5) # Any argument after "api" is not constrained (w/ kwargs).
# ^ Returns a list of launch objects.

# You can fetch the pythonic property names by using launch.param_names
properties = launches[0].param_names

# It's now possible to also use the regular API names as well as pythonic names.
vid_urls = launches[0].vid_urls
vid_urls_2 = launches[0].vidURLs

Changelog

  • 1.0 - Changed all fetch calls to be through the Api object. This is a breaking change.

    import launchlibrary as ll
    api = ll.Api()
    
    # Before
    next_launch = ll.Launch.next(api, 1)
    
    # After
    next_launch = api.next_launches(1)
    

Todo

  • Tidy up the repository
  • Add exceptions to handle server timeout
  • Handle nested models (i.e. a Pad model inside a Location model inside a Launch model)
  • Handle times with the datetime class
  • Package properly and upload to PyPI
  • Add more abstraction methods for the api calls (open to suggestions)
  • Add magic method comparisons (open to suggestions)
  • Asynchronous operation
  • Add aliases for actual API names with getattr
  • Add tests
  • Your suggestion here

Feel free to open issues and pull requests! I usually check Github daily.

Metadata

Release files for python-launch-library 1

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

Source distribution (sdist)

Source distribution for python-launch-library 1
File Size Uploaded Provenance Actions
python-launch-library-1.tar.gz 10.1 kB Without provenance Details for python-launch-library-1.tar.gz

Release files / python-launch-library-1.tar.gz

Download URL python-launch-library-1.tar.gz
Size 10.1 kB
Tags Source
SHA-256 checksum
How to use checksums
72bb903b580ae8fc8f371ffc86234806d99b21f780d2f5da799ac34acaf25894
BLAKE2b-256 checksum
How to use checksums
87b499555f2adbde904ddc41805b850837db4be49a07158bcc76355574d94687
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.1.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3

Security for python-launch-library 1

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