GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - mukundha/api-python: Python client library to access Data Commons

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

220 Commits
220 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/ISSUE_TEMPLATE
.github/ISSUE_TEMPLATE
 
 
datacommons
datacommons
 
 
datacommons_pandas
datacommons_pandas
 
 
notebooks
notebooks
 
 
.gitignore
.gitignore
 
 
CHANGELOG.md
CHANGELOG.md
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
cloudbuild.yaml
cloudbuild.yaml
 
 
requirements.txt
requirements.txt
 
 
run_tests_local.sh
run_tests_local.sh
 
 
setup_datacommons.py
setup_datacommons.py
 
 
setup_datacommons_pandas.py
setup_datacommons_pandas.py
 
 

Repository files navigation

Data Commons Python API

This is a Python library for accessing data in the Data Commons Graph.

See also: Data Commons Pandas API.

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.

When you are 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 on our tutorials page!

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

Note: Always release datacommons_pandas when datacommons is released.

If this is your first time releasing to PyPI, please review the PyPI guide starting from the setup section.

Release to Test PyPI

  1. In setup_datacommons.py and setup_datacommons_pandas.py:
    • Append "-USERNAME" to the package "NAME". For example, NAME = 'foo_package-janedoe123'.
    • Increment the "VERSION" codes to something that has not been used in your test project. This will not affect the production PyPI versioning.
  2. Build the dists:
    rm dist/*
    python3 -m pip install --user --upgrade setuptools wheel
    python3 setup_datacommons.py sdist bdist_wheel
    python3 setup_datacommons_pandas.py sdist bdist_wheel
  3. Release the dists to TestPyPI:
    python3 -m pip install --user --upgrade twine
    python3 -m twine upload --repository testpypi dist/*

Release to Production PyPI

  1. In setup_datacommons.py and setup_datacommons_pandas.py:
    • Revert the package name to datacommons and datacommons_pandas
    • Update and double check "VERSION"
  2. Update CHANGELOG.md and datacommons_pandas/CHANGELOG.md
  3. Build the dists:
    rm dist/*
    python3 -m pip install --user --upgrade setuptools wheel
    python3 setup_datacommons.py sdist bdist_wheel
    python3 setup_datacommons_pandas.py sdist bdist_wheel
  4. Release the dists to PyPI:
    python3 -m pip install --user --upgrade twine
    twine upload dist/*

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 [email protected].

Note - This is not an officially supported Google product.

About

Python client library to access Data Commons

www.datacommons.org

Resources

Readme
Apache-2.0 license

Contributing

Contributing
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.