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.12.2.tar.gz
(23.0 kB
view hashes)
Built Distribution
Close
Hashes for hestia-earth-utils-0.12.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 482e7fe325962d9307854d322fd1dc62fb04168fa18316ec0ceb20ceead263c9 |
|
MD5 | 50ee45ab7d2d5e3908be4e9725239f3d |
|
BLAKE2b-256 | a792e72df5adf3f675367b00e16ad1a9c8fe7925c132f161dd923cedec691520 |
Close
Hashes for hestia_earth_utils-0.12.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fd0a11628e3d5b1c4bc1c5155d1a9c4988e542d811cd5c5bdb86c29b7828e829 |
|
MD5 | a54045d61832b1be5db360ec9ad4b6af |
|
BLAKE2b-256 | cf8fe0785332e21d750d436209abae44b6e62eafe55e38aae38d9dea9c1614a9 |