Skip to main content

A Python library for interacting with farmOS over API.

Project description

farmOS.py

Licence Release Last commit Twitter Chat

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

This project has been sponsored by:

Project details


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.4.tar.gz (11.9 kB view details)

Uploaded Source

Built Distribution

farmOS-0.1.4-py3-none-any.whl (25.2 kB view details)

Uploaded Python 3

File details

Details for the file farmOS-0.1.4.tar.gz.

File metadata

  • Download URL: farmOS-0.1.4.tar.gz
  • Upload date:
  • Size: 11.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.40.0 CPython/3.6.5

File hashes

Hashes for farmOS-0.1.4.tar.gz
Algorithm Hash digest
SHA256 be59fb386a1a958007a957a84bd15590be0cb4a453cafbdef2d54528e5c8d246
MD5 81a868f052ab6980a10e2e40d4cdbf1e
BLAKE2b-256 1ba5044671ad13ff7dcfe241a321a238a9f963395bc319bb9987c88329f0074b

See more details on using hashes here.

File details

Details for the file farmOS-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: farmOS-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 25.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.40.0 CPython/3.6.5

File hashes

Hashes for farmOS-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 3c30dbdfa9a527a34610fca18c5d941919b88d4c03071f3d2adb65f303a8eb46
MD5 9cea8a8b793ac1b09eff05f5d227dfd0
BLAKE2b-256 ba04046dc2be3ba4f3ce3888a60832b266ebc96a2ad3e4c62e9ec5e7535e1b60

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page