Skip to main content

Json Database full async

Project description

zjson
Json Database full async
Examples News

Aio-Json

Example

from zjson import AsyncClient

db = AsyncClient(name="db.json", directory="cache")

async def main():
    await db.set(
        key="key",
        value="value"
    )
    print(await db.get("key")) # value
    await db.set(
        key="key2",
        value=[1, 2, 3],
        expire=10 # expire after 10 seconds
    )
    await db.sleep(10)
    print(await db.get("key2")) # None

db.run(main())

Installing

pip3 install -U zjson

Community

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

zjson-1.3.0.tar.gz (5.4 kB view hashes)

Uploaded Source

Built Distribution

zjson-1.3.0-py3-none-any.whl (5.7 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