A mini SDK for interacting with the LLC Science Admin
Project description
LLC Science SDK
A simple way to fetch scientific data from the Science Admin. Please visit {BASE_URL}/api/schema/swagger-ui/#/ for more information on the API.
Installation
pip install llcsciencesdk
Updating to a new version
pip install llcsciencesdk -U
Usage
Specifying environment
from llcsciencesdk.llc_api import ScienceSdk
llc_api = ScienceSdk() # connect to production
llc_api = ScienceSdk(environment="staging") # connect to staging
llc_api = ScienceSdk(environment="local") # connect to localhost
llc_api = ScienceSdk(environment="http://127.0.0.1:8009") # connect to custom url
Logging in
from llcsciencesdk.llc_api import ScienceSdk
llc_api = ScienceSdk()
llc_api.login("username", "password")
Using the endpoints
from llcsciencesdk.llc_api import ScienceSdk
llc_api = ScienceSdk()
llc_api.login("username", "password")
model_input = llc_api.get_ft_input(1)
planting_design_list = llc_api.get_planting_design_list()
planting_design_detail = llc_api.get_planting_design(10)
Supported endpoints
See the swagger docs for a complete list. {BASE_URL}/api/schema/swagger-ui/#/
For Developers
Updating package
- Make sure you have supported version of flit installed (see project.toml).
python3 -m pip install flit
- Set env variables for PiPy login:
export FLIT_USERNAME=username
export FLIT_PASSWORD=password
- Update the version of the API in the init.py file.
- Run command to publish to PiPy:
flit publish
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
llcsciencesdk-2.0.1.tar.gz
(8.2 kB
view hashes)
Built Distribution
Close
Hashes for llcsciencesdk-2.0.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c76c13db2c980a7c40c6da581d455f50236d01a90a753062a2fd00f8d12a50d |
|
MD5 | 957a02e6c891345427a7f36f81feae20 |
|
BLAKE2b-256 | 1461ccdbfe36e6d2912169730de12ed1440c2faaeef0f80e482de37acfa272ee |