Data Commons CLI
Project description
Data Commons CLI
Standard command-line interface for interacting with, deploying, and administering the Data Commons Platform.
Data Commons is an open-source project initiated by Google that aggregates data from hundreds of public sources, such as the US Census, Eurostat, CDC, and UN, into a unified, standard Knowledge Graph.
The Data Commons Platform provides the infrastructure to run your own private instance of Data Commons, allowing you to seamlessly combine public datasets with your own custom, private data using modern APIs, graph query engines, and visualization dashboards.
Installation
Install the Data Commons CLI using pip or uv:
Install with pip
pip install --user datacommons-cli
If the datacommons command is not found after installing, add Python's user-binary directory to your PATH:
export PATH="$PATH:$(python3 -m site --user-base)/bin"
Install with uv
uv tool install datacommons-cli
If the datacommons command is not found after installing, add the appropriate directory to your PATH:
export PATH="~/.local/bin:$PATH"
With uvx
Or execute datacommons-cli on-the-fly without installation using uvx:
uvx datacommons-cli --help
Help & Documentation
For full documentation, tutorials, and deployment guides, visit: 👉 docs.datacommons.org
Usage
The CLI exposes standard operations under the main datacommons entrypoint. You can check the version and get help instantly:
# Show help menu
datacommons --help
# Show version
datacommons --version
Administrative Commands
All infrastructure setup, database operations, and ingestion pipelines are managed under the admin sub-command group:
datacommons admin [COMMAND] --help
Available Commands
| Command | Description |
|---|---|
init |
Scaffolds a localized Terraform configuration to deploy the Data Commons Platform on Google Cloud Platform (GCP). |
init-db |
Configures database schemas and seeds baseline tables on GCP Spanner via the Ingestion Helper service. |
seed-db |
Re-runs or updates base geographic and schema seeds on GCP Spanner. |
ingest start |
Triggers a Cloud Run + Cloud Workflows background data ingestion pipeline to import your custom datasets. |
ingest show-config |
Prints current background ingestion parameters, GCS bucket paths, and active GCP credentials. |
Quickstart: Scaffolding a Private Data Commons
-
Initialize your project configuration and scaffold Terraform templates:
datacommons admin init --project-id my-gcp-project --namespace prod
-
Change directories to the scaffolded directory (e.g.
cd prod). -
Initialize and deploy your GCP infrastructure with Terraform:
terraform init terraform apply
-
Initialize and seed your Spanner database:
datacommons admin init-db
-
Trigger the data ingestion pipeline:
datacommons admin ingest start
License: Apache-2.0
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file datacommons_cli-1.1.0.tar.gz.
File metadata
- Download URL: datacommons_cli-1.1.0.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.23 {"installer":{"name":"uv","version":"0.11.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b0a178c4ec752804b11356805e8acc9deb3e030e20e3dd4af07b40fedc91ad1e
|
|
| MD5 |
04f5fe8c69cf4844b85c420c6d838428
|
|
| BLAKE2b-256 |
b6572b3637121a5e3d02d7732152a5237eca4eb80c5213571e888c1902646886
|
File details
Details for the file datacommons_cli-1.1.0-py3-none-any.whl.
File metadata
- Download URL: datacommons_cli-1.1.0-py3-none-any.whl
- Upload date:
- Size: 4.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.23 {"installer":{"name":"uv","version":"0.11.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cf5f2070c1d9af056746b0e7feb7477c704124b60a28440cbe0598d37e93ffff
|
|
| MD5 |
4f295d4ba71266586acc802db8a44bb8
|
|
| BLAKE2b-256 |
182bd75263e57d5ca77b96d6f93e5d7bfc8366689e58745da4f610d0fd6c99d6
|