Skip to main content
Warning: You are using the test version of PyPI. This is a pre-production deployment of Warehouse. Changes made here affect the production instance of TestPyPI (
Help us improve Python packaging - Donate today!

USDA National Agricultural Statistics Service API wrapper

Project Description


.. image::

.. image::

``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 :class:`nass.exceptions.NassException`, so you can use
it to catch all exceptions.


You can find full documentation of the ``nass`` package at

.. :changelog:


0.1.0 (2015-07-18)

- Initial release

Release History

This version
History Node


Download Files

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

File Name & Hash SHA256 Hash Help Version File Type Upload Date
(14.0 kB) Copy SHA256 Hash SHA256
Source Jul 20, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting