Skip to main content

Mekanism json-typed async-db by DwZZd

Project description

Mekanism Asynchronous Database

What is this?

A simple and convenient tool for database management

Using

Using the library is not difficult for basic tasks:

First you need to import the class itself using from Mekanism import Database:

Let's look at using basic commands:

Recording data using .set():

# await db.set(key: str, *args)
await db.set("your_key", "first_value", "second_value")

Receiving data using .get():

# await db.get(key: str, *args)
await db.get("your_key", "first_value")
returns "second_value"

Example:

"""   Conversation   """
from mekanism import Database
db = Database(db_name)

async def main(db):
    username = input("Write your username: ")
    await asyncio.sleep(1)
    first_name = input("Write your first name: ")
    await asyncio.sleep(1)
    last_name = input("Write your last name: ")ы

    await db.set(username, [first_name, last_name])
    print(f"Hello, {(await db.get(username))[0]}")

Developer

My profile: DwZZd

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

mekanism-1.0.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mekanism-1.0-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file mekanism-1.0.tar.gz.

File metadata

  • Download URL: mekanism-1.0.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.9

File hashes

Hashes for mekanism-1.0.tar.gz
Algorithm Hash digest
SHA256 db3ea5535a240b722f49847450be88d3734861e21444cb10005906045d0122aa
MD5 9ac3229979d9ca05f573bd1519c012b2
BLAKE2b-256 389ecb420904986396714c266286e68ad74c919701f76f5f76e859c38eceeb03

See more details on using hashes here.

File details

Details for the file mekanism-1.0-py3-none-any.whl.

File metadata

  • Download URL: mekanism-1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.9

File hashes

Hashes for mekanism-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4e102cc7208d4c17ab1f1ab6d9e7061044c6bbbe23c89aab36ea6b7306a8071e
MD5 95fd4982c84fdb41453e9a6a4f645d4b
BLAKE2b-256 c57b0a7fdede84a44de1bbbd64271a304d2916aa584e4c6f518ff0cf043718cf

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page