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

Uploaded Source

Built Distributions

farmOS-0.0.1-py3.7.egg (16.7 kB view details)

Uploaded Source

farmOS-0.0.1-py3-none-any.whl (20.6 kB view details)

Uploaded Python 3

farmOS-0.0.1-py2.7.egg (11.8 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: farmOS-0.0.1.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

File hashes

Hashes for farmOS-0.0.1.tar.gz
Algorithm Hash digest
SHA256 50166c135951ac0bd2f0ea0f00d8373468d11ad7327a2035ea1f54c64ea41e49
MD5 a96e475bff6c3223cd3f03b79b043ed5
BLAKE2b-256 cc447d51bacb6d44f9577e20bfe3f5f3911d8a3322fb27634ffa257f1dd73d8c

See more details on using hashes here.

File details

Details for the file farmOS-0.0.1-py3.7.egg.

File metadata

  • Download URL: farmOS-0.0.1-py3.7.egg
  • Upload date:
  • Size: 16.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

File hashes

Hashes for farmOS-0.0.1-py3.7.egg
Algorithm Hash digest
SHA256 2626c146b33644d8027cf2d9ae804c3637ca3fb66984c2b4715cfe2493226259
MD5 d1afd9346112c5657ad3728e7004b5d4
BLAKE2b-256 e4fef30990ca699c63c12d9c6fcaf7cd1cc5f7e3f79638192cd1ce839f2d254e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: farmOS-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 20.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

File hashes

Hashes for farmOS-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0c068f39df2638f1f2bca14c2d05a78d470ac2c2103bc4dc0094223c2b4293d8
MD5 ccfbe4a1f6ea338ae2ea1d92831f88c9
BLAKE2b-256 79aa6139a4d95df5712c2cbbd64e45f1d14ed9060ed56e1fa2b2b9fd1b46f7cf

See more details on using hashes here.

File details

Details for the file farmOS-0.0.1-py2.7.egg.

File metadata

  • Download URL: farmOS-0.0.1-py2.7.egg
  • 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.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.5

File hashes

Hashes for farmOS-0.0.1-py2.7.egg
Algorithm Hash digest
SHA256 8328a3bcacb844d73b6c5da2340a124b908caee42858ee44437fc89605acd977
MD5 db7552606fce4342258e6764d899d110
BLAKE2b-256 228eedab44c47749311e1b90dbf18a2f67057b6e53cef400492dbeb651d67b4c

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