yjdata 0.1.2__tar.gz → 0.1.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.
- {yjdata-0.1.2 → yjdata-0.1.4}/PKG-INFO +1 -1
- {yjdata-0.1.2 → yjdata-0.1.4}/pyproject.toml +5 -1
- yjdata-0.1.4/src/yjdata/utlity/__init__.py +0 -0
- yjdata-0.1.4/src/yjdata/utlity/s3.py +30 -0
- {yjdata-0.1.2 → yjdata-0.1.4}/src/yjdata.egg-info/PKG-INFO +1 -1
- {yjdata-0.1.2 → yjdata-0.1.4}/src/yjdata.egg-info/SOURCES.txt +3 -2
- yjdata-0.1.2/test/test.py +0 -4
- {yjdata-0.1.2 → yjdata-0.1.4}/README.md +0 -0
- {yjdata-0.1.2 → yjdata-0.1.4}/setup.cfg +0 -0
- {yjdata-0.1.2 → yjdata-0.1.4}/src/yjdata/__init__.py +0 -0
- {yjdata-0.1.2 → yjdata-0.1.4}/src/yjdata/_optional.py +0 -0
- {yjdata-0.1.2 → yjdata-0.1.4}/src/yjdata/dataset/__init__.py +0 -0
- {yjdata-0.1.2 → yjdata-0.1.4}/src/yjdata/dataset/common.py +0 -0
- {yjdata-0.1.2 → yjdata-0.1.4}/src/yjdata/dataset/quote.py +0 -0
- {yjdata-0.1.2 → yjdata-0.1.4}/src/yjdata/dataset/snapshot.py +0 -0
- {yjdata-0.1.2 → yjdata-0.1.4}/src/yjdata/dataset/trade.py +0 -0
- {yjdata-0.1.2 → yjdata-0.1.4}/src/yjdata/db/__init__.py +0 -0
- {yjdata-0.1.2 → yjdata-0.1.4}/src/yjdata/db/adapter.py +0 -0
- {yjdata-0.1.2 → yjdata-0.1.4}/src/yjdata/db/expression.py +0 -0
- {yjdata-0.1.2 → yjdata-0.1.4}/src/yjdata/db/mysql.py +0 -0
- {yjdata-0.1.2 → yjdata-0.1.4}/src/yjdata/db/postgres.py +0 -0
- {yjdata-0.1.2 → yjdata-0.1.4}/src/yjdata/db/sql.py +0 -0
- {yjdata-0.1.2 → yjdata-0.1.4}/src/yjdata/dtype.py +0 -0
- {yjdata-0.1.2 → yjdata-0.1.4}/src/yjdata/web/__init__.py +0 -0
- {yjdata-0.1.2 → yjdata-0.1.4}/src/yjdata/web/_context.py +0 -0
- {yjdata-0.1.2 → yjdata-0.1.4}/src/yjdata/web/_input.py +0 -0
- {yjdata-0.1.2 → yjdata-0.1.4}/src/yjdata/web/calendar.py +0 -0
- {yjdata-0.1.2 → yjdata-0.1.4}/src/yjdata/web/client.py +0 -0
- {yjdata-0.1.2 → yjdata-0.1.4}/src/yjdata/web/time_util.py +0 -0
- {yjdata-0.1.2 → yjdata-0.1.4}/src/yjdata.egg-info/dependency_links.txt +0 -0
- {yjdata-0.1.2 → yjdata-0.1.4}/src/yjdata.egg-info/requires.txt +0 -0
- {yjdata-0.1.2 → yjdata-0.1.4}/src/yjdata.egg-info/top_level.txt +0 -0
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "yjdata"
|
|
7
|
-
version = "0.1.
|
|
7
|
+
version = "0.1.4"
|
|
8
8
|
description = "yjdata SDK for Python"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.10"
|
|
@@ -18,7 +18,11 @@ dependencies = [
|
|
|
18
18
|
[tool.setuptools.packages.find]
|
|
19
19
|
where = ["src/"]
|
|
20
20
|
|
|
21
|
+
[tool.uv]
|
|
22
|
+
index-url = "https://pypi.tuna.tsinghua.edu.cn/simple"
|
|
23
|
+
|
|
21
24
|
[dependency-groups]
|
|
22
25
|
dev = [
|
|
26
|
+
"boto3>=1.43.108",
|
|
23
27
|
"twine>=7.0.0",
|
|
24
28
|
]
|
|
File without changes
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import boto3
|
|
2
|
+
|
|
3
|
+
from botocore.config import Config as BotoConfig
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
__all__ = [
|
|
7
|
+
'create_s3_client'
|
|
8
|
+
]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def create_s3_client(
|
|
12
|
+
s3_url: str,
|
|
13
|
+
access_key_id: str | None = None,
|
|
14
|
+
secret_access_key: str | None = None
|
|
15
|
+
):
|
|
16
|
+
if 'oss.' in s3_url or 'oss-' in s3_url:
|
|
17
|
+
address_style = 'virtual'
|
|
18
|
+
else:
|
|
19
|
+
address_style = 'path'
|
|
20
|
+
return boto3.client(
|
|
21
|
+
's3',
|
|
22
|
+
endpoint_url=s3_url,
|
|
23
|
+
aws_access_key_id=access_key_id,
|
|
24
|
+
aws_secret_access_key=secret_access_key,
|
|
25
|
+
config=BotoConfig(
|
|
26
|
+
s3={
|
|
27
|
+
'addressing_style': address_style,
|
|
28
|
+
},
|
|
29
|
+
)
|
|
30
|
+
)
|
|
@@ -19,10 +19,11 @@ src/yjdata/db/expression.py
|
|
|
19
19
|
src/yjdata/db/mysql.py
|
|
20
20
|
src/yjdata/db/postgres.py
|
|
21
21
|
src/yjdata/db/sql.py
|
|
22
|
+
src/yjdata/utlity/__init__.py
|
|
23
|
+
src/yjdata/utlity/s3.py
|
|
22
24
|
src/yjdata/web/__init__.py
|
|
23
25
|
src/yjdata/web/_context.py
|
|
24
26
|
src/yjdata/web/_input.py
|
|
25
27
|
src/yjdata/web/calendar.py
|
|
26
28
|
src/yjdata/web/client.py
|
|
27
|
-
src/yjdata/web/time_util.py
|
|
28
|
-
test/test.py
|
|
29
|
+
src/yjdata/web/time_util.py
|
yjdata-0.1.2/test/test.py
DELETED
|
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
|