Installation

Requirements

mpcq requires Python 3.11 or later (< 3.13). The package has the following core dependencies:

  • google-cloud-bigquery

  • pyarrow

  • numpy

  • astropy

  • adam-core

Installing mpcq

You can install mpcq using pip:

pip install mpcq

Google Cloud Setup

To use mpcq, you’ll need to:

  1. Create a Google Cloud Platform account if you don’t have one

  2. Create a new project or select an existing one

  3. Enable the BigQuery API for your project

  4. Subscribe to the MPC datasets through Analytics Hub:

    1. Visit the Main MPC Dataset listing and subscribe

    2. Note the dataset ID from your subscription

  5. Set up authentication:

An easy way is to use Application Default Credentials:

gcloud auth application-default login

Using the Client

After setting up authentication and subscribing to the dataset, you can initialize the client:

from mpcq.client import BigQueryMPCClient

client = BigQueryMPCClient(dataset_id="your_subscribed_main_dataset_id")

Cost Considerations

Queries to the BigQuery dataset will be billed according to your Google Cloud Platform account’s BigQuery pricing. BigQuery offers a free tier, but the limits are too low for users that plan to be running more than tens of queries per month.

For more details on pricing and cost management, see Pricing and Free Tier.

Development Installation

For development, you can install mpcq from source. We use pdm to manage dependencies and tooling.

git clone https://github.com/B612-Asteroid-Institute/mpcq.git
cd mpcq
pdm install -G dev