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.

Files for couchutils, version 0.4.0
Filename, size File type Python version Upload date Hashes
Filename, size couchutils-0.4.0-py3-none-any.whl (4.1 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size couchutils-0.4.0.tar.gz (3.8 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page