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.20.tar.gz
(11.7 kB
view hashes)
Built Distribution
Close
Hashes for hestia-earth-utils-0.10.20.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 94246dd1328bb38759041568b1461415a1f154c16e5516631881f101613a05cd |
|
MD5 | 5009d10beda4c1366394e24c57d1a1b1 |
|
BLAKE2b-256 | d50cdf7027e7e0c8a472621b6dade0fe289d86567729f8b0642f5aa1f130f4dd |
Close
Hashes for hestia_earth_utils-0.10.20-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 729e160e9ccd3e3590dca53d823ca8ea01fa24cb652eefb0a2ce2c5d06c5267d |
|
MD5 | f1c1f91366b5d35deaa4a4479ef6aea7 |
|
BLAKE2b-256 | 00391bab78ea8e879247b0b79be9fd3333e7b0f3d302cca56c419d0a6e7e9234 |