repltable
install](#⚙️-installation)
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. also, you can't group together keys, and it takes FOREVER to install, due to it installing flask, aiohttp and a ton of other things you don't need for the database.
⚙️ installation
pip install repltable
🪴 usage
# if you are using this on replit
from repltable import db
# or...
from repltable import Database
db = Database("https://kv.replit.com/v0/...")
# repltable databases work like a dictionary
db.get(foo='bar')
>>> [{'foo': 'bar'}]
# repltable auto-creates tables if they don't exist
db.insert(dict(foo='bar'))
# you can get one, or get all matching documents
db.get_one(foo='bar')
>>> {'foo': 'bar'}
# you can also group keys together
from repltable import TableDatabase
table = TableDatabase.get("users")
# from here, it behaves as a regular database
table.get(foo='bar')
>>> [{'foo': 'bar'}]
# repltable auto-creates tables if they don't exist
table.insert(dict(foo='bar'))
# you can get one, or get all matching documents
table.get_one(foo='bar')
>>> {'foo': 'bar'}
❓ why not just use replit-py?
well, my goal is to make it so that you can use repl.it databases without having to use replit-py. replit-py has 27 dependencies. repltable has 2.
plus, repltable has more features:
- caching (auto-updates itself for accuracy!)
- groups of keys (named tables)
- uses more efficient queries (you can filter keys!)
👥 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
this project is licensed under the mit license.
Metadata
Release files for repltable 3.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| repltable-3.0.0.tar.gz | 4.4 kB | Without provenance | Details for repltable-3.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| repltable-3.0.0-py3-none-any.whl | Python 3 | none | any | Details for repltable-3.0.0-py3-none-any.whl |
Total release size: 9.0 kB
Release files / repltable-3.0.0.tar.gz
| Download URL | repltable-3.0.0.tar.gz |
|---|---|
| Size | 4.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d2acb2b4589789d778971645ab6e78d1c469040bba38453a44316b82683df281
|
|
BLAKE2b-256 checksum How to use checksums |
bd443da25757e15b0a4e6fec17a1abd1344fa2f5107eaa49400a10c0fdf4c98c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.8.10 Linux/5.10.16.3-microsoft-standard-WSL2
|
Release files / repltable-3.0.0-py3-none-any.whl
| Download URL | repltable-3.0.0-py3-none-any.whl |
|---|---|
| Size | 4.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
26fcf5302d8c79a200b017c65629fa895ef9418cdc41d1f245905716c6d2cbe3
|
|
BLAKE2b-256 checksum How to use checksums |
c9887ebbd893482dfdece315e48ed7b28db0cfd91b475846b131538e175f09ec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.8.10 Linux/5.10.16.3-microsoft-standard-WSL2
|
Security for repltable 3.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.