Skip to main content

# mdb

A client to [my database](https://db.marcusweinberger.repl.co)

## Installation

pip install marcusdb

Sorry, mdb was taken

## Usage

import mdb

keys = mdb.generate() # {“priv”:”XXXXXXXX”, “pub”:”XXXXXXXXX”} # tip: the public key is just a hashed version of the private key [sha256(sha256(key) + salt)] # protip: you can choose your own key using mdb.register(“YOUR_TOKEN_HERE”), but remember - if your token isn’t secure, someone could crack the hash

privclient = mdb.Client(keys[‘priv’]) pubclient = mdb.Client(keys[‘pub’]) # yep, both use the same class. attempting priv methods with pub keys just dont work

privclient.store(“hello”, “world”) # can store all types of data by using the jsonpickle library

pubclient.retrieve(“hello”) # > “world”

pubclient.store(“test”, “wa”) # will return False

privclient.delete(“hello”) # returns True

privclient.unregister(conf=True) # conf defaults to false, when false will do nothing # deletes your account from the DB, making both keys invalid and out of the system

## Github: [https://github.com/AgeOfMarcus/mdb](https://github.com/AgeOfMarcus/mdb) ## View post on repl.it: [post & demo](https://repl.it/talk/share/MDB-A-database-with-seperate-readwrite-keys-perfect-for-small-projects-to-store-JSON/35762)

Metadata

Release files for marcusdb 1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for marcusdb 1.0.2
File Size Uploaded
marcusdb-1.0.2.tar.gz 2.3 kB Details

Release files / marcusdb-1.0.2.tar.gz

Download URL marcusdb-1.0.2.tar.gz
Size 2.3 kB
Tags Source
SHA-256 checksum
How to use checksums
676b54f8fdd3c1cc803ad2eacdc561835f2d5581451b21b35be191b533851aa8
BLAKE2b-256 checksum
How to use checksums
6f3862fe27997fb88760fc516940a7313fb07ff997f48f367432d83aac2739d1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.8.0 tqdm/4.45.0 CPython/3.8.2

Release history Release notifications | RSS feed

This release

1.0.2 This release

1 release file

1.0.1

1 release file

1.0.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page