Skip to main content

A collection of CouchDB utils.

Project description

couchutils: Python CouchDB Utils

Travis (.org) Codecov GitHub PyPI Code Style: black

A collection of CouchDB utils.

Feature Support

  • Support for CouchDB 1.7.x.

couchutils officially supports Python 3.6+.


To install couchutils, simply run:

$ pip install -U couchutils


To use couchutils in a project:

>>> from couchutils import <UTILS_METHOD>

Build CouchDB Documents from a Directory

>>> from couchutils import compile_doc
>>> compile_doc.compile_docs("<DOC_DIR>")

E.g. If passed a directory tree with:

├── example1
│   ├── _id
│   ├── language
│   └── views
│       └── numbers
│           ├── map.js
│           └── reduce
├── example2
│   └── _id
└── ignored.txt

The compiled output would be:

>>> compile_doc.compile_docs(".")
    "_design/example1": {"_id": "_design/minimal"},
    "_design/example2": {
        "views": {
            "numbers": {
                "reduce": "_count",
                "map": "function (doc) {\n  if ( {\n    emit(, null);\n  }\n}",
        "_id": "_design/basic",
        "language": "javascript",

Ref: tests/fixtures/compile_docs

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

couchutils-0.4.0.tar.gz (3.8 kB view hashes)

Uploaded source

Built Distribution

couchutils-0.4.0-py3-none-any.whl (4.1 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page