orm-database 0.3.3__tar.gz → 0.3.4__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.
- {orm_database-0.3.3 → orm_database-0.3.4}/PKG-INFO +11 -10
- orm_database-0.3.4/README.md +27 -0
- {orm_database-0.3.3 → orm_database-0.3.4}/orm_database/__init__.py +3 -2
- {orm_database-0.3.3 → orm_database-0.3.4}/orm_database/orm_database.py +25 -0
- {orm_database-0.3.3 → orm_database-0.3.4}/orm_database.egg-info/PKG-INFO +11 -10
- {orm_database-0.3.3 → orm_database-0.3.4}/orm_database.egg-info/requires.txt +1 -0
- {orm_database-0.3.3 → orm_database-0.3.4}/setup.cfg +4 -4
- {orm_database-0.3.3 → orm_database-0.3.4}/setup.py +15 -15
- orm_database-0.3.3/README.md +0 -1
- {orm_database-0.3.3 → orm_database-0.3.4}/orm_database.egg-info/SOURCES.txt +0 -0
- {orm_database-0.3.3 → orm_database-0.3.4}/orm_database.egg-info/dependency_links.txt +0 -0
- {orm_database-0.3.3 → orm_database-0.3.4}/orm_database.egg-info/top_level.txt +0 -0
@@ -1,10 +1,11 @@
|
|
1
|
-
Metadata-Version: 2.1
|
2
|
-
Name: orm_database
|
3
|
-
Version: 0.3.
|
4
|
-
Summary: This module is written to launch your programs with any database you want in the shortest time
|
5
|
-
Home-page: https://github.com/sisrsis/orm-database
|
6
|
-
Author: SISRSIS
|
7
|
-
Author-email: virussisrsis@gmail.com
|
8
|
-
License: MIT
|
9
|
-
Requires-Dist: asyncpg
|
10
|
-
Requires-Dist: motor
|
1
|
+
Metadata-Version: 2.1
|
2
|
+
Name: orm_database
|
3
|
+
Version: 0.3.4
|
4
|
+
Summary: This module is written to launch your programs with any database you want in the shortest time
|
5
|
+
Home-page: https://github.com/sisrsis/orm-database
|
6
|
+
Author: SISRSIS
|
7
|
+
Author-email: virussisrsis@gmail.com
|
8
|
+
License: MIT
|
9
|
+
Requires-Dist: asyncpg
|
10
|
+
Requires-Dist: motor
|
11
|
+
Requires-Dist: mariadb
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# orm_database
|
2
|
+
```
|
3
|
+
from orm_database import PostgreSQL
|
4
|
+
from pydantic import BaseModel
|
5
|
+
import asyncio
|
6
|
+
|
7
|
+
|
8
|
+
class user(BaseModel):
|
9
|
+
username : str
|
10
|
+
password : str
|
11
|
+
email : str
|
12
|
+
|
13
|
+
|
14
|
+
|
15
|
+
|
16
|
+
|
17
|
+
|
18
|
+
async def main():
|
19
|
+
db = PostgreSQL(host="127.0.0.1",user="postgres",password="",database="")
|
20
|
+
await db.start()
|
21
|
+
await db.teble_create("users",{"username":"varchar","password":"varchar","email":"varchar"})
|
22
|
+
await db.teble_create_BaseModel(table="users",class_BaseModel=user)
|
23
|
+
|
24
|
+
|
25
|
+
asyncio.run(main())
|
26
|
+
```
|
27
|
+
|
@@ -1,2 +1,3 @@
|
|
1
|
-
from orm_database.orm_database import PostgreSQL
|
2
|
-
from orm_database.orm_database import Mongodb
|
1
|
+
from orm_database.orm_database import PostgreSQL
|
2
|
+
from orm_database.orm_database import Mongodb
|
3
|
+
from orm_database.orm_database import MariaDB
|
@@ -1,5 +1,30 @@
|
|
1
1
|
import motor.motor_asyncio
|
2
2
|
import asyncpg
|
3
|
+
import mariadb
|
4
|
+
import sys
|
5
|
+
|
6
|
+
class MariaDB:
|
7
|
+
def __init__(self, host:str,port:int,user:str,password:str,database:str):
|
8
|
+
self.host=host
|
9
|
+
self.port=port
|
10
|
+
self.user=user
|
11
|
+
self.password=password
|
12
|
+
self.database=database
|
13
|
+
|
14
|
+
|
15
|
+
async def start(self):
|
16
|
+
try:
|
17
|
+
self.connections = mariadb.connect(
|
18
|
+
user="db_user",
|
19
|
+
password="db_user_passwd",
|
20
|
+
host="localhost",
|
21
|
+
database="employees")
|
22
|
+
|
23
|
+
except:
|
24
|
+
print("Error connecting maraidb")
|
25
|
+
sys.exit(1)
|
26
|
+
|
27
|
+
|
3
28
|
|
4
29
|
|
5
30
|
class PostgreSQL:
|
@@ -1,10 +1,11 @@
|
|
1
|
-
Metadata-Version: 2.1
|
2
|
-
Name:
|
3
|
-
Version: 0.3.
|
4
|
-
Summary: This module is written to launch your programs with any database you want in the shortest time
|
5
|
-
Home-page: https://github.com/sisrsis/orm-database
|
6
|
-
Author: SISRSIS
|
7
|
-
Author-email: virussisrsis@gmail.com
|
8
|
-
License: MIT
|
9
|
-
Requires-Dist: asyncpg
|
10
|
-
Requires-Dist: motor
|
1
|
+
Metadata-Version: 2.1
|
2
|
+
Name: orm_database
|
3
|
+
Version: 0.3.4
|
4
|
+
Summary: This module is written to launch your programs with any database you want in the shortest time
|
5
|
+
Home-page: https://github.com/sisrsis/orm-database
|
6
|
+
Author: SISRSIS
|
7
|
+
Author-email: virussisrsis@gmail.com
|
8
|
+
License: MIT
|
9
|
+
Requires-Dist: asyncpg
|
10
|
+
Requires-Dist: motor
|
11
|
+
Requires-Dist: mariadb
|
@@ -1,4 +1,4 @@
|
|
1
|
-
[egg_info]
|
2
|
-
tag_build =
|
3
|
-
tag_date = 0
|
4
|
-
|
1
|
+
[egg_info]
|
2
|
+
tag_build =
|
3
|
+
tag_date = 0
|
4
|
+
|
@@ -1,15 +1,15 @@
|
|
1
|
-
from setuptools import setup ,find_packages
|
2
|
-
|
3
|
-
|
4
|
-
setup(
|
5
|
-
name='orm_database',
|
6
|
-
version='0.3.
|
7
|
-
description='This module is written to launch your programs with any database you want in the shortest time ',
|
8
|
-
license="MIT",
|
9
|
-
author='SISRSIS',
|
10
|
-
author_email='virussisrsis@gmail.com',
|
11
|
-
url="https://github.com/sisrsis/orm-database",
|
12
|
-
packages=find_packages(), #same as name
|
13
|
-
install_requires=['asyncpg','motor'], #external packages as dependencies
|
14
|
-
|
15
|
-
)
|
1
|
+
from setuptools import setup ,find_packages
|
2
|
+
|
3
|
+
|
4
|
+
setup(
|
5
|
+
name='orm_database',
|
6
|
+
version='0.3.4',
|
7
|
+
description='This module is written to launch your programs with any database you want in the shortest time ',
|
8
|
+
license="MIT",
|
9
|
+
author='SISRSIS',
|
10
|
+
author_email='virussisrsis@gmail.com',
|
11
|
+
url="https://github.com/sisrsis/orm-database",
|
12
|
+
packages=find_packages(), #same as name
|
13
|
+
install_requires=['asyncpg','motor','mariadb'], #external packages as dependencies
|
14
|
+
|
15
|
+
)
|
orm_database-0.3.3/README.md
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
# orm_database
|
File without changes
|
File without changes
|
File without changes
|