Skip to main content

Data Commons CLI

Data Commons

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

  1. Initialize your project configuration and scaffold Terraform templates:

    datacommons admin init --project-id my-gcp-project --instance-name prod
    
  2. Change directories to the scaffolded directory (e.g. cd prod).

  3. Initialize and deploy your GCP infrastructure with Terraform:

    terraform init
    terraform apply
    
  4. Initialize and seed your Spanner database:

    datacommons admin init-db
    
  5. Trigger the data ingestion pipeline:

    datacommons admin ingest start
    

License: Apache-2.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

datacommons_cli-1.1.1.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

datacommons_cli-1.1.1-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file datacommons_cli-1.1.1.tar.gz.

File metadata

  • Download URL: datacommons_cli-1.1.1.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.0 {"installer":{"name":"uv","version":"0.12.0","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

Hashes for datacommons_cli-1.1.1.tar.gz
Algorithm Hash digest
SHA256 de4b19b6f59180328c74466bb0f47f3db29f3486e634f7470464eacf209b6390
MD5 9c4de736bf2d72a2dadabbd236ae2618
BLAKE2b-256 039fffeb2498cea4d12e4c59e329c81dfa942eac20f98cc47a403605d6f31442

See more details on using hashes here.

File details

Details for the file datacommons_cli-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: datacommons_cli-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.0 {"installer":{"name":"uv","version":"0.12.0","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

Hashes for datacommons_cli-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 abd168dee5f0a3c47713f69ff708a517938f138f7422d5bf8f94439d8c9bc36f
MD5 ae5e8c230f1eabcd3471c43e9fda84a3
BLAKE2b-256 942b30cd0fccdafab98a8e70239a83b4f121337d949da9f0fb811aad96d8ebf5

See more details on using hashes here.

Release history Release notifications | RSS feed

1.1.5

2 files

1.1.4

2 files

1.1.3

2 files

1.1.2

2 files

This release

1.1.1 This release

2 files

1.1.0

2 files

1.0.0

2 files

0.0.3

2 files

0.0.2

2 files

0.0.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page