cloudoll 3.0.7__tar.gz → 3.0.8__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.
- {cloudoll-3.0.7 → cloudoll-3.0.8}/PKG-INFO +1 -1
- cloudoll-3.0.8/cloudoll/__init__.py +1 -0
- {cloudoll-3.0.7 → cloudoll-3.0.8}/cloudoll/orm/__init__.py +5 -2
- {cloudoll-3.0.7 → cloudoll-3.0.8}/cloudoll/orm/awsmysql.py +1 -1
- {cloudoll-3.0.7 → cloudoll-3.0.8}/cloudoll/orm/awspostgres.py +2 -2
- {cloudoll-3.0.7 → cloudoll-3.0.8}/cloudoll/orm/mysql.py +1 -1
- {cloudoll-3.0.7 → cloudoll-3.0.8}/cloudoll/orm/postgres.py +8 -16
- {cloudoll-3.0.7 → cloudoll-3.0.8}/cloudoll.egg-info/PKG-INFO +1 -1
- {cloudoll-3.0.7 → cloudoll-3.0.8}/pyproject.toml +1 -1
- cloudoll-3.0.7/cloudoll/__init__.py +0 -1
- {cloudoll-3.0.7 → cloudoll-3.0.8}/LICENSE +0 -0
- {cloudoll-3.0.7 → cloudoll-3.0.8}/README.md +0 -0
- {cloudoll-3.0.7 → cloudoll-3.0.8}/cloudoll/__main__.py +0 -0
- {cloudoll-3.0.7 → cloudoll-3.0.8}/cloudoll/cli.py +0 -0
- {cloudoll-3.0.7 → cloudoll-3.0.8}/cloudoll/clitool/__init__.py +0 -0
- {cloudoll-3.0.7 → cloudoll-3.0.8}/cloudoll/clitool/cli_main.py +0 -0
- {cloudoll-3.0.7 → cloudoll-3.0.8}/cloudoll/clitool/m2d.py +0 -0
- {cloudoll-3.0.7 → cloudoll-3.0.8}/cloudoll/clitool/process.py +0 -0
- {cloudoll-3.0.7 → cloudoll-3.0.8}/cloudoll/clitool/spinner.py +0 -0
- {cloudoll-3.0.7 → cloudoll-3.0.8}/cloudoll/clitool/watch.py +0 -0
- {cloudoll-3.0.7 → cloudoll-3.0.8}/cloudoll/logging/__init__.py +0 -0
- {cloudoll-3.0.7 → cloudoll-3.0.8}/cloudoll/mail/__init__.py +0 -0
- {cloudoll-3.0.7 → cloudoll-3.0.8}/cloudoll/mail/smtp.py +0 -0
- {cloudoll-3.0.7 → cloudoll-3.0.8}/cloudoll/orm/base.py +0 -0
- {cloudoll-3.0.7 → cloudoll-3.0.8}/cloudoll/orm/err.py +0 -0
- {cloudoll-3.0.7 → cloudoll-3.0.8}/cloudoll/orm/field.py +0 -0
- {cloudoll-3.0.7 → cloudoll-3.0.8}/cloudoll/orm/model.py +0 -0
- {cloudoll-3.0.7 → cloudoll-3.0.8}/cloudoll/orm/parse.py +0 -0
- {cloudoll-3.0.7 → cloudoll-3.0.8}/cloudoll/orm/test_sql.py +0 -0
- {cloudoll-3.0.7 → cloudoll-3.0.8}/cloudoll/template/__init__.py +0 -0
- {cloudoll-3.0.7 → cloudoll-3.0.8}/cloudoll/utils/__init__.py +0 -0
- {cloudoll-3.0.7 → cloudoll-3.0.8}/cloudoll/utils/common.py +0 -0
- {cloudoll-3.0.7 → cloudoll-3.0.8}/cloudoll/utils/snowflake.py +0 -0
- {cloudoll-3.0.7 → cloudoll-3.0.8}/cloudoll/web/__init__.py +0 -0
- {cloudoll-3.0.7 → cloudoll-3.0.8}/cloudoll/web/core.py +0 -0
- {cloudoll-3.0.7 → cloudoll-3.0.8}/cloudoll/web/exception.py +0 -0
- {cloudoll-3.0.7 → cloudoll-3.0.8}/cloudoll/web/html.py +0 -0
- {cloudoll-3.0.7 → cloudoll-3.0.8}/cloudoll/web/jwt.py +0 -0
- {cloudoll-3.0.7 → cloudoll-3.0.8}/cloudoll/web/requests.py +0 -0
- {cloudoll-3.0.7 → cloudoll-3.0.8}/cloudoll/web/settings.py +0 -0
- {cloudoll-3.0.7 → cloudoll-3.0.8}/cloudoll.egg-info/SOURCES.txt +0 -0
- {cloudoll-3.0.7 → cloudoll-3.0.8}/cloudoll.egg-info/dependency_links.txt +0 -0
- {cloudoll-3.0.7 → cloudoll-3.0.8}/cloudoll.egg-info/entry_points.txt +0 -0
- {cloudoll-3.0.7 → cloudoll-3.0.8}/cloudoll.egg-info/requires.txt +0 -0
- {cloudoll-3.0.7 → cloudoll-3.0.8}/cloudoll.egg-info/top_level.txt +0 -0
- {cloudoll-3.0.7 → cloudoll-3.0.8}/setup.cfg +0 -0
- {cloudoll-3.0.7 → cloudoll-3.0.8}/setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cloudoll
|
|
3
|
-
Version: 3.0.
|
|
3
|
+
Version: 3.0.8
|
|
4
4
|
Summary: Assist in quickly creating distributable microservices based on aiohttp, with a focus on simplicity and ease of use.
|
|
5
5
|
Home-page: https://github.com/smallerqiu/cloudoll-py
|
|
6
6
|
Author: Qiu
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "3.0.8"
|
|
@@ -3,8 +3,7 @@ from cloudoll.orm.parse import parse_coon
|
|
|
3
3
|
import aiopg as pg
|
|
4
4
|
from .mysql import Mysql
|
|
5
5
|
from .postgres import Postgres
|
|
6
|
-
|
|
7
|
-
from .awsmysql import AwsMysql
|
|
6
|
+
|
|
8
7
|
|
|
9
8
|
__all__ = ["create_engine"]
|
|
10
9
|
|
|
@@ -27,8 +26,12 @@ async def create_engine(**kw):
|
|
|
27
26
|
if driver == "mysql":
|
|
28
27
|
return await Mysql().create_engine(**configs, **query)
|
|
29
28
|
elif driver == "aws-mysql":
|
|
29
|
+
from .awsmysql import AwsMysql
|
|
30
|
+
|
|
30
31
|
return await AwsMysql().create_engine(**configs, **query)
|
|
31
32
|
elif driver in ["aws-postgres", "aws-postgressql"]:
|
|
33
|
+
from .awspostgres import AwsPostgres
|
|
34
|
+
|
|
32
35
|
return await AwsPostgres().create_engine(**configs, **query)
|
|
33
36
|
elif driver in ["postgres", "postgressql"]:
|
|
34
37
|
return await Postgres().create_engine(**configs, **query)
|
|
@@ -34,7 +34,7 @@ class AwsMysql(MeteBase):
|
|
|
34
34
|
with AwsWrapperConnection.connect(
|
|
35
35
|
Connect, self._dsn, **self._params
|
|
36
36
|
) as conn:
|
|
37
|
-
with conn.cursor() as cursor:
|
|
37
|
+
with conn.cursor(dictionary=True) as cursor:
|
|
38
38
|
if (
|
|
39
39
|
query_type == QueryTypes.CREATEBATCH
|
|
40
40
|
or query_type == QueryTypes.UPDATEBATCH
|
|
@@ -7,7 +7,7 @@ from aws_advanced_python_wrapper.sql_alchemy_connection_provider import (
|
|
|
7
7
|
|
|
8
8
|
from cloudoll.orm.base import MeteBase, QueryTypes
|
|
9
9
|
from cloudoll.logging import info, error
|
|
10
|
-
|
|
10
|
+
from psycopg2.extras import RealDictCursor
|
|
11
11
|
|
|
12
12
|
class AwsPostgres(MeteBase):
|
|
13
13
|
def __init__(self):
|
|
@@ -33,7 +33,7 @@ class AwsPostgres(MeteBase):
|
|
|
33
33
|
with AwsWrapperConnection.connect(
|
|
34
34
|
psycopg.Connection.connect, self._dsn, **self._params
|
|
35
35
|
) as conn:
|
|
36
|
-
with conn.cursor() as cursor:
|
|
36
|
+
with conn.cursor(cursor_factory=RealDictCursor) as cursor:
|
|
37
37
|
if (
|
|
38
38
|
query_type == QueryTypes.CREATEBATCH
|
|
39
39
|
or query_type == QueryTypes.UPDATEBATCH
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import aiopg
|
|
2
|
+
from psycopg2.extras import RealDictCursor
|
|
2
3
|
from cloudoll.logging import error
|
|
3
4
|
from cloudoll.orm.base import MeteBase, QueryTypes
|
|
4
5
|
from cloudoll.logging import info, error
|
|
@@ -35,7 +36,7 @@ class Postgres(MeteBase):
|
|
|
35
36
|
if conn.echo:
|
|
36
37
|
info("sql: %s ,%s", sql, params)
|
|
37
38
|
|
|
38
|
-
async with conn.cursor() as cursor:
|
|
39
|
+
async with conn.cursor(cursor_factory=RealDictCursor) as cursor:
|
|
39
40
|
# current_cursor = getattr(cursor, 'lastrowid', None)
|
|
40
41
|
if (
|
|
41
42
|
query_type == QueryTypes.CREATEBATCH
|
|
@@ -48,21 +49,12 @@ class Postgres(MeteBase):
|
|
|
48
49
|
# await conn.commit()
|
|
49
50
|
result = None
|
|
50
51
|
|
|
51
|
-
if query_type == QueryTypes.ALL
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
columns = [desc[0] for desc in cursor.description]
|
|
58
|
-
row = await cursor.fetchone()
|
|
59
|
-
result = dict(zip(columns, row)) if row else {}
|
|
60
|
-
return result
|
|
61
|
-
elif query_type == QueryTypes.MANY and cursor.description is not None:
|
|
62
|
-
columns = [desc[0] for desc in cursor.description]
|
|
63
|
-
rows = await cursor.fetchmany(size)
|
|
64
|
-
result = [dict(zip(columns, row)) for row in rows]
|
|
65
|
-
return result
|
|
52
|
+
if query_type == QueryTypes.ALL:
|
|
53
|
+
return await cursor.fetchall()
|
|
54
|
+
elif query_type == QueryTypes.ONE:
|
|
55
|
+
return await cursor.fetchone()
|
|
56
|
+
elif query_type == QueryTypes.MANY:
|
|
57
|
+
return await cursor.fetchmany(size)
|
|
66
58
|
elif query_type == QueryTypes.COUNT:
|
|
67
59
|
result = await cursor.fetchone()
|
|
68
60
|
count = 0
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cloudoll
|
|
3
|
-
Version: 3.0.
|
|
3
|
+
Version: 3.0.8
|
|
4
4
|
Summary: Assist in quickly creating distributable microservices based on aiohttp, with a focus on simplicity and ease of use.
|
|
5
5
|
Home-page: https://github.com/smallerqiu/cloudoll-py
|
|
6
6
|
Author: Qiu
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "cloudoll"
|
|
7
|
-
version = "3.0.
|
|
7
|
+
version = "3.0.8"
|
|
8
8
|
description = "Assist in quickly creating distributable microservices based on aiohttp, with a focus on simplicity and ease of use."
|
|
9
9
|
authors = [
|
|
10
10
|
{name = "Qiu", email = "smallerqiu@gmail.com"},
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "3.0.7"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|