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.0.tar.gz
(11.1 kB
view details)
Built Distribution
farmOS-0.1.0-py3-none-any.whl
(24.3 kB
view details)
File details
Details for the file farmOS-0.1.0.tar.gz
.
File metadata
- Download URL: farmOS-0.1.0.tar.gz
- Upload date:
- Size: 11.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ec53a86baeb1c7e016d9e165444d8d46f30767b7dc646eeb4eeacc45dfdb13f6 |
|
MD5 | f97e200037819a6accad4bd484631530 |
|
BLAKE2b-256 | e97034f46d7a00b8749b664ad7b9515dd5a805b7f388cd3a4bddab69226ce270 |
File details
Details for the file farmOS-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: farmOS-0.1.0-py3-none-any.whl
- Upload date:
- Size: 24.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5a3aaef1cb9b9a674b5388fb91412fedf93215a5b9fd402e2a6357c059bc45ae |
|
MD5 | 1932294ef2575bed9e6f00eb295a2831 |
|
BLAKE2b-256 | 788650afcb1f45a0a6cf8429d1868fc2376cb3f4bdbaaef5cf8cf0b4752d9fb5 |