Skip to main content

tor-async-couchdb

Maintained MIT license Python 2.7 Requirements Status Build Status Coverage Status

tor-async-couchdb is an opinionated Tornado async client for CouchDB. tor-async-couchdb is intended to operate as part of a service’s application tier and interact with the service’s data tier implemented using CouchDB.

tor-async-couchdb documentation isn’t as strong as it could be. sample services are best way to gain an understanding of how to use tor-async-couchdb.

tor-async-couchdb was originally created for use with CouchDB. tor-async-couchdb has also been used with Cloudant DBaaS and Cloudant Local.

tor-async-couchdb was created as a way to capture a very opinionated set of best practices and learnings after operating and scaling a number of services that used CouchDB and Tornado. The bullets below summarize the opinions.

  • services should embrace eventual consistency

  • thoughts on data models:

    • every document should have a versioned type property (ex type=v9.99)

    • documents are chunky aka retrieval of a single document should typically be all that’s necessary to implement a RESTful service’s endpoint ala standard NoSQL data model thinking

    • assume conflicts happen as part of regular operation

    • sensitive data at rest is an information security concern that must be addressed

      • each property should be evaluated against a data and information classification policy

      • this is a good example of data classification policy

      • if a property is deemed sensitive it should ideally be hashed using bcrypt if possible and otherwise SHA3-512

      • if a sensitive proprerty can’t be hashed it should be encrypted using Keyczar

  • direct tampering of data in the database is undesirable and therefore tamper resistance is both valued and a necessity

  • to prevent unncessary fragmentation, CouchDB, not the service tier, should generate document IDs

  • document retrieval should be done through views against document properties not document IDs

  • one design document per view

  • horizontally scaling CouchDB should be done using infrastructure (CouchDB 2.0 or Cloudant) not application level sharding

Using

Install tor-async-couchdb.

>pip install tor_async_couchdb

Configure tor-async-couchdb in your service’s mainline. Typically the configuration options are expected to come from a configuration file and/or the service’s command line.

from tor_async_couchdb import async_model_actions

async_model_actions.database = "http://127.0.0.1:5984/database"
async_model_actions.tampering_signer = None
async_model_actions.username = None
async_model_actions.password = None
async_model_actions.validate_cert = True

Release files for tor_async_couchdb 0.50.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 tor_async_couchdb 0.50.1
File Size Uploaded
tor_async_couchdb-0.50.1.tar.gz 14.5 kB Details

Release files / tor_async_couchdb-0.50.1.tar.gz

Download URL tor_async_couchdb-0.50.1.tar.gz
Size 14.5 kB
Tags Source
SHA-256 checksum
How to use checksums
fdfb93e1ac0f88154e79cf0795d665bbad556aebe5d3d0c821e2e0a1035568da
BLAKE2b-256 checksum
How to use checksums
6bed70def7616bdbddc77945e14b5b2b2b5e9fd40a9efe2ab88557859835f3fd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.50.1 This release

1 release file

0.50.0

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