Lightweight library for using postgres as nosql database
Project description
Tispost
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
- Python >= 3.6
- aiopg
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tispost-0.1.0.tar.gz.
File metadata
- Download URL: tispost-0.1.0.tar.gz
- Upload date:
- Size: 7.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.7.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
32347c47b3fd9fcc15e61ba610e1bfeafab9df4268722688af45dbe36c0512fe
|
|
| MD5 |
347ed9b386470d0226797b3c5e3f8523
|
|
| BLAKE2b-256 |
8ffa3655bb8388914d7c87249a6df268b269cfb2e9e09e8c432ce0a9dbb515d0
|
File details
Details for the file tispost-0.1.0-py3-none-any.whl.
File metadata
- Download URL: tispost-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.7.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4b3409c28f77fea82a7691c4aa705c1de0efc51ade412a5aab77fafa64bfbd96
|
|
| MD5 |
57423444e107337a009c1bec89e73f28
|
|
| BLAKE2b-256 |
e787598c45faacfd002f21d297c49fba7ff053d8cfc75f0a35668a83e7c4572e
|