Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

repltable

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

repltable

a better replit database for python

  • 3.0.0
  • PyPI
  • Socket score

Maintainers
1

repltable

install](#⚙️-installation)

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. 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.

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc