A library to access Data Commons Python API.
Project description
Data Commons Python API
This is a Python library for accessing data in the Data Commons Graph. To get started, install this package from pip.
pip install datacommons
Once the package is installed, import datacommons
.
import datacommons as dc
If you would like to provide an API key, follow the steps in Setting up access to the Data Commons API, add the following line to your code:
dc.set_api_key('YOUR-API-KEY')
Data Commons does not charge users, but uses the API key for understanding API usage.
For more detail on getting started with the API, please visit our API Overview.
After you're ready to use the API, you can refer to datacommons/examples
for
examples on how to use this package to perform various tasks. More tutorials and
documentation can be found at tutorials!
About Data Commons
Data Commons is an open knowledge repository that provides a unified view across multiple public data sets and statistics. You can view what datasets are currently ingested and browse the graph using our browser.
License
Apache 2.0
Development
The Python API currently supports python>=2.7
.
To test, run:
$ ./run_tests_local.sh
To debug the continuous integration tests, run:
$ cloud-build-local --config=cloudbuild.yaml --dryrun=false .
Both commands will run the same set of tests.
To run the examples:
$ python -m datacommons.examples.XXX
where XXX is the module you want to run.
Release to PyPI
- Update "VERSION" in setup.py
- Update CHANGELOG.md for a new version
- Upload a new package using steps for generating distribution archives and uploading the distribution archives
Support
For general questions or issues about the API, please open an issue on our
issues page. For all other
questions, please send an email to support@datacommons.org
.
Note - This is not an officially supported Google product.
Project details
Release history Release notifications | RSS feed
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
Hashes for datacommons-1.4.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f8c52c33a2751b75ad5afa0e2b6c9a5a58869468ab12f1394e2df854776487af |
|
MD5 | 6d66732b55639a5de1a6a794de44b48b |
|
BLAKE2b-256 | 3602918433629eedbd8a91ef8da1fa979ea7525b610815219013b7a2e698c82b |