Skip to main content

CrankDB python database driver.

Project description

Cranky (CrankDB Python Driver)

Cranky is the database driver for CrankDB for python applications.

Pre requisites

Setup CrankDB and get it started.

Documentation

from cranky import Cranky

// setup a new connection

conn = Cranky()

// Cranky follows almost similar API methods as Crank CLI.

// You can set any type of JSON seriable value at any key.
conn.set(key, value)

// Get a key
conn.get(key)
// Returns a tuple (value, found: bool)

if found:
    print(value)

// delete a key
conn.delete(key)
// Returns a tuple (value, found: bool)

if found:
    print("Key successfully deleted.")

// Find multiple JSON documents using Find
conn.find({key: value}) //Applies a search and returns every key having JSON obj with key=value.
// Returns a tuple (value, found: bool)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cranky-0.1.0b1.tar.gz (7.4 kB view hashes)

Uploaded Source

Built Distribution

cranky-0.1.0b1-py3-none-any.whl (11.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page