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.
Post-processing, can update the SQLite database with each document’s page count and file hash.
Dumps the SQLite data to a CSV if you wish.
Prevents inadvertent submission of file types DocumentCloud doesn’t handle, such as audio.
Links
Documentation: https://pneumatic.readthedocs.io/en/latest/
Repository: https://github.com/anthonydb/pneumatic
Basic Usage
You will need an active DocumentCloud account and Python 3.5+. 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'})
Please see the full documentation for more examples, including how to access the uploads database.
Metadata
Release files for pneumatic 0.1.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pneumatic-0.1.9.tar.gz | 9.0 kB | Without provenance | Details for pneumatic-0.1.9.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pneumatic-0.1.9-py3-none-any.whl | Python 3 | none | any | Details for pneumatic-0.1.9-py3-none-any.whl |
Total release size: 19.3 kB
Release files / pneumatic-0.1.9.tar.gz
| Download URL | pneumatic-0.1.9.tar.gz |
|---|---|
| Size | 9.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
12dfde8e9663e92057f24c167a3e9547a32884d7aeedd25aff9dac789fa48c6c
|
|
BLAKE2b-256 checksum How to use checksums |
526f05cd07abc0039f8e577c673d10efd62ed1885c3b5ca840ab8233c1670614
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.8.1
|
Release files / pneumatic-0.1.9-py3-none-any.whl
| Download URL | pneumatic-0.1.9-py3-none-any.whl |
|---|---|
| Size | 10.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e5a5693f0fbfe6e228e1a7b83a2198e5cfe2c6395d3a45083f0bce19ebf37c2a
|
|
BLAKE2b-256 checksum How to use checksums |
e437d266fa828f49ba002ee14a3dcc3adc1cdaec8da157d233a8877bf1aa9a0e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.8.1
|
Security for pneumatic 0.1.9
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.