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.10.10.tar.gz
(10.3 kB
view hashes)
Built Distribution
Close
Hashes for hestia-earth-utils-0.10.10.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c0eae1d83a038ebd2150b7405507b9fb26cc5695c5da66e93df264eb0ada77eb |
|
MD5 | 3fdbc7b8f5970093b40e35fed6a910d5 |
|
BLAKE2b-256 | 4dd0dd0c0e2cd6b50679de7979869fef8a735e47e610280bb114697b0da5cc14 |
Close
Hashes for hestia_earth_utils-0.10.10-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 086ab7c303feba1db904d20271e9a92b32db5432d7d3e1fedf5d40405921dcb8 |
|
MD5 | 198e91c12b9218446b45097642126ceb |
|
BLAKE2b-256 | 8d1f58efce0ebea22bf8b6f4de611c0a9980de5c9e7c2f140a977a7bb628f5e1 |