This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

A bulk upload library for DocumentCloud.

Project Description

A Bulk-Upload Library for DocumentCloud

pneumatic is a Python 3 library that adds some luxury and safeguards to the bulk-uploading of hundreds, thousands or hundreds of thousands of files to DocumentCloud. It is meant to do one thing – upload – and serve as an adjunct to, but not a replacement for, the excellent python-documentcloud API wrapper.

pneumatic’s name is inspired by the pneumatic dispatch systems in newsrooms of yore, which featured a series of pneumatic tubes for sending copy from the newsrooms to other departments such as the composing room.

Features

  • Catalogs the API response for each upload in a SQLite database along with the file’s canonical URL.
  • Dumps the SQLite data to a CSV if you wish.
  • Multiprocessing (under Mac/Linux) for faster submission of files to DocumentCloud’s API.
  • Prevents inadvertent submission of file types DocumentCloud doesn’t handle, such as audio.

Basic Usage

You will need an active DocumentCloud account and Python 3.4+. First, install via pip:

pip install pneumatic

Example use: To upload all files in a directory (and all sub-directories below it), assign them to an existing project, set the files to public access, and tag each with metadata, run the following code:

from pneumatic import DocumentCloudUploader

uploader = DocumentCloudUploader('person@example.com', 'your-password')
uploader.upload(
    file_directory='/govfiles',
    project='17477-loudoun-county-government',
    access='public',
    data={'type': 'government', 'action': 'lawsuit'})
Release History

Release History

This version
History Node

0.1.7

History Node

0.1.6

History Node

0.1.5

History Node

0.1.4

History Node

0.1.3

History Node

0.1.2

History Node

0.1.1

History Node

0.1

History Node

0.0.2

History Node

0.0.1

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
pneumatic-0.1.7-py3-none-any.whl (11.1 kB) Copy SHA256 Checksum SHA256 py3 Wheel Nov 25, 2016
pneumatic-0.1.7.tar.gz (7.2 kB) Copy SHA256 Checksum SHA256 Source Nov 25, 2016

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