Hestia's utils library
Project description
Hestia Utils
Install
- Install the module:
pip install hestia_earth.utils
- Add this to your environment variables:
API_URL=https://api.hestia.earth
WEB_URL=https://www.hestia.earth
Usage
- 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)
- 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'})
- 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')
- 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.2.tar.gz
(24.4 kB
view details)
Built Distribution
File details
Details for the file hestia-earth-utils-0.13.2.tar.gz
.
File metadata
- Download URL: hestia-earth-utils-0.13.2.tar.gz
- Upload date:
- Size: 24.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6e22d95b30d6f47e48b52f6ab3e9b90c085f4c88b0f6cd79663e8ad67d9605e1 |
|
MD5 | 319a59935fe5d742c7446436d66acf7a |
|
BLAKE2b-256 | d82aa2a46613da5560ca3206db8d906de94ca274a01da6d1132809335f8ea81f |
File details
Details for the file hestia_earth_utils-0.13.2-py3-none-any.whl
.
File metadata
- Download URL: hestia_earth_utils-0.13.2-py3-none-any.whl
- Upload date:
- Size: 31.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b9289391e42c7bee964aab1b2bc01c7822e95132d8d8ab35c263e45a59c62d05 |
|
MD5 | d06289483e56196c4635d3e4a5106364 |
|
BLAKE2b-256 | 1ee2a49f3ba57e42d826cc0b566050b9f2a39185c73b916a07919c4fbd197289 |