{"id":35546663,"url":"https://github.com/behrouzz/astrobook","last_synced_at":"2026-01-04T06:04:11.626Z","repository":{"id":250548393,"uuid":"834780888","full_name":"behrouzz/astrobook","owner":"behrouzz","description":"Educational tools for the astronomical book","archived":false,"fork":false,"pushed_at":"2024-08-07T18:25:59.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-27T14:48:29.427Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/behrouzz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-28T10:44:44.000Z","updated_at":"2024-08-07T18:26:02.000Z","dependencies_parsed_at":"2024-08-07T21:44:06.430Z","dependency_job_id":null,"html_url":"https://github.com/behrouzz/astrobook","commit_stats":null,"previous_names":["behrouzz/astrobook"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/behrouzz/astrobook","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/behrouzz%2Fastrobook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/behrouzz%2Fastrobook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/behrouzz%2Fastrobook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/behrouzz%2Fastrobook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/behrouzz","download_url":"https://codeload.github.com/behrouzz/astrobook/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/behrouzz%2Fastrobook/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28198687,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2026-01-04T02:00:06.065Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-04T06:02:25.351Z","updated_at":"2026-01-04T06:04:07.129Z","avatar_url":"https://github.com/behrouzz.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"**Author:** [Behrouz Safari](https://behrouzz.github.io/)\u003cbr/\u003e\n**License:** [MIT](https://opensource.org/licenses/MIT)\u003cbr/\u003e\n\n# astrobook\n*Educational tools for the astronomical book*\n\n\n## Installation\n\nInstall the latest version:\n\n    pip install astrobook\n\nRequirements are *numpy*, *pandas*, and *requests*.\n\n\n## Examples\n\n\n```python\nfrom astrobook import sql2df\n\n# Retrieve data from SIMBAD\ndf = sql2df('SELECT TOP 10 main_id, ra, dec FROM basic', api='simbad')\n\n# Retrieve data from VizieR\ndf = sql2df('SELECT objID, gmag, zsp FROM \"V/154/sdss16\"', api='vizier')\n\n# Retrieve data from Gaia DR3\ndf = sql2df('SELECT TOP 10 source_id, ra, dec FROM gaiadr3.gaia_source', api='gaia')\n```\n\n### Get tables in a database\n\nHere we get name, description and number of rows of tables from IRSA database\n\n\n```python\nfrom astrobook import sql2df\n\nquery = \"\"\"\nSELECT table_name, description, irsa_nrows\nFROM TAP_SCHEMA.tables\nWHERE irsa_nrows IS NOT NULL\nORDER BY irsa_nrows DESC\n\"\"\"\n\ndf = sql2df(query, api='irsa')\n```\n\n### Get columns of a table\n\nLet's get columns of the table *basic* from SIMBAD\n\n```python\nfrom astrobook import sql2df\n\nquery = \"\"\"\nSELECT column_name, description\nFROM TAP_SCHEMA.columns\nWHERE table_name='basic'\n\"\"\"\n\ndf = sql2df(query, api='simbad')\n```\n\n\nSee more at [behrouzz.github.io/astrodatascience](https://behrouzz.github.io/astrodatascience/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbehrouzz%2Fastrobook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbehrouzz%2Fastrobook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbehrouzz%2Fastrobook/lists"}