A wrapper for the launchlibrary.net API
Project description
python-launch-library
A simple python wrapper for the Launch Library web API. Can also be used asynchronously too.
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
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.
Project details
Release history Release notifications | RSS feed
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
Close
Hashes for python-launch-library-0.6.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3d5d9f0bd0c0f2eb366aaae095c0687913d3bd9fd3c16c6c7d6792da942de8f9 |
|
MD5 | d112975a62a80b119b7a76b053d1fe67 |
|
BLAKE2b-256 | f57cfee8c55ec262c38e86afc6380b824f101447390864d3d43a7ff5e3069bd3 |
Close
Hashes for python_launch_library-0.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c783b5a945da3d52cba5b9a83a15dba4c40c8a779ae4b9e9145e2d0f476cf563 |
|
MD5 | 65fc551fadc0b37af2d422e101bba98b |
|
BLAKE2b-256 | 48027c57bb2a1d5f572d6af2c5f96981f6724e7f4de3a1a27697d64cfc1fcad7 |