Skip to main content

A Python library for interacting with farmOS over API.

Project description

Licence Release Last commit Twitter Chat is a Python library for interacting with farmOS over API.

For more information on farmOS, visit


import farmOS

hostname = ''
username = 'My Name'
password = 'mYPa$$w0rd'

farm = farmOS.farmOS(hostname, username, password)
success = farm.authenticate()

# Get farm info
info =

# Get all logs
logs = farm.log.get()
# Get harvest logs
harvests = farm.log.get({
# Get log number 37
log = farm.log.get(37)

# Get all assets
assets = farm.asset.get()
# Get all animal assets
animals = farm.asset.get({

# Get all areas
areas = farm.area.get()
# Get field areas
fields = farm.area.get({

# Get all terms
terms = farm.term.get()
# Get all terms from farm_crops vocabulary
crops = farm.term.get('farm_crops')

You can configure how farmOS logs are displayed with the following:

import logging

# Required to init a config on the ROOT logger, that all other inherit from

 # Configure all loggers under farmOS (farmOS.client, famrOS.session) to desired level

 # Hide debug logging from the farmOS.session module

More info on logging in Python here.


Configure credentials for the farmOS instance used to test in


Automated tests are run with pytest

python test


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.

Files for farmOS, version 0.1.5
Filename, size File type Python version Upload date Hashes
Filename, size farmOS-0.1.5-py3-none-any.whl (26.2 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size farmOS-0.1.5.tar.gz (12.9 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page