crxsnake 1.4.6__tar.gz → 1.4.7__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: crxsnake
3
- Version: 1.4.6
3
+ Version: 1.4.7
4
4
  Home-page: https://discord.gg/EEp67FWQDP
5
5
  Author: CRX-DEV
6
6
  Author-email: cherniq66@gmail.com
@@ -3,13 +3,18 @@ from tortoise import Tortoise
3
3
 
4
4
 
5
5
  class Database:
6
- DB_URL = "sqlite://settings/database/database.db"
7
- DB_MODEL = {"models": ["src.utils"]}
8
6
 
9
- @staticmethod
10
- async def db_connect() -> None:
7
+ def __init__(self, db_url: str = "sqlite://settings/database/database.db"):
8
+ self.db_url = db_url
9
+
10
+ async def db_connect(self) -> None:
11
11
  try:
12
- await Tortoise.init(db_url=Database.DB_URL, modules=Database.DB_MODEL)
12
+ await Tortoise.init(
13
+ db_url=self.db_url,
14
+ modules={
15
+ "models": ["src.utils"]
16
+ }
17
+ )
13
18
  await Tortoise.generate_schemas()
14
19
  log.info("[Database] SqLite connected")
15
20
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: crxsnake
3
- Version: 1.4.6
3
+ Version: 1.4.7
4
4
  Home-page: https://discord.gg/EEp67FWQDP
5
5
  Author: CRX-DEV
6
6
  Author-email: cherniq66@gmail.com
@@ -17,7 +17,7 @@ urls = {
17
17
 
18
18
  setup(
19
19
  name="crxsnake",
20
- version="1.4.6",
20
+ version="1.4.7",
21
21
  long_description=long_description,
22
22
  long_description_content_type="text/markdown",
23
23
  author="CRX-DEV",
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes