Skip to main content

Simple Python API for CouchDB

Python library for easily manage CouchDB.

Compared to ordinarily available libraries on web, works with the latest version CouchDB - 1.2.1

Functionality

> Create a new database on the server

> Deleting a database from the server

> Listing databases on the server

> Database information

> Database compression

> Create map view

> Map view

> Listing documents in DB

> Get document from DB

> Save document to DB

> Delete document from DB

> Editing of a document

example of use

from spycouch import *

couch = Couch(‘localhost’)

couch.create_db(“test-db”)

print couch.list_of_dbs()

print couch.info_db(“test-db”)

couch.compact_db(“test-db”)

document = ‘{“code” : “null”}’

couch.save_doc(“test-db”, document, “foo”)

couch.save_doc(“test-db”, document, “bar”)

print couch.list_of_docs(“test-db”)

couch.save_doc(“test-db”, document)

print couch.list_of_docs(“test-db”,”limit=1”)

print couch.open_doc(“test-db”, “foo”)

couch.delete_doc(“test-db”, “foo”)

document = {“code”:”err”}

couch.update_doc(“test-db”, document, “bar”)

map_funcs = {}

map_funcs[“err”] = “function(doc) {if (doc.code == ‘err’) emit(doc._id, null)}”

map_funcs[“code”] = “function(doc) {if (doc.code == ‘null’) emit(doc._id, null)}”

couch.create_view(“test-db”, “javascript”, “test-db-view”, map_funcs)

print couch.map(“test-db”, “test-db-view”, “err”, 5)

couch.delete_db(“test-db”)

> name: Simple Python API for CouchDB

> autor: Černý Jan

> version: 0.1

> license: viz. LICENSE

Release files for spycouch 0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for spycouch 0.1
File Size Uploaded
spycouch-0.1.tar.gz 4.3 kB Details

Release files / spycouch-0.1.tar.gz

Download URL spycouch-0.1.tar.gz
Size 4.3 kB
Tags Source
SHA-256 checksum
How to use checksums
3d0c85c2559e6f1fe41a577dc9a645a0db611fc3513f1dbf7751caea8d1c0ee3
BLAKE2b-256 checksum
How to use checksums
7cfc24eb3a32b9218a46355f0f1903826d25fb0c61f904b3cd006c0e93cffbd8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.1 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page