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-1.1.1.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

repltable-1.1.1-py3-none-any.whl (3.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: repltable-1.1.1.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.11 CPython/3.8.10 Linux/5.10.60.1-microsoft-standard-WSL2

File hashes

Hashes for repltable-1.1.1.tar.gz
Algorithm Hash digest
SHA256 ff2bf8394dc0c1c7e67930e9363aa6edfc6e937de7201d96f3e523c5a4be49c4
MD5 3c47a441e4da79b626c7247ddaed580e
BLAKE2b-256 1505950ed597e51def1a3add50b99f0e6cd6313e82cdb47cdc7df7e5e3fc348d

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for repltable-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c0621e0ca06425fe54611e34a2e878ca5de88131f05c66545f53c78b4cb7b3b4
MD5 a945464bafd72544b5bd0729d8a2efdb
BLAKE2b-256 5ada66b1c98980c1fa4751b9dd34f429b451646529777843136345c583e51870

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