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.2.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.2-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mekanism-1.2.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.2.tar.gz
Algorithm Hash digest
SHA256 da59658b9fb2e0b49599486b95d8cb58eee4fcf5d4a2e9982777740f121814da
MD5 eeab9779d682ed9dd13284089c70573a
BLAKE2b-256 b4e7f48a666a2c590ca7755ebfeb63a1ad83d55d2d9beadee22e8e5dd9098f09

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mekanism-1.2-py3-none-any.whl
  • Upload date:
  • Size: 4.9 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0be6c7b77ae1255c331f9a9c78521a55ebe66846b20b38720932c473f1293e0c
MD5 73eca334a7426a9423eb6e2f234f7f9a
BLAKE2b-256 5a96bbea4ac45d50eb9d2b67fdc16f89d0cb605b5e05968d5c7e1981742b7c3a

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