We are pleased to announce the general availability of the Python client library for the Data Commons API V2. This client library wraps the REST API V2 that was launched in late 2023.
In addition to full support for the REST API, the library delivers several new benefits – most importantly, support for custom Data Commons instances. You can now send Python API queries to any public or private Data Commons instance, hosted locally or in the cloud! You can read more about all the powerful new features in the Google for Developers blog.
Since the V1 API is slated for deprecation, we encourage all Python users to upgrade to the new library:
- Download and install the library package from PyPi.
- Get started with the Google Colab notebook tutorials.
- Consult the full reference documentation.
The library was developed in partnership with, and in large part by, The One Campaign, a global NGO that makes its data available for public use through a custom Data Commons instance. It’s a great example of the power of open-source software.
The open-source code for the library is available in our Github repository. We encourage contributions from the community, under the Google Contributor License Agreement.