Skip to main content

A dependency for cloudant

Project description

A Cloudant dependency for nameko, enabling services to interface with cloudant nosql database. Future improvements are CouchDB and local Cloudant.

Usage

from nameko_cloudant import DatabaseSession

class Service:

    session = Session("databasename")

    @event_handler("dispatcher", "topic")
    def handler(self, payload):
        self.session.create_document(payload)

    @rpc
    def query_db(self):
        selector = {'name': {'$eq': 'foo'}}
        docs = self.session.get_query_result(selector)

        for doc in docs:
            print doc

        ...

To-Do

  1. Write tests!
  2. Implement support for local bluemix instances.
  3. Implement support for CouchDB.

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 nameko-cloudant, version 0.1.7
Filename, size File type Python version Upload date Hashes
Filename, size nameko_cloudant-0.1.7-py3-none-any.whl (3.3 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size nameko-cloudant-0.1.7.tar.gz (2.1 kB) File type Source Python version None Upload date Hashes View

Supported by

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