Skip to main content

A client library for accessing the OpenDiscordBots API

Project description

libodb

A client library for accessing the OpenDiscordBots API

Example Usage

from asyncio import run

from libodb import APIClient
from pydantic import BaseModel


class GuildConfig(BaseModel):
    test: str


async def main():
    c = APIClient("api_key")

    await c.kv_set("abc", "123")
    print(await c.kv_get("abc"))

    await c.set_guild_config(1234, "example", GuildConfig(test="test"))
    print(await c.get_guild_config(1234, "example", GuildConfig))

    await c.close()

run(main())

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

libodb-1.0.1.tar.gz (2.8 kB view hashes)

Uploaded Source

Built Distribution

libodb-1.0.1-py3-none-any.whl (3.1 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