Skip to main content

No project description provided

Project description

govdata

Client-library to fetch data from GovData/OpenData-sources via DKAN-REST-API. Take a look at https://www.govdata.de/ to determine if your city of interest provides some data.

install

python -m pip install govdata

example usage

from govdata import DKANPortalClient 
import requests
# get opendata-city-client
cityclient = DKANPortalClient(city="braunschweig", apiversion=3)

# get all available packages (topics)
packagelist = cityclient.get_packages()

# request data for package from packagelist
first_package_id_from_list = packagelist[0]
package_meta = cityclient.get_package_metadata(package_id=first_package_id_from_list)
resources_for_package = package_meta["resources"]

run tests

pytest --cov=govdata tests

testcoverage

collecting ... 
 tests/test_govdata.py ✓✓✓✓✓✓✓✓                                                                                                                                          100% ██████████

---------- coverage: platform ###, python 3.8.10-final-0 -----------
Name                                                          Stmts   Miss  Cover
---------------------------------------------------------------------------------
/###/.local/lib/python3.8/site-packages/govdata.py     106     56    47%
---------------------------------------------------------------------------------
TOTAL                                                           106     56    47%

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

govdata-0.0.9.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

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

govdata-0.0.9-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file govdata-0.0.9.tar.gz.

File metadata

  • Download URL: govdata-0.0.9.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.10

File hashes

Hashes for govdata-0.0.9.tar.gz
Algorithm Hash digest
SHA256 439c8b3506bfd8abc3c4cd19ba4e83a5d80fa927b3ffaaafb82fb8a22b3b4183
MD5 26729a621163c46bf52bc082945bc2e8
BLAKE2b-256 ad2b7790ddd568d7d50df8a339b324e2f07229e48d3d903a262306b5d7f6821d

See more details on using hashes here.

File details

Details for the file govdata-0.0.9-py3-none-any.whl.

File metadata

  • Download URL: govdata-0.0.9-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.10

File hashes

Hashes for govdata-0.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 ddf89040ee1b66f68223971c956b8c8c4efddb13e117562f6fb65920f349fdab
MD5 07d57b47fdf4c7144e0441d8a792b097
BLAKE2b-256 c674044a495835e43e68507d3d23dca4fde14dadf5a6dd225f8b760feec1cd3e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page