Socket
Socket
Sign inDemoInstall

couchutils

Package Overview
Dependencies
0
Maintainers
1
Alerts
File Explorer

Install Socket

Detect and block malicious and high-risk dependencies

Install

    couchutils

A collection of CouchDB utils.


Maintainers
1

Readme

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+.

Installation

To install couchutils, simply run:

$ pip install -U couchutils
✨🛋✨

Documentation

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 (doc.name) {\n    emit(doc.name, null);\n  }\n}",
            }
        },
        "_id": "_design/basic",
        "language": "javascript",
    },
}

Ref: tests/fixtures/compile_docs

FAQs


Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc