WIP
to run the docs use
sphinx-autobuild -a docs/source docs/_build/html
aiohttp
aiofiles
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_video
property on AstronomyPicture (based onmedia_type
)Add support for thecount
query parameter on/planetary/apod
endpoint to get multiple random image- Solve typing issues with
typing.overload
s onclient.py
- Support other endpoints
Add async client & methods- Add logging
Add docs :)- Add developing tools
- Add workflows on github