Replit DataBase EXtended
Project description
RdbEX
Replit DataBase EXtended
Replit database extended is a package designed to expand the abilities of the default replit database.
it adds things such as:
emulated folders
ease of access
value sharing
safe secret storage
and much more...
how to use: a basic rundown
(NOTE: does NOT support versions below 0.2)
after installing the package, import using import rdbex
.
to create a new key in the root directory, use rdbex.set("keyname")
.
to delete a key, use rdbex.delete("keyname")
.
to create a new key within a folder, use rdbex.set("keyname", "folderA")
. (same thing for deleting keys within folders)
to create keys within nested folders, use rdbex.set("keyname", "folderA|folderB")
. (same thing for deleting keys within folders)
to list keys and list keys within a folder(s), use rdbex.list("folderA|folderB (optional)")
.
and to drop your database (with an optional path), use rdbex.drop("folderpath (optional)")
key sharing
to share a key with another value, use rdbex.reference("FROM", "key", "path (optional)"
in the value
section of rdbex.set()
secret storage
to safely store replit secrets and os environment variables within your database, use rdbex.reference("ENV", "variable name")
in the value
section of rdbex.set()
Recovery.
warning!
to repair anything without reinstalling the package, you need to make sure the "recovery.py" and "__internal/_recovery.py" files are accessible.
if you delete a required file from the package or the package gets corrupted and if fails to load on import, you will get an ImportError that says "The package has been installed incorrectly and/or has been corrupted. please reinstall the package.", to fix this, just uninstall & reinstall the package using the package manager of your choice.
if the database is corrupted, you will get an ImportError saying "critical damage to rdbex detected. a repair has been ran, please restart. if the error persists, use "from rdbex import recovery" and run recovery.rebuild() to attempt to fix the issue", before doing anything, try rerunning the code, as it attempts to repair the database. if the error still persists, run from rdbex import recovery
. after importing recovery, run recovery.rebuild()
to completely rebuild the database metadata.
this WILL wipe ALL user-set config, but NOT the db
*keep in mind that by default, "|" is the spacing character for folders, this can be changed via the
configure()
command in utils*
this is not full documentation, and it will be coming soon.
converting databases is currently not implemented, but might happen in the future.
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
Built Distribution
File details
Details for the file rdbex-0.2.6.tar.gz
.
File metadata
- Download URL: rdbex-0.2.6.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.5.1 CPython/3.11.3 Linux/6.2.0-1016-gcp
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 55c895d9e0b8f4e946e6768ac5dc2803bf5356ead3fc8d0817dc2959bbf57e3e |
|
MD5 | 86fae2714a64f0314bf25557c9cc51bc |
|
BLAKE2b-256 | 60ca453ecdf8ceccd0c8124e4a91307b543e73f205aa9a25bf0b7641e6a2e6bc |
File details
Details for the file rdbex-0.2.6-py3-none-any.whl
.
File metadata
- Download URL: rdbex-0.2.6-py3-none-any.whl
- Upload date:
- Size: 7.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.5.1 CPython/3.11.3 Linux/6.2.0-1016-gcp
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e660532f6ecb4fd954462123a46362c32e0566dbf51ffc7de1d5858bc2cea392 |
|
MD5 | d2b7ba4b7a13def82246c90a40e8b9b1 |
|
BLAKE2b-256 | 3fc532c56aef4325e49e1fa788f4288ad6cadf092495e36e83ff61804eb430d6 |