A Python library for interacting with farmOS over API.
Project description
farmOS.py
farmOS.py is a Python library for interacting with farmOS over API.
For more information on farmOS, visit farmOS.org.
USAGE
import farmOS
hostname = 'myfarm.farmos.net'
username = 'My Name'
password = 'mYPa$$w0rd'
farm = farmOS.farmOS(hostname, username, password)
success = farm.authenticate()
# Get farm info
info = farm.info()
# Get all logs
logs = farm.log.get()
# Get harvest logs
harvests = farm.log.get({
'type':'farm_harvest'
})
# Get log number 37
log = farm.log.get(37)
# Get all assets
assets = farm.asset.get()
# Get all animal assets
animals = farm.log.get({
'type':'animal'
})
# Get all areas
areas = farm.area.get()
# Get field areas
fields = farm.area.get({
'area_type':'field'
})
# Get all terms
terms = farm.term.get()
# Get all terms from farm_crops vocabulary
crops = farm.term.get('farm_crops')
TESTING
Configure credentials for the farmOS instance used to test in
tests/test_credentials.py
Automated tests are run with pytest
python setup.py test
MAINTAINERS
- Paul Weidner (paul121) - https://github.com/paul121
- Michael Stenta (m.stenta) - https://github.com/mstenta
This project has been sponsored by:
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
farmOS-0.1.3.tar.gz
(11.8 kB
view details)
Built Distribution
farmOS-0.1.3-py3-none-any.whl
(25.1 kB
view details)
File details
Details for the file farmOS-0.1.3.tar.gz
.
File metadata
- Download URL: farmOS-0.1.3.tar.gz
- Upload date:
- Size: 11.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 51b211e94572c8e2366ef239cb1536dc4b26d2c2efe38493e9e2ee9e0039b1c8 |
|
MD5 | 40eb8fc2962b8d908fc02c91d9534d2f |
|
BLAKE2b-256 | 696f85476f828bbe7e34cf98bd667c7e145ed821f742d59d539a688705079541 |
File details
Details for the file farmOS-0.1.3-py3-none-any.whl
.
File metadata
- Download URL: farmOS-0.1.3-py3-none-any.whl
- Upload date:
- Size: 25.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | db87ee06b1ffc152230ce490395c44ede5ec767cc62ee2658f270a42292f0c32 |
|
MD5 | 6b217cc7ee8fa89bd7a9bf636407690e |
|
BLAKE2b-256 | 128145454af60d635c25f076cfa9ad528b7f0ea9a76a8bcd59093d074885a968 |