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.11.7.tar.gz
(16.1 kB
view hashes)
Built Distribution
Close
Hashes for hestia-earth-utils-0.11.7.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | d480f47c30b9f12a273b3e3c218253102281c560e4a98bf02259c155e93e4278 |
|
MD5 | 9ac5c6134696b5dea942ffa170641e00 |
|
BLAKE2b-256 | e641ac1c90ec8da7ff9b960e57221d1f25cc24048a24d9a255389c183f147a72 |
Close
Hashes for hestia_earth_utils-0.11.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ad58f00556245f8257c1bda062b6ed8e8f8a7b780cb5a5dbe8b322b89e20346b |
|
MD5 | 862ae3c358a14d6e451b68aa1a3cf80c |
|
BLAKE2b-256 | da5b8948960c74451bffdd45c349c0a78ff5057f2a501a5338fc14b1d7b7bf5b |