Skip to main content

USDA National Agricultural Statistics Service API wrapper

Project description

nass is a wrapper around the public API for the USDA National Agricultural Statistics Service.


$ pip install nass


>>> import nass
>>> api = nass.NassApi('your api key')
>>> api.param_values('source_desc')
>>> q = api.query()
>>> q.filter('commodity_desc', 'CORN').filter('year', 1990)
>>> q.count()
>>> q.execute()
[{'sector_desc': 'CROPS', ...}, ...]

See for the full list of fields.


If something goes wrong communicating with NASS, an exception will be raised. This includes connection problems (e.g. timeout, DNS failure), as well as specific error messages.

All exceptions subclass NassException, so you can use it to catch all exceptions.


You can find full documentation of the nass package at


0.1.1 (2015-10-14)

  • Python 3.5 support
  • Mark as stable

0.1.0 (2015-07-18)

  • Initial release

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for nass, version 0.1.1
Filename, size File type Python version Upload date Hashes
Filename, size nass-0.1.1.tar.gz (14.1 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