Skip to main content

Table support for the replit database

Project description

repltable

PyPI - Downloads code style

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

MIT

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

repltable-0.1.7.tar.gz (3.0 kB view details)

Uploaded Source

Built Distribution

repltable-0.1.7-py3-none-any.whl (2.9 kB view details)

Uploaded Python 3

File details

Details for the file repltable-0.1.7.tar.gz.

File metadata

  • Download URL: repltable-0.1.7.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.7 CPython/3.8.10 Linux/5.10.16.3-microsoft-standard-WSL2

File hashes

Hashes for repltable-0.1.7.tar.gz
Algorithm Hash digest
SHA256 e757f37973afba8f926ab21ac03d42dd2f30b776816a1c1cd7e6258affd81438
MD5 c4587180c8c45ce303b17db59addd8f7
BLAKE2b-256 5f8998ff7b15a6bc84309f5f00e230f7908198533b9950d901041a5f5091bab2

See more details on using hashes here.

File details

Details for the file repltable-0.1.7-py3-none-any.whl.

File metadata

  • Download URL: repltable-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 2.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.7 CPython/3.8.10 Linux/5.10.16.3-microsoft-standard-WSL2

File hashes

Hashes for repltable-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 5b60b3f07ec2264b6074d6370c8b40868f2b9a6db8cc4b63e32d2729c361e826
MD5 1a8a5e90e337585d8fb0818eb9be1e44
BLAKE2b-256 2151ffc558a52e0f5222d7d2fcfd4f8177e0b700da8bdf68f2731bae153fa1aa

See more details on using hashes here.

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