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

Uploaded Python 3

File details

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

File metadata

  • Download URL: couchbeans-0.0.2.tar.gz
  • Upload date:
  • Size: 11.0 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.2.tar.gz
Algorithm Hash digest
SHA256 ffe7d25025d84b5c96be48271dc2b84cef135d4ca091bc62df4d7b87b7fd1e02
MD5 22e9fb09767e5e0a1bbe6bf3bebf7ae6
BLAKE2b-256 afcd4e8d4852ff17de67c41a58f671a1ae5ee324d865b68aa4d58a899f0c1cb3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: couchbeans-0.0.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4f7769fe1f9ad8e07858d4e39784da7ce96ea2bf5d10e2dc9fce24e46c8ca363
MD5 b4e74537b38f0bf099b29d9d304796a9
BLAKE2b-256 ff55adad29f6de83ae02e6d465047941e9a4d74b7009e0f49a0fe4e74c31b909

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