Author: Behrouz Safari
License: MIT
astrobook
Educational tools for the astronomical book
Installation
Install the latest version:
pip install astrobook
Requirements are numpy, pandas, and requests.
Examples
from astrobook import sql2df
# Retrieve data from SIMBAD
df = sql2df('SELECT TOP 10 main_id, ra, dec FROM basic', api='simbad')
# Retrieve data from VizieR
df = sql2df('SELECT objID, gmag, zsp FROM "V/154/sdss16"', api='vizier')
# Retrieve data from Gaia DR3
df = sql2df('SELECT TOP 10 source_id, ra, dec FROM gaiadr3.gaia_source', api='gaia')
Get tables in a database
Here we get name, description and number of rows of tables from IRSA database
from astrobook import sql2df
query = """
SELECT table_name, description, irsa_nrows
FROM TAP_SCHEMA.tables
WHERE irsa_nrows IS NOT NULL
ORDER BY irsa_nrows DESC
"""
df = sql2df(query, api='irsa')
Get columns of a table
Let's get columns of the table basic from SIMBAD
from astrobook import sql2df
query = """
SELECT column_name, description
FROM TAP_SCHEMA.columns
WHERE table_name='basic'
"""
df = sql2df(query, api='simbad')
See more at behrouzz.github.io/astrodatascience
Metadata
Release files for astrobook 0.0.3
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 | |
|---|---|---|---|---|
| astrobook-0.0.3.tar.gz | 3.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| astrobook-0.0.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.9 kB
Release files / astrobook-0.0.3.tar.gz
| Download URL | astrobook-0.0.3.tar.gz |
|---|---|
| Size | 3.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d3b4e665830412c158e058514ce44d28d75baa8206af8e619cf106c6a21e2e3d
|
|
BLAKE2b-256 checksum How to use checksums |
aa451891e0fde634ad3748bb2b557462ff815b51e136b7c5d7f590c7a368fdab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.9.7
|
Release files / astrobook-0.0.3-py3-none-any.whl
| Download URL | astrobook-0.0.3-py3-none-any.whl |
|---|---|
| Size | 3.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
272b8d9a5e581bd4220361a6f846c05dcda961f4b0348ebe7ba0b0d56ea6be76
|
|
BLAKE2b-256 checksum How to use checksums |
f52bac9cbe322e9ec8f05fae4d5427ae76e868ac00b442cb01e966f87de47e1e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.9.7
|
Security for astrobook 0.0.3
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.