to run the docs use
sphinx-autobuild -a docs/source docs/_build/html --watch nasa
Currently the package is not available on pypi, this means that you can't install it using just pip.
To install Nasa.py you need to install git and to run this command
pip install git+https://github.com/Snipy7374/nasa.py
aiohttp
aiofiles
requests
Create a client object
import typing as t
from nasa import NasaSyncClient
if t.TYPE_CHECKING:
from nasa import AstronomyPicture
client = NasaSyncClient(token="TOKEN_HERE")get the todays astronomy picture
astronomy_picture: AstronomyPicture = client.get_astronomy_picture()save an image
astronomy_picture.image.save("image.png")This library also supports Async requests
import typing as t
from nasa import NasaAsyncClient
if t.TYPE_CHECKING:
from nasa import AstronomyPicture
client = NasaAsyncClient(token="TOKEN_HERE")
async def main():
async with client:
astronomy_picture: AstronomyPicture = await client.get_astronomy_picture()
await astronomy_picture.image.save("image.png")- APOD (Astronomy picture of the day) -
/planetary/apod- (all query parameters)
Addis_videoproperty on AstronomyPicture (based onmedia_type)Add support for thecountquery parameter on/planetary/apodendpoint to get multiple random imageSolve typing issues withtyping.overloads onclient.py- Support other endpoints
Add async client & methods- Add logging
Add docs :)- Add developing tools
- Add workflows on github
- Create the first release
- Upload the project on PyPi
- Customize the docs
- Add examples
