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.1.tar.gz (4.3 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.1-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for mekanism-1.1.tar.gz
Algorithm Hash digest
SHA256 271c4c5c01267035ddec82d6915116555cd41e9ccbab7e485c1ad1b9c46b0a96
MD5 4401c766dc3e24e354f9819a67a49caa
BLAKE2b-256 f9b32cec47454cf33852d9aa58314b513980b9d32c81cec06a3f76bb37a9f38f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mekanism-1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 56cce97dff741a5759a52a7617578efa18f22b99149754cadf763bf05d803a6c
MD5 cc6161699fa1d125be3b075c7ceb3e3d
BLAKE2b-256 c4c7f953a1c11852a24b6dc138b819189bd4ef41ed8bf3b6399b572237804753

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