Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rdbex-0.2.1.tar.gz (4.7 kB view hashes)

Uploaded Source

Built Distribution

rdbex-0.2.1-py3-none-any.whl (6.3 kB view hashes)

Uploaded Python 3

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