mpcq
A Python package by the Asteroid Institute, a program of the B612 Foundation
mpcq is a powerful Python client library for querying and analyzing Minor Planet Center (MPC) data through Google BigQuery. This package provides efficient access to a BigQuery instance of the Small Bodies Node (SBN) replica of the MPC's Small Bodies Node database, maintained by the Asteroid Institute.
Features
- BigQuery Integration: Direct access to a complete replica of the MPC database through Google BigQuery
- Efficient Queries: Optimized query patterns for common asteroid data access patterns
- Rich Data Access: Query observations, orbits, submission history, and more
- Cross-Matching: Tools for matching observations and finding duplicates
- ADES Support: Integration with ADES format for modern asteroid data exchange
BigQuery Dataset Access
The Asteroid Institute maintains a BigQuery replica of the Minor Planet Center's Small Bodies Node database. The dataset is available through Google Cloud's Analytics Hub:
To access the dataset, you'll need:
- A Google Cloud Platform account
- BigQuery API access enabled
- Subscription to the Analytics Hub listing
- Google Cloud credentials configured
Queries will be billed according to your Google Cloud Platform account's BigQuery pricing.
Installation
pip install mpcq
Published MPCQ 0.4.0 supports Python 3.11–3.12. The reviewed MPCQ 0.5.0 release
line supports CPython 3.11–3.14 against public adam-core 0.8 wheels in one
uniform compatibility matrix. The existing 0.4.0 artifacts remain immutable;
0.5.0 is published only by promoting the exact accepted wheel and source
distribution from the protected, manually enabled release workflows.
Quick Start
from mpcq.client import BigQueryMPCClient
# Initialize client with your subscribed dataset ID
client = BigQueryMPCClient(dataset_id="your_subscribed_main_dataset_id")
# Query observations for a specific object
observations = client.query_observations(["2013 RR165"])
# Use an ADES-compatible observation payload (expanded ADES fields)
ades_observations = client.query_observations(
["2013 RR165"],
column_mode="ades",
limit=1000,
)
# Convert to pandas DataFrame for analysis
from mpcq.utils import observations_to_dataframe
df = observations_to_dataframe(observations)
print(df.head())
Advanced Usage
Query Submission History
# Get submission history for an object
submissions = client.query_submission_history(["2013 RR165"])
Cross-Match Observations
# Cross-match ADES observations with MPC database
matched = client.cross_match_observations(
ades_observations,
obstime_tolerance_seconds=30,
arcseconds_tolerance=2.0
)
Find Duplicates
# Find potential duplicate observations
duplicates = client.find_duplicates(
"2013 RR165",
obstime_tolerance_seconds=30,
arcseconds_tolerance=2.0
)
Documentation
For complete documentation, including detailed API reference and examples, visit our ReadTheDocs page.
BigQuery Dataset Schema
The dataset (moeyens-thor-dev.mpc_sbn_aurora) contains several key tables:
public_obs_sbn: Primary observations tablepublic_current_identifications: Current object identificationspublic_numbered_identifications: Numbered asteroid identificationspublic_orbits: Orbital elements
You can explore these tables and their schemas directly in the BigQuery Console.
Contributing
We welcome contributions! Please see our Contributing Guide for details.
License
This project is licensed under the MIT License - see the LICENSE.md file for details.
Acknowledgments
The Asteroid Institute acknowledges the Minor Planet Center and the Small Bodies Node for their invaluable work in maintaining the authoritative small bodies database.
Metadata
Release files for mpcq 0.5.0
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 |
|---|---|---|---|---|
| mpcq-0.5.0.tar.gz | 87.4 kB | With provenance | Details for mpcq-0.5.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mpcq-0.5.0-py3-none-any.whl | Python 3 | none | any | Details for mpcq-0.5.0-py3-none-any.whl |
Total release size: 164.7 kB
Release files / mpcq-0.5.0.tar.gz
| Download URL | mpcq-0.5.0.tar.gz |
|---|---|
| Size | 87.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cf8d4325152853d17465267e554288aa59bdf07ccacbe5ff89552d1e5d614e91
|
|
BLAKE2b-256 checksum How to use checksums |
b0a056b5be5156439290941923960c3e94a91e2a21f9f853f72a49e9a3871ceb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.
Transparency logRelease files / mpcq-0.5.0-py3-none-any.whl
| Download URL | mpcq-0.5.0-py3-none-any.whl |
|---|---|
| Size | 77.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d8a48554dbd58224e94d2daf19ffc38ba339e635df88b595d5da9978b01557e6
|
|
BLAKE2b-256 checksum How to use checksums |
16960dcf2497eddab8554b1142adfc31e00cc79304888ebebd0df2c96f615abb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.
Transparency logSecurity for mpcq 0.5.0
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for mpcq-0.5.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.
Transparency logA 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.