Skip to main content

Base data models for the datagarden.

Project description

The-datagarden-models package is supporting package for the-datagarden api (see The DataGarden Website) and the-datagarden package (see the-datagarden package). The-datagarden api and package are developed to give data professionals easy access to regional data from public sources without having to understand the sources, api’s and data formats from those public data sources.

The-datagarden-models package contains the Pydantic models for the data returned by the-datagarden api and can be used to work with the data returned by the api in a more pythonic way than only using the json.

Version 3.0.0 introduces the V2 model family (DemographicsV2, EconomicsV2, TradeV2, …): every quantified value is a Measure (amount × unit, explicit currency and price basis), scalar types are bounded, and key namespaces are generated from the models themselves. The V1 family stays importable and frozen for one major cycle (a DeprecationWarning is emitted on import); stored documents resolve to the right family via resolve_model(name, version). See CHANGELOG.md.

A quick example

If you have a user account at the-datagarden.io, you can start using the SDK right away:

# Retrieve a country object from the datagarden API
>>> from the-datagarden import TheDataGardenAPI
>>> the_datagarden_api = TheDataGardenAPI(email='your-email@example.com', password='your-password')
>>> nl = the_datagarden_api.netherlands()
>>> nl_demographics = nl.demographics(from_period="2010-01-01", source="united nations")
>>> nl_demographics
    TheDataGardenRegionalDataModel : Demographics : (count=15)

this returns a TheDataGardenRegionalDataModel containimg the demographics data in this case 15 records. Each of those records will contain a Demographics object for the region for the specified period.

Read more

Access to The DataGarden API

To use the DataGarden SDK, you need access to the The DataGarden API. Simply register for free at https://www.the-datagarden.io and you will have an inital free access account to the API with access to country and continent data.

Visit https://www.the-datagarden.io for to register for free.

Download files

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

Source Distribution

the_datagarden_models-3.2.1.tar.gz (69.7 kB view details)

Uploaded Source

Built Distribution

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

the_datagarden_models-3.2.1-py3-none-any.whl (116.8 kB view details)

Uploaded Python 3

File details

Details for the file the_datagarden_models-3.2.1.tar.gz.

File metadata

  • Download URL: the_datagarden_models-3.2.1.tar.gz
  • Upload date:
  • Size: 69.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for the_datagarden_models-3.2.1.tar.gz
Algorithm Hash digest
SHA256 d693fbe39aa911aa4786a1fea6a9cb5c47becdd7dd6c34c799e2378a1744babc
MD5 aa9713fa9b366407f2e0341970cca950
BLAKE2b-256 14fecf44b5a9e5b10f58027f53ebc85c94afb657c5671c0dce0505b53c49f2ff

See more details on using hashes here.

File details

Details for the file the_datagarden_models-3.2.1-py3-none-any.whl.

File metadata

  • Download URL: the_datagarden_models-3.2.1-py3-none-any.whl
  • Upload date:
  • Size: 116.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for the_datagarden_models-3.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 27bd98cbe33e7e2b73fe2bd3001918afe45549d0840601c7462d262c88ed29b3
MD5 6bd3d5e6082bea8eb2bb0c8d2181c8a4
BLAKE2b-256 afac782725c170f4897029f63abe309cd9e7de2558b22b102d024d316ed6e6d7

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