Space Bodies is the library that powers Predict the Sky. It handles calculating space object positions and then combines that with weather data to tell you what you can see in the sky. The library is named after the primary class. Astronomical objects are sometimes called "bodies", thus the name.
All of the astronomical objects are provided from the same public interface, using a string which defines which ones are supported.
>>> import spacebodies >>> sb = SpaceBodies('forecast_key', 'spacetrack_username', 'spacetrack_password') >>> sb.next_events("iss", lat=50.7184, lon=-3.5339) ...
To install Space Bodies:
$ pip install spacebodies
spacebodies requires Python 2.7.
To determine both the Weather and Space Object positions, Space Bodies relies on two external services. The first is Forecast.io for local weather predictions and the second is Space Track, a Joint Space Operations Center project which exposes the position of a lot of known space objects.
When first configuring
SpaceBodies you'll want to provide these in the
initialiser (as shown above).
Supported Space Objects
All of these can be used as keys for
next_events (in lowercase form).
Man Made Objects
- Gienah Corvi
- Kaus Australis
- Arkab Prior
- Arkab Posterior
$ pip install -r requirements.txt $ python setup.py test
The tests look for the following environment variables:
FORECAST_KEY: An API key from Forecast.io
SPACETRACK_USERNAME: A username from Space Track
SPACETRACK_PASSWORD: A password for the username above.
- Check for open issues, or create a new one.
- Fork the repository, make your changes to master (or your own branch).
- Make sure it's got a test to cover it (and you don't break any others).
- Send a pull request and we'll make sure it gets merged.
But don't change any version numbers or any of the package metadata. But, do open an issue if it's wrong!
- Nick Charlton <email@example.com> is the primary maintainer and setup the package and plugin system.
- Emma Hibling did all the actual smart bits.