This release is a pre-release and may not be stable for production use.
nasa.py
Work in progressto run the docs use
sphinx-autobuild -a docs/source docs/_build/html --watch nasa --open-browser
Demo
APOD
EPIC
Installation
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
.. code-block:: text
pip install git+https://github.com/Snipy7374/nasa.py
Requirements
.. code-block:: text
aiohttp
aiofiles
requests
Basic usage
Create a client object
.. code-block:: python3
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
.. code-block:: python3
astronomy_picture: AstronomyPicture = client.get_astronomy_picture()
save an image
.. code-block:: python3
astronomy_picture.image.save("image.png")
This library also supports Async requests
.. code-block:: python3
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")
Currently supported NASA API endpoints
- APOD (Astronomy picture of the day) -
/planetary/apod- (all query parameters) - EPIC (Earth Polychromatic Imaging Camera) -
/EPIC/api- (all)
TODO
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
- Mars rover photos
- NASA image and video library
Add async client & methodsAdd loggingAdd docs :)- Add developing tools
- nox
- pyright
- black
- flake8
- pre-commit
- Add workflows on github
- typing check
- flake8
- black
- Create the first release
- Add package configuration to publish on pypi (pyproject.toml)
- Upload the project on PyPi
- Customize the docs
- add custom colors
- Add examples
- upload on github
- docs: improve the structure of payloads and add Dev docs
- docs: add contributing section
Metadata
Release files for nasasync 0.0.2a0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| nasasync-0.0.2a0.tar.gz | 3.4 MB | Without provenance | Details for nasasync-0.0.2a0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nasasync-0.0.2a0-py3-none-any.whl | Python 3 | none | any | Details for nasasync-0.0.2a0-py3-none-any.whl |
Total release size: 3.4 MB
Release files / nasasync-0.0.2a0.tar.gz
| Download URL | nasasync-0.0.2a0.tar.gz |
|---|---|
| Size | 3.4 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
39477ee3fe68923897229b2a18549f988c5a1a6838e95a65fa785c157cebb809
|
|
BLAKE2b-256 checksum How to use checksums |
2ab10307e7083043adf9157836813645d20b96bf4fa10723fb2322ac5d819ddd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.9
|
Release files / nasasync-0.0.2a0-py3-none-any.whl
| Download URL | nasasync-0.0.2a0-py3-none-any.whl |
|---|---|
| Size | 17.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c401fda32acb4bae8365ab082e4eb7ffeef05175a365256a91c2e6c6b10cece3
|
|
BLAKE2b-256 checksum How to use checksums |
b21125f0bc70f414ee7a662488abc526256d13e134d12049d8c0699d4a9b05f9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.9
|
Security for nasasync 0.0.2a0
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.