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. The API quick reference can be found in docs/api-ref.md.

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.3.tar.gz (11.2 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.3-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: couchbeans-0.0.3.tar.gz
  • Upload date:
  • Size: 11.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for couchbeans-0.0.3.tar.gz
Algorithm Hash digest
SHA256 6e4f45e57c47d987a4bb17247417308aadf953011bfaf80bedf2661f78a43f28
MD5 00a9c5853511ed8e6418456b5f05a40a
BLAKE2b-256 75742e9a9cb360a6cb4ac3348b01bb048dedb218617d89054c970ef535783b52

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for couchbeans-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 2cc21e85e0230e21cbc30bcd087bdb5d454c5a533e9d030579598212615c78e8
MD5 ad02b9a8aa81fe7faabfad678a8e5523
BLAKE2b-256 edc9d909f69d4fa5b2e579aff7155832ecda76a3e380ce46d34a990422263029

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