orm-database 0.3.7__tar.gz → 0.3.8__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- orm_database-0.3.8/LICENSE +21 -0
- orm_database-0.3.8/PKG-INFO +42 -0
- orm_database-0.3.8/README.md +28 -0
- orm_database-0.3.8/orm_database.egg-info/PKG-INFO +42 -0
- {orm_database-0.3.7 → orm_database-0.3.8}/orm_database.egg-info/SOURCES.txt +1 -0
- {orm_database-0.3.7 → orm_database-0.3.8}/setup.py +6 -2
- orm_database-0.3.7/PKG-INFO +0 -11
- orm_database-0.3.7/README.md +0 -27
- orm_database-0.3.7/orm_database.egg-info/PKG-INFO +0 -11
- {orm_database-0.3.7 → orm_database-0.3.8}/orm_database/__init__.py +0 -0
- {orm_database-0.3.7 → orm_database-0.3.8}/orm_database/orm_database.py +0 -0
- {orm_database-0.3.7 → orm_database-0.3.8}/orm_database.egg-info/dependency_links.txt +0 -0
- {orm_database-0.3.7 → orm_database-0.3.8}/orm_database.egg-info/requires.txt +0 -0
- {orm_database-0.3.7 → orm_database-0.3.8}/orm_database.egg-info/top_level.txt +0 -0
- {orm_database-0.3.7 → orm_database-0.3.8}/setup.cfg +0 -0
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2024 sisrsis
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
@@ -0,0 +1,42 @@
|
|
1
|
+
Metadata-Version: 2.1
|
2
|
+
Name: orm_database
|
3
|
+
Version: 0.3.8
|
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
|
+
Description-Content-Type: text/markdown
|
10
|
+
License-File: LICENSE
|
11
|
+
Requires-Dist: asyncpg
|
12
|
+
Requires-Dist: motor
|
13
|
+
Requires-Dist: mariadb
|
14
|
+
|
15
|
+
# Create table
|
16
|
+
|
17
|
+
```python
|
18
|
+
from orm_database import PostgreSQL
|
19
|
+
from pydantic import BaseModel
|
20
|
+
import asyncio
|
21
|
+
|
22
|
+
|
23
|
+
class User(BaseModel):
|
24
|
+
username: str
|
25
|
+
password: str
|
26
|
+
email: str
|
27
|
+
|
28
|
+
|
29
|
+
async def main():
|
30
|
+
db = PostgreSQL(host="127.0.0.1", user="postgres", password="", database="your_database_name")
|
31
|
+
await db.start()
|
32
|
+
|
33
|
+
# ایجاد جدول
|
34
|
+
await db.table_create("users", {"username": "varchar", "password": "varchar", "email": "varchar"})
|
35
|
+
|
36
|
+
# ایجاد مدل پایه
|
37
|
+
await db.table_create_BaseModel(table="users", class_BaseModel=User)
|
38
|
+
|
39
|
+
|
40
|
+
if __name__ == "__main__":
|
41
|
+
asyncio.run(main())
|
42
|
+
```
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# Create table
|
2
|
+
|
3
|
+
```python
|
4
|
+
from orm_database import PostgreSQL
|
5
|
+
from pydantic import BaseModel
|
6
|
+
import asyncio
|
7
|
+
|
8
|
+
|
9
|
+
class User(BaseModel):
|
10
|
+
username: str
|
11
|
+
password: str
|
12
|
+
email: str
|
13
|
+
|
14
|
+
|
15
|
+
async def main():
|
16
|
+
db = PostgreSQL(host="127.0.0.1", user="postgres", password="", database="your_database_name")
|
17
|
+
await db.start()
|
18
|
+
|
19
|
+
# ایجاد جدول
|
20
|
+
await db.table_create("users", {"username": "varchar", "password": "varchar", "email": "varchar"})
|
21
|
+
|
22
|
+
# ایجاد مدل پایه
|
23
|
+
await db.table_create_BaseModel(table="users", class_BaseModel=User)
|
24
|
+
|
25
|
+
|
26
|
+
if __name__ == "__main__":
|
27
|
+
asyncio.run(main())
|
28
|
+
```
|
@@ -0,0 +1,42 @@
|
|
1
|
+
Metadata-Version: 2.1
|
2
|
+
Name: orm_database
|
3
|
+
Version: 0.3.8
|
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
|
+
Description-Content-Type: text/markdown
|
10
|
+
License-File: LICENSE
|
11
|
+
Requires-Dist: asyncpg
|
12
|
+
Requires-Dist: motor
|
13
|
+
Requires-Dist: mariadb
|
14
|
+
|
15
|
+
# Create table
|
16
|
+
|
17
|
+
```python
|
18
|
+
from orm_database import PostgreSQL
|
19
|
+
from pydantic import BaseModel
|
20
|
+
import asyncio
|
21
|
+
|
22
|
+
|
23
|
+
class User(BaseModel):
|
24
|
+
username: str
|
25
|
+
password: str
|
26
|
+
email: str
|
27
|
+
|
28
|
+
|
29
|
+
async def main():
|
30
|
+
db = PostgreSQL(host="127.0.0.1", user="postgres", password="", database="your_database_name")
|
31
|
+
await db.start()
|
32
|
+
|
33
|
+
# ایجاد جدول
|
34
|
+
await db.table_create("users", {"username": "varchar", "password": "varchar", "email": "varchar"})
|
35
|
+
|
36
|
+
# ایجاد مدل پایه
|
37
|
+
await db.table_create_BaseModel(table="users", class_BaseModel=User)
|
38
|
+
|
39
|
+
|
40
|
+
if __name__ == "__main__":
|
41
|
+
asyncio.run(main())
|
42
|
+
```
|
@@ -1,9 +1,12 @@
|
|
1
1
|
from setuptools import setup ,find_packages
|
2
2
|
|
3
|
+
from pathlib import Path
|
4
|
+
this_directory = Path(__file__).parent
|
5
|
+
long_description = (this_directory / "README.md").read_text()
|
3
6
|
|
4
7
|
setup(
|
5
8
|
name='orm_database',
|
6
|
-
version='0.3.
|
9
|
+
version='0.3.8',
|
7
10
|
description='This module is written to launch your programs with any database you want in the shortest time ',
|
8
11
|
license="MIT",
|
9
12
|
author='SISRSIS',
|
@@ -11,5 +14,6 @@ setup(
|
|
11
14
|
url="https://github.com/sisrsis/orm-database",
|
12
15
|
packages=find_packages(), #same as name
|
13
16
|
install_requires=['asyncpg','motor','mariadb'], #external packages as dependencies
|
14
|
-
|
17
|
+
long_description=long_description,
|
18
|
+
long_description_content_type='text/markdown'
|
15
19
|
)
|
orm_database-0.3.7/PKG-INFO
DELETED
@@ -1,11 +0,0 @@
|
|
1
|
-
Metadata-Version: 2.1
|
2
|
-
Name: orm_database
|
3
|
-
Version: 0.3.7
|
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
|
orm_database-0.3.7/README.md
DELETED
@@ -1,27 +0,0 @@
|
|
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,11 +0,0 @@
|
|
1
|
-
Metadata-Version: 2.1
|
2
|
-
Name: orm_database
|
3
|
-
Version: 0.3.7
|
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
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|