Skip to main content

HESTIA's utils library

Project description

HESTIA Utils

Install

  1. Install the module:
pip install hestia_earth.utils
  1. Add this to your environment variables:
API_URL=https://api.hestia.earth
WEB_URL=https://www.hestia.earth

Usage

  1. To download a file from the HESTIA API:
from hestia_earth.schema import SchemaType
from hestia_earth.utils.api import download_hestia

cycle = download_hestia('cycleId', SchemaType.CYCLE)
sandContent = download_hestia('sandContent', SchemaType.TERM)
  1. To search for a specific Node on HESTIA:
from hestia_earth.schema import SchemaType
from hestia_earth.utils.api import find_node_exact

source = find_node_exact(SchemaType.SOURCE, {'bibliography.title': 'My Bibliography'})
  1. To get a lookup table from local file system:
from hestia_earth.schema import SchemaType
from hestia_earth.utils.lookup import load_lookup

df = load_lookup('path/to/my/lookup.csv')
  1. To get a lookup table from HESTIA:
from hestia_earth.schema import SchemaType
from hestia_earth.utils.lookup import download_lookup

df = download_lookup('crop.csv')

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

hestia-earth-utils-0.13.9.tar.gz (25.4 kB view details)

Uploaded Source

Built Distribution

hestia_earth_utils-0.13.9-py3-none-any.whl (32.3 kB view details)

Uploaded Python 3

File details

Details for the file hestia-earth-utils-0.13.9.tar.gz.

File metadata

  • Download URL: hestia-earth-utils-0.13.9.tar.gz
  • Upload date:
  • Size: 25.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for hestia-earth-utils-0.13.9.tar.gz
Algorithm Hash digest
SHA256 1c8c9ca277d260066e314d6ccc93aa9ca651c5c494861c22e619272a0e82bd8b
MD5 b38bc73caf0dc4a34af072b5f9149e2c
BLAKE2b-256 0b237105fac4af802031bb9085ddb377e9a34d06e5f0e518ffa7e5622902bb31

See more details on using hashes here.

File details

Details for the file hestia_earth_utils-0.13.9-py3-none-any.whl.

File metadata

File hashes

Hashes for hestia_earth_utils-0.13.9-py3-none-any.whl
Algorithm Hash digest
SHA256 eb6e3c3310816a7fd79f2adbb410fe62af0450bb242ce2226f92f661b2dec018
MD5 da050095c2a434c4bcb826c9ad499b65
BLAKE2b-256 35958e9505179bb9ac3d8e484d50dc5841ef4bd941b48b50271d0d3fd20ed988

See more details on using hashes here.

Supported by

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