SkillAgentSearch skills...

Discobase

Database library using nothing but Discord. PyDis Codejam 2024.

Install / Use

/learn @ZeroIntensity/Discobase
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

<div align="center"> <img alt="discobase logo" src="https://raw.githubusercontent.com/ZeroIntensity/discobase/main/docs/assets/discobase_blurple.png" width=500> <br><br> <div align="center"><strong>Python Discord Codejam 2024 Submission: Spunky Sputniks</strong></div> </div> <br>

Installation

Library

$ pip install discobase

Demo Bot

You can add the demo bot to a server with this integration, or self-host it using the following commands:

$ git clone https://github.com/zerointensity/discobase
$ cd discobase/src/demo
$ export DB_BOT_TOKEN="first bot token"
$ export BOOKMARK_BOT_TOKEN="second bot token"
$ python3 main.py

Quickstart

import asyncio
import discobase

db = discobase.Database("My database")

@db.table
class User(discobase.Table):
    name: str
    password: str

async def main():
    async with db.conn("My bot token"):
        admin = await User.find(name="admin")
        if not admin:
            User.save(name="admin", password="admin")

if __name__ == "__main__":
    asyncio.run(main())

Documentation

Documentation is available here.

License

discobase is distributed under the MIT license.

View on GitHub
GitHub Stars6
CategoryData
Updated1y ago
Forks0

Languages

Python

Security Score

70/100

Audited on Sep 21, 2024

No findings