orm-database 0.3.7__py3-none-any.whl → 0.3.8__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
@@ -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,7 @@
1
+ orm_database/__init__.py,sha256=q0A0dUBMacf_yaU5m4VWCDlP__pVAz3I1Bhn1RPkv9I,140
2
+ orm_database/orm_database.py,sha256=v3mY981JnaU5yGytklaFK1Hu00lv5N5QZOa5xuHXOdU,7698
3
+ orm_database-0.3.8.dist-info/LICENSE,sha256=v33KAoqx5qhyUNlHOjYmBBKDtd9ymzWB7sR4cova190,1064
4
+ orm_database-0.3.8.dist-info/METADATA,sha256=RX89aboy55uccDBC9fSAUzZoc-Y9GxURg1fq1qHyBsQ,1034
5
+ orm_database-0.3.8.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
6
+ orm_database-0.3.8.dist-info/top_level.txt,sha256=dzcxzqcdsX4x3lqSkz1tVcu1qKX02rXOu6QN3cHggU4,13
7
+ orm_database-0.3.8.dist-info/RECORD,,
@@ -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
@@ -1,6 +0,0 @@
1
- orm_database/__init__.py,sha256=q0A0dUBMacf_yaU5m4VWCDlP__pVAz3I1Bhn1RPkv9I,140
2
- orm_database/orm_database.py,sha256=v3mY981JnaU5yGytklaFK1Hu00lv5N5QZOa5xuHXOdU,7698
3
- orm_database-0.3.7.dist-info/METADATA,sha256=NoDRanHeemj4ZEJWFQoPTC6touYum1MBSCrkPGC88_U,345
4
- orm_database-0.3.7.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
5
- orm_database-0.3.7.dist-info/top_level.txt,sha256=dzcxzqcdsX4x3lqSkz1tVcu1qKX02rXOu6QN3cHggU4,13
6
- orm_database-0.3.7.dist-info/RECORD,,