This is a Python wrapper for the CouchDB Document API (http://wiki.apache.org/couchdb/HTTP_Document_API).
It was created primarily as an exercise to learn CouchDB's document API.
The library attempts to expose a very simple interface that closely resembles REST.
For example,
from cushion import api
c = api.Cushion("http://localhost:5984/albums",
username='abc',
password='xyz'
)
c.get(id='1b0c7bb19b1bbacf7f567bf379000d9c')
returns the following JSON object:
{
'Band': 'The Postal Service',
'_rev':'1-f319aeef4dbb8c232f0257cf2a9ae64b',
'_id': '1b0c7bb19b1bbacf7f567bf379000d9c',
'Name': 'Give Up'
}
alternatively, the database can be specified at runtime,
c = api.Cushion("http://localhost:5984",
username='abc',
password='xyz',
timeout=5
)
c.get.albums(id='1b0c7bb19b1bbacf7f567bf379000d9c')
which also returns:
{
'Band': 'The Postal Service',
'_rev':'1-f319aeef4dbb8c232f0257cf2a9ae64b',
'_id': '1b0c7bb19b1bbacf7f567bf379000d9c',
'Name': 'Give Up'
}
to create a document with a document id:
c.put.albums(id='c3ea09f0-9758-480c-aa25-0f71a9caa446', Name='Transatlanticism', Band='Death Cab For Cutie')
alternatively, to create a document without supplying the document id:
c.post.albums(Name='In Ghost Colors', Band='Cut Copy')
Metadata
Release files for cushion 0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cushion-0.2-py2.6.egg | Legacy Egg format | - | - | Details for cushion-0.2-py2.6.egg |
Release files / cushion-0.2-py2.6.egg
| Download URL | cushion-0.2-py2.6.egg |
|---|---|
| Size | 6.5 kB |
| Tags | Egg |
|
SHA-256 checksum How to use checksums |
9d86f90dd1cebc0143595387dbae042ab6e09b4f63de118adfaf241a3f4ace0d
|
|
BLAKE2b-256 checksum How to use checksums |
0f0aa7a9fa4d1194a14da156a7e78b25089c900de01c2f8cbe88e3960e1bc186
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for cushion 0.2
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.