Skip to main content

A CouchDB library for python, focused on network resilience.

Project description

CouchBeans

Have you ever held up a broken couch with a tin of beans? CouchBeans is a CouchDB library for python, aiming to provide as much resilience as possible for dodgy network environments. It's designed to be quick and easy to use, with as much complexity hidden from the user as possible.

A quick example:

>>> from couchbeans import CouchClient
>>> db = CouchClient("http://root:couchbeans@localhost:5984/")
>>> db.create_db("main")
True
>>> db.put_document("main", "bean", {"type": "baked"})
{'ok': True, 'id': 'bean', 'rev': '1-975cf46dd62455d25b4743874062ebfe'}
>>> db.get_document("main", "bean")
{'_id': 'bean', '_rev': '1-975cf46dd62455d25b4743874062ebfe', 'type': 'baked'}

Have a look at the test script for more examples of how to use CouchBeans.

Installation

CouchBeans is installable via PIP: pip install couchbeans

Features

The main advantage of CouchBeans over other CouchDB libraries is its default handling of failed requests. CouchBeans will try a user-configurable number of times to execute a request to help with spotty network connections.

CouchBeans provides utility functions for modifying documents, including a patch operation. It also hides handling of the _rev parameter, making it easy to forget about the underlying network connections.

Dependencies

  • requests

Project details


Download files

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

Source Distribution

couchbeans-0.0.5.tar.gz (10.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

couchbeans-0.0.5-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file couchbeans-0.0.5.tar.gz.

File metadata

  • Download URL: couchbeans-0.0.5.tar.gz
  • Upload date:
  • Size: 10.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for couchbeans-0.0.5.tar.gz
Algorithm Hash digest
SHA256 aefa1084f91c91aee0ba62686f04555ae8d6b440f14ce088fa544a8dee2b7e56
MD5 d72e47fd382705123a3c1a2094454623
BLAKE2b-256 7b571ad4bcf5db956d42e0cee5ccd9941e7688ee18537a6ebc21d1d76b41b146

See more details on using hashes here.

File details

Details for the file couchbeans-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: couchbeans-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 6.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for couchbeans-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 b72784c269f085dcff4853d55a0764c31828795daa988a7a8bbf2190093510b1
MD5 60245211f6e91c988c1e26027c28d47b
BLAKE2b-256 fdc34c1459ab0d1016b47c43a8628f7d223e7d6c49c8f6dc66ec0bf517c3a2aa

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page