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.8.tar.gz
(16.3 kB
view hashes)
Built Distribution
Close
Hashes for hestia-earth-utils-0.11.8.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a5d2f65fc7950fdc0668b38d94c79c21d2c756af0aae8d7bc953f5e6327cc96b |
|
MD5 | 84a4066cfa9f6dce54efe3bb4b0f8b67 |
|
BLAKE2b-256 | 4bb86e52d68ba5e25a84df21368e264779f25162c342db96fb75ad714a0a7a6b |
Close
Hashes for hestia_earth_utils-0.11.8-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8ff08385819d6de1d9f07986d4b013a203cc646e63cea705fade2f4b1433ae27 |
|
MD5 | 1cf25bc1a37d7d3d69710c5e2b50af2c |
|
BLAKE2b-256 | 5e16e65e28ed343ca0ff37a64ca07603de21e065e33f28a6c9272c2a46e66c6e |