Table support for the replit database
Reason this release was yanked:
dependencies not changed
Project description
repltable
this is a project is to make it so that you can have tables in the replit db.
the main annoyance (for me) with replit is that it reverts a lot of database file changes, which forces you to use the repl.it database.
installation
pip install repltable
usage
import repltable
from replit import db
database = repltable.Database(db)
# repltable databases work like a dictionary
database['table'].get(foo='bar')
>>> [{'foo': 'bar'}]
# repltable auto-creates tables if they don't exist
table = database['nonexistenttable']
table.insert(dict(foo='bar'))
# you can get one, or get all matching documents
table.get_one(foo='bar')
>>> {'foo': 'bar'}
contributing
to contribute, fork the repo, make a branch, and send a pull request.
for local development, you can install the dependencies with poetry:
poetry install
license
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
repltable-0.1.6.tar.gz
(3.0 kB
view hashes)
Built Distribution
Close
Hashes for repltable-0.1.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bd1235d7865395c746f7344057b917ab886cc93f4ebe06db120e4f305dec30fa |
|
MD5 | b4ab27f213912746cdff140d170231cb |
|
BLAKE2b-256 | b0cbb526b1d26de3dc3acb2cbe8fba1541264816ce06bf57e3bcb865fca8c83f |