Installation
Requirements
mpcq requires Python 3.11 or later (< 3.13). The package has the following core dependencies:
google-cloud-bigquerypyarrownumpyastropyadam-core
Installing mpcq
You can install mpcq using pip:
pip install mpcq
Google Cloud Setup
To use mpcq, you’ll need to:
Create a Google Cloud Platform account if you don’t have one
Create a new project or select an existing one
Enable the BigQuery API for your project
Subscribe to the MPC datasets through Analytics Hub:
Visit the Main MPC Dataset listing and subscribe
Note the dataset ID from your subscription
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