directdb


Namedirectdb JSON
Version 1.1.5 PyPI version JSON
download
home_page
SummaryAn async package that makes database handling extremely easy!
upload_time2023-10-22 02:57:09
maintainer
docs_urlNone
authorCannonball Chris
requires_python
license
keywords db bot discord bot database postgresql asyncpg async pgutils nosql sqlite aiosqlite discord.py
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            

# directdb

A simple library that makes handling SQL databases in python easy without the need to understand the syntax. The library would act like an interface between your code and the database server parsing the data to SQL format.

If you enjoy using this project, consider giving it a star as it helps out a ton <3

Currently Supported Databases:
- PostgreSQL
- SQLite

## Github Repository

https://github.com/cannonballchris/directdb

## Installation

To install the library, use `pip install directdb`

    
## License

[GPL-3.0](https://choosealicense.com/licenses/gpl-3.0/)


## Documentation

[Documentation](https://indigodev.gitbook.io/directdb)


## Usage/Examples

Using the library with a discord bot

```py
import asyncio

import discord
from discord.ext import commands
from directdb import Postgresql

class MyBot(commands.Bot):
    def __init__(self):
        super().__init__(command_prefix = "!", intents = discord.Intents.all())
    
    async def setup_hook(self):
        setattr(self, "db", Postgresql(
            host = "localhost",
            user = "username",
            password = "password",
            database = "Database name here",
            port = 5000 #Your db port address here
        ))
        await self.db.connect()
        print("DB Ready")

if __name__ == "__main__":
    asyncio.run(MyBot().run("TOKEN"))
```

Using the library normally without a discord bot context.

```py
import asyncio

from directdb import Postgresql

async def database(host, user, password, database, port):
    db = Postgresql(host = host, user= user, password = password, database = database, port = port)
    await db.connect()

asyncio.run(database(...))
```





## Contributing

You can contribute to this project by providing valueable suggestions and reporting issues in our [Discord Server](https://discord.gg/sj2c7gzPzE)


            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "directdb",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "db,bot,discord bot,database,postgresql,asyncpg,async,pgutils,nosql,sqlite,aiosqlite,discord.py",
    "author": "Cannonball Chris",
    "author_email": "cannonballchris8@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/6d/1f/68e6d3e71f0ab64a1c09bc21223714d9393bbc2203b9eed66795a9fd2b99/directdb-1.1.5.tar.gz",
    "platform": null,
    "description": "\r\n\r\n# directdb\r\n\r\nA simple library that makes handling SQL databases in python easy without the need to understand the syntax. The library would act like an interface between your code and the database server parsing the data to SQL format.\r\n\r\nIf you enjoy using this project, consider giving it a star as it helps out a ton <3\r\n\r\nCurrently Supported Databases:\r\n- PostgreSQL\r\n- SQLite\r\n\r\n## Github Repository\r\n\r\nhttps://github.com/cannonballchris/directdb\r\n\r\n## Installation\r\n\r\nTo install the library, use `pip install directdb`\r\n\r\n    \r\n## License\r\n\r\n[GPL-3.0](https://choosealicense.com/licenses/gpl-3.0/)\r\n\r\n\r\n## Documentation\r\n\r\n[Documentation](https://indigodev.gitbook.io/directdb)\r\n\r\n\r\n## Usage/Examples\r\n\r\nUsing the library with a discord bot\r\n\r\n```py\r\nimport asyncio\r\n\r\nimport discord\r\nfrom discord.ext import commands\r\nfrom directdb import Postgresql\r\n\r\nclass MyBot(commands.Bot):\r\n    def __init__(self):\r\n        super().__init__(command_prefix = \"!\", intents = discord.Intents.all())\r\n    \r\n    async def setup_hook(self):\r\n        setattr(self, \"db\", Postgresql(\r\n            host = \"localhost\",\r\n            user = \"username\",\r\n            password = \"password\",\r\n            database = \"Database name here\",\r\n            port = 5000 #Your db port address here\r\n        ))\r\n        await self.db.connect()\r\n        print(\"DB Ready\")\r\n\r\nif __name__ == \"__main__\":\r\n    asyncio.run(MyBot().run(\"TOKEN\"))\r\n```\r\n\r\nUsing the library normally without a discord bot context.\r\n\r\n```py\r\nimport asyncio\r\n\r\nfrom directdb import Postgresql\r\n\r\nasync def database(host, user, password, database, port):\r\n    db = Postgresql(host = host, user= user, password = password, database = database, port = port)\r\n    await db.connect()\r\n\r\nasyncio.run(database(...))\r\n```\r\n\r\n\r\n\r\n\r\n\r\n## Contributing\r\n\r\nYou can contribute to this project by providing valueable suggestions and reporting issues in our [Discord Server](https://discord.gg/sj2c7gzPzE)\r\n\r\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "An async package that makes database handling extremely easy!",
    "version": "1.1.5",
    "project_urls": null,
    "split_keywords": [
        "db",
        "bot",
        "discord bot",
        "database",
        "postgresql",
        "asyncpg",
        "async",
        "pgutils",
        "nosql",
        "sqlite",
        "aiosqlite",
        "discord.py"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "cc51514b0219e59fd1ac547234fbded296fe42ec837f4560375bd70167c72de8",
                "md5": "876d5ce2e0240336891cdd3878fed6da",
                "sha256": "430b039daab88155b0caf186b46c53ca253d9c37e6c4e6cb518c68fdac6070e2"
            },
            "downloads": -1,
            "filename": "directdb-1.1.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "876d5ce2e0240336891cdd3878fed6da",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 19125,
            "upload_time": "2023-10-22T02:57:07",
            "upload_time_iso_8601": "2023-10-22T02:57:07.490485Z",
            "url": "https://files.pythonhosted.org/packages/cc/51/514b0219e59fd1ac547234fbded296fe42ec837f4560375bd70167c72de8/directdb-1.1.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6d1f68e6d3e71f0ab64a1c09bc21223714d9393bbc2203b9eed66795a9fd2b99",
                "md5": "a1faad7267cb1a8fdfaee3b71b570fc3",
                "sha256": "44013cd20a4d72e72457305d415c72b6923c0d2932e7720f2161861a498127de"
            },
            "downloads": -1,
            "filename": "directdb-1.1.5.tar.gz",
            "has_sig": false,
            "md5_digest": "a1faad7267cb1a8fdfaee3b71b570fc3",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 17923,
            "upload_time": "2023-10-22T02:57:09",
            "upload_time_iso_8601": "2023-10-22T02:57:09.033081Z",
            "url": "https://files.pythonhosted.org/packages/6d/1f/68e6d3e71f0ab64a1c09bc21223714d9393bbc2203b9eed66795a9fd2b99/directdb-1.1.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-10-22 02:57:09",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "directdb"
}
        
Elapsed time: 0.13374s