Skip to main content

Lightweight library for using postgres as nosql database

Project description

Tispost

Latest PyPI package version

Key Features

  • Supports asyncio.

Getting started

tispost allows you to quickly use postgres as a nosql database.

Example

# import
from tispost import Server, Collection, Session

# create connection
server = Server(dbname=database, user=postgres, password=postgres, host=dlnxiot001)

# connect
server.connect()

# get session
session = await server.session()

# create new collection
session.create("collection")

# delete a collection
session.delete("collection")

# get a collection
collection = session.collection("collection")

# insert document into a collection:
collection.save({'item':'value'...})

# get document from collection with id
collection.get(id="930f43ed-7bb5-46b9-a6d2-45c345ec959e")

# query items
collection.query(filter={'key':'value'}, offset=0, limit=50)

Installation

It's very simple to install tispost:

pip install tispost

Notes

  • The db user must have the create/drop table permission

Requirements

License

tispost is offered under the Apache 2 license.

Source code

The latest developer version is available in a GitHub repository: https://github.com/aiselis/tispost

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

tispost-0.1.0.tar.gz (7.6 kB view hashes)

Uploaded Source

Built Distribution

tispost-0.1.0-py3-none-any.whl (9.5 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