jcutils 0.1.0__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.
- jcutils-0.1.0/.dockerignore +2 -0
- jcutils-0.1.0/.editorconfig +33 -0
- jcutils-0.1.0/.env +2 -0
- jcutils-0.1.0/.gitignore +10 -0
- jcutils-0.1.0/.python-version +1 -0
- jcutils-0.1.0/Dockerfile +17 -0
- jcutils-0.1.0/PKG-INFO +84 -0
- jcutils-0.1.0/README.md +40 -0
- jcutils-0.1.0/pyproject.toml +65 -0
- jcutils-0.1.0/requirements-dev.lock +591 -0
- jcutils-0.1.0/requirements.lock +591 -0
- jcutils-0.1.0/ruff.toml +77 -0
- jcutils-0.1.0/src/pyutils/utils/__init__.py +6 -0
- jcutils-0.1.0/src/pyutils/utils/apscheduler_.py +39 -0
- jcutils-0.1.0/src/pyutils/utils/clickhouse_client.py +109 -0
- jcutils-0.1.0/src/pyutils/utils/dataworks_client.py +43 -0
- jcutils-0.1.0/src/pyutils/utils/datetime_.py +241 -0
- jcutils-0.1.0/src/pyutils/utils/dingtalk.py +181 -0
- jcutils-0.1.0/src/pyutils/utils/dingtalkoapi.py +285 -0
- jcutils-0.1.0/src/pyutils/utils/ftp_client.py +74 -0
- jcutils-0.1.0/src/pyutils/utils/hbase_client.py +184 -0
- jcutils-0.1.0/src/pyutils/utils/hbase_thrift2_client.py +171 -0
- jcutils-0.1.0/src/pyutils/utils/kafka_client.py +138 -0
- jcutils-0.1.0/src/pyutils/utils/lazy_import.py +24 -0
- jcutils-0.1.0/src/pyutils/utils/ldap_client.py +230 -0
- jcutils-0.1.0/src/pyutils/utils/logging_.py +90 -0
- jcutils-0.1.0/src/pyutils/utils/maxcompute_client.py +39 -0
- jcutils-0.1.0/src/pyutils/utils/mssql_client.py +95 -0
- jcutils-0.1.0/src/pyutils/utils/mssql_client_pool.py +94 -0
- jcutils-0.1.0/src/pyutils/utils/mysql_client.py +124 -0
- jcutils-0.1.0/src/pyutils/utils/mysql_client_pool.py +118 -0
- jcutils-0.1.0/src/pyutils/utils/pg_client.py +87 -0
- jcutils-0.1.0/src/pyutils/utils/platform_.py +23 -0
- jcutils-0.1.0/src/pyutils/utils/redis_client.py +216 -0
- jcutils-0.1.0/src/pyutils/utils/run_line_time.py +37 -0
- jcutils-0.1.0/src/pyutils/utils/tools.py +380 -0
- jcutils-0.1.0/src/pyutils/utils/work_weixin_bot.py +139 -0
- jcutils-0.1.0/src/pyutils/utils/work_weixin_send.py +144 -0
- jcutils-0.1.0/tests/test_contrast.py +59 -0
- jcutils-0.1.0/tests/test_dingtalk.py +18 -0
- jcutils-0.1.0/tests/test_dli.py +41 -0
- jcutils-0.1.0/tests/test_dli_job.py +35 -0
- jcutils-0.1.0/tests/test_dli_status.py +38 -0
- jcutils-0.1.0/tests/test_guandata_add-to-groups.py +24 -0
- jcutils-0.1.0/tests/test_guandata_card.py +31 -0
- jcutils-0.1.0/tests/test_guandata_create_user.py +47 -0
- jcutils-0.1.0/tests/test_guandata_create_users.py +671 -0
- jcutils-0.1.0/tests/test_guandata_data_source.py +33 -0
- jcutils-0.1.0/tests/test_guandata_data_source_list.py +59 -0
- jcutils-0.1.0/tests/test_guandata_delete_user.py +50 -0
- jcutils-0.1.0/tests/test_guandata_modify_user.py +46 -0
- jcutils-0.1.0/tests/test_guandata_schedule.py +60 -0
- jcutils-0.1.0/tests/test_guandata_schedule_download.py +191 -0
- jcutils-0.1.0/tests/test_guandata_schedule_duration.py +163 -0
- jcutils-0.1.0/tests/test_guandata_user_get.py +14 -0
- jcutils-0.1.0/tests/test_guandata_user_group.py +21 -0
- jcutils-0.1.0/tests/test_guandata_user_group_list.py +16 -0
- jcutils-0.1.0/tests/test_guandata_user_groups_add.py +40 -0
- jcutils-0.1.0/tests/test_guandata_user_groups_modify.py +16 -0
- jcutils-0.1.0/tests/test_guandata_user_users_list.py +16 -0
- jcutils-0.1.0/tests/test_imaplib.py +5 -0
- jcutils-0.1.0/tests/test_imaplib_login.py +18 -0
- jcutils-0.1.0/tests/test_kafka_client.py +30 -0
- jcutils-0.1.0/tests/test_ldap.py +3 -0
- jcutils-0.1.0/tests/test_logger.py +7 -0
- jcutils-0.1.0/tests/test_mssql_client.py +4 -0
- jcutils-0.1.0/tests/test_mysql.py +36 -0
- jcutils-0.1.0/tests/test_mysql_client.py +12 -0
- jcutils-0.1.0/tests/test_mysql_pool.py +12 -0
- jcutils-0.1.0/tests/test_obs.py +14 -0
- jcutils-0.1.0/tests/test_openpyxl.py +27 -0
- jcutils-0.1.0/tests/test_pandas.py +23 -0
- jcutils-0.1.0/tests/test_pg copy.py +23 -0
- jcutils-0.1.0/tests/test_pg.py +23 -0
- jcutils-0.1.0/tests/test_pg_guanyuan.py +10 -0
- jcutils-0.1.0/tests/test_phone_mask.py +20 -0
- jcutils-0.1.0/tests/test_pyodps.py +42 -0
- jcutils-0.1.0/tests/test_pyodps_download.py +48 -0
- jcutils-0.1.0/tests/test_pyodps_exe.py +32 -0
- jcutils-0.1.0/tests/test_pyodps_grant.py +51 -0
- jcutils-0.1.0/tests/test_pyodps_grant1.py +61 -0
- jcutils-0.1.0/tests/test_pyodps_grant_api.py +182 -0
- jcutils-0.1.0/tests/test_pyodps_query.py +32 -0
- jcutils-0.1.0/tests/test_pyodps_show_grant_all.py +78 -0
- jcutils-0.1.0/tests/test_pyodps_view.py +38 -0
- jcutils-0.1.0/tests/test_redis.py +66 -0
- jcutils-0.1.0/tests/test_sentry.py +29 -0
- jcutils-0.1.0/tests/test_shence.py +19 -0
- jcutils-0.1.0/tests/test_shence_download.py +28 -0
- jcutils-0.1.0/tests/test_upd_dianchi_users.py +68 -0
- jcutils-0.1.0/tests/test_upd_dianchi_users_ldap.py +113 -0
- jcutils-0.1.0/tests/test_work_weixin_bot.py +9 -0
- jcutils-0.1.0/tests/up.json +1 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# 顶级配置,适用于所有文件
|
|
2
|
+
root = true
|
|
3
|
+
|
|
4
|
+
# 默认的编码格式
|
|
5
|
+
[*]
|
|
6
|
+
charset = utf-8
|
|
7
|
+
|
|
8
|
+
# 换行符(LF是Unix风格,CRLF是Windows风格)
|
|
9
|
+
[*]
|
|
10
|
+
end_of_line = lf
|
|
11
|
+
|
|
12
|
+
# 缩进样式(使用4个空格)
|
|
13
|
+
[*]
|
|
14
|
+
indent_style = space
|
|
15
|
+
indent_size = 4
|
|
16
|
+
|
|
17
|
+
# 删除行末尾的空格
|
|
18
|
+
[*]
|
|
19
|
+
trim_trailing_whitespace = true
|
|
20
|
+
|
|
21
|
+
# 插入一个空行到文件末尾
|
|
22
|
+
[*]
|
|
23
|
+
insert_final_newline = true
|
|
24
|
+
|
|
25
|
+
# 针对Python源代码的配置
|
|
26
|
+
[*.py]
|
|
27
|
+
# 使用4个空格进行缩进
|
|
28
|
+
indent_size = 4
|
|
29
|
+
|
|
30
|
+
# 针对特定目录或文件的配置
|
|
31
|
+
[tests/**]
|
|
32
|
+
# 测试目录下的所有文件都使用Unix风格的换行符
|
|
33
|
+
end_of_line = lf
|
jcutils-0.1.0/.env
ADDED
jcutils-0.1.0/.gitignore
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.11.1
|
jcutils-0.1.0/Dockerfile
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
FROM python:3.11-slim
|
|
2
|
+
|
|
3
|
+
RUN sed -i s/deb.debian.org/mirrors.aliyun.com/g /etc/apt/sources.list && \
|
|
4
|
+
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
|
|
5
|
+
echo 'Asia/Shanghai' >/etc/timezone && apt update && \
|
|
6
|
+
apt install --no-install-recommends gcc libpq-dev libkrb5-dev git -y && rm -rf /var/lib/apt/lists/*
|
|
7
|
+
|
|
8
|
+
WORKDIR /data/guoquan-apocalypse-cron
|
|
9
|
+
# 代码放在镜像外
|
|
10
|
+
# VOLUME ["/data/guoquan-apocalypse-cron"]
|
|
11
|
+
COPY . /data/guoquan-apocalypse-cron
|
|
12
|
+
RUN git config --global --add safe.directory /data/guoquan-apocalypse-cron && \
|
|
13
|
+
pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/ && \
|
|
14
|
+
/usr/local/bin/python -m pip install --upgrade pip && \
|
|
15
|
+
pip install --no-cache-dir -r requirements.txt
|
|
16
|
+
|
|
17
|
+
CMD [ "python", "-u", "main.py" ]
|
jcutils-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
|
+
Name: jcutils
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Add your description here
|
|
5
|
+
Author-email: lijc210 <lijc210@163.com>
|
|
6
|
+
Requires-Python: >=3.8
|
|
7
|
+
Requires-Dist: airflow-code-editor==7.4.1
|
|
8
|
+
Requires-Dist: alibabacloud-dataworks-public20200518>=4.7.2
|
|
9
|
+
Requires-Dist: alibabacloud-ecs20140526>=3.0.12
|
|
10
|
+
Requires-Dist: alibabacloud-maxcompute20220104>=2.3.0
|
|
11
|
+
Requires-Dist: apache-airflow==2.7.0
|
|
12
|
+
Requires-Dist: apscheduler~=3.10.1
|
|
13
|
+
Requires-Dist: chardet~=4.0.0
|
|
14
|
+
Requires-Dist: clickhouse-driver==0.2.6
|
|
15
|
+
Requires-Dist: dbutils==3.0.2
|
|
16
|
+
Requires-Dist: easybase~=1.1.3
|
|
17
|
+
Requires-Dist: esdk-obs-python>=3.23.9.1
|
|
18
|
+
Requires-Dist: fastapi==0.70.1
|
|
19
|
+
Requires-Dist: fire>=0.5.0
|
|
20
|
+
Requires-Dist: func-timeout~=4.3.5
|
|
21
|
+
Requires-Dist: happybase~=1.2.0
|
|
22
|
+
Requires-Dist: huaweicloudsdkdli==3.1.19
|
|
23
|
+
Requires-Dist: imbox~=0.9.8
|
|
24
|
+
Requires-Dist: ldap3==2.9.1
|
|
25
|
+
Requires-Dist: numpy<2
|
|
26
|
+
Requires-Dist: openpyxl>=3.1.5
|
|
27
|
+
Requires-Dist: pandas>=2.2.2
|
|
28
|
+
Requires-Dist: playwright~=1.41.2
|
|
29
|
+
Requires-Dist: pykafka>=2.8.0
|
|
30
|
+
Requires-Dist: pymysql==1.0.2
|
|
31
|
+
Requires-Dist: pyodps==0.11.6.1
|
|
32
|
+
Requires-Dist: pyquery==2.0.0
|
|
33
|
+
Requires-Dist: pyquery~=2.0.0
|
|
34
|
+
Requires-Dist: python-dateutil==2.8.2
|
|
35
|
+
Requires-Dist: python-multipart==0.0.5
|
|
36
|
+
Requires-Dist: redis-py-cluster==2.1.3
|
|
37
|
+
Requires-Dist: redis==3.5.3
|
|
38
|
+
Requires-Dist: requests==2.26.0
|
|
39
|
+
Requires-Dist: retry==0.9.2
|
|
40
|
+
Requires-Dist: sentry-sdk~=1.21.0
|
|
41
|
+
Requires-Dist: urllib3~=1.26.15
|
|
42
|
+
Requires-Dist: uvicorn==0.16.0
|
|
43
|
+
Description-Content-Type: text/markdown
|
|
44
|
+
|
|
45
|
+
# jcutils
|
|
46
|
+
|
|
47
|
+
python 公用工具包
|
|
48
|
+
|
|
49
|
+
## rye 部署方式
|
|
50
|
+
|
|
51
|
+
``` shell
|
|
52
|
+
curl -sSf https://rye-up.com/get | bash
|
|
53
|
+
rye self update
|
|
54
|
+
rye pin 3.11.1
|
|
55
|
+
rye sync
|
|
56
|
+
rye run serve #启动
|
|
57
|
+
rye sync --no-lock
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## rye 使用
|
|
61
|
+
|
|
62
|
+
```shell
|
|
63
|
+
# 安装依赖
|
|
64
|
+
rye sync
|
|
65
|
+
# 代码检查
|
|
66
|
+
rye lint
|
|
67
|
+
rye lint --fix
|
|
68
|
+
# 格式化代码
|
|
69
|
+
rye fmt
|
|
70
|
+
# 启动
|
|
71
|
+
python main.py
|
|
72
|
+
# rye启动
|
|
73
|
+
rye run main
|
|
74
|
+
# 执行脚本
|
|
75
|
+
source .env
|
|
76
|
+
python ...
|
|
77
|
+
# 添加本地包
|
|
78
|
+
rye add jcutils --path /Users/lijicong/workspace/python/jcutils/dist/jcutils-0.1.0-py3-none-any.whl
|
|
79
|
+
pip install requests --no-deps
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
## 推送到锅圈仓库
|
|
83
|
+
|
|
84
|
+
git remote set-url --add origin https://e.coding.net/lijc210/work_guoquan/guoquan-apocalypse-cron.git
|
jcutils-0.1.0/README.md
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# jcutils
|
|
2
|
+
|
|
3
|
+
python 公用工具包
|
|
4
|
+
|
|
5
|
+
## rye 部署方式
|
|
6
|
+
|
|
7
|
+
``` shell
|
|
8
|
+
curl -sSf https://rye-up.com/get | bash
|
|
9
|
+
rye self update
|
|
10
|
+
rye pin 3.11.1
|
|
11
|
+
rye sync
|
|
12
|
+
rye run serve #启动
|
|
13
|
+
rye sync --no-lock
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## rye 使用
|
|
17
|
+
|
|
18
|
+
```shell
|
|
19
|
+
# 安装依赖
|
|
20
|
+
rye sync
|
|
21
|
+
# 代码检查
|
|
22
|
+
rye lint
|
|
23
|
+
rye lint --fix
|
|
24
|
+
# 格式化代码
|
|
25
|
+
rye fmt
|
|
26
|
+
# 启动
|
|
27
|
+
python main.py
|
|
28
|
+
# rye启动
|
|
29
|
+
rye run main
|
|
30
|
+
# 执行脚本
|
|
31
|
+
source .env
|
|
32
|
+
python ...
|
|
33
|
+
# 添加本地包
|
|
34
|
+
rye add jcutils --path /Users/lijicong/workspace/python/jcutils/dist/jcutils-0.1.0-py3-none-any.whl
|
|
35
|
+
pip install requests --no-deps
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## 推送到锅圈仓库
|
|
39
|
+
|
|
40
|
+
git remote set-url --add origin https://e.coding.net/lijc210/work_guoquan/guoquan-apocalypse-cron.git
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "jcutils"
|
|
3
|
+
version = "0.1.0"
|
|
4
|
+
description = "Add your description here"
|
|
5
|
+
authors = [{ name = "lijc210", email = "lijc210@163.com" }]
|
|
6
|
+
dependencies = [
|
|
7
|
+
"apscheduler~=3.10.1",
|
|
8
|
+
"clickhouse-driver==0.2.6",
|
|
9
|
+
"fastapi==0.70.1",
|
|
10
|
+
"ldap3==2.9.1",
|
|
11
|
+
"numpy<2",
|
|
12
|
+
# "psycopg2-binary==2.9.5",
|
|
13
|
+
"PyMySQL==1.0.2",
|
|
14
|
+
"pyodps==0.11.6.1",
|
|
15
|
+
"pyquery==2.0.0",
|
|
16
|
+
"python-dateutil==2.8.2",
|
|
17
|
+
"python-multipart==0.0.5",
|
|
18
|
+
"redis==3.5.3",
|
|
19
|
+
"requests==2.26.0",
|
|
20
|
+
"retry==0.9.2",
|
|
21
|
+
"sentry-sdk~=1.21.0",
|
|
22
|
+
"uvicorn==0.16.0",
|
|
23
|
+
"huaweicloudsdkdli==3.1.19",
|
|
24
|
+
"redis-py-cluster==2.1.3",
|
|
25
|
+
"DBUtils==3.0.2",
|
|
26
|
+
"pyquery~=2.0.0",
|
|
27
|
+
"imbox~=0.9.8",
|
|
28
|
+
"happybase~=1.2.0",
|
|
29
|
+
"easybase~=1.1.3",
|
|
30
|
+
"urllib3~=1.26.15",
|
|
31
|
+
"chardet~=4.0.0",
|
|
32
|
+
"func_timeout~=4.3.5",
|
|
33
|
+
# "line_profiler~=4.0.3",
|
|
34
|
+
"fire>=0.5.0",
|
|
35
|
+
"apache-airflow==2.7.0",
|
|
36
|
+
"airflow-code-editor==7.4.1",
|
|
37
|
+
"esdk-obs-python>=3.23.9.1",
|
|
38
|
+
"alibabacloud_ecs20140526>=3.0.12",
|
|
39
|
+
"alibabacloud_dataworks_public20200518>=4.7.2",
|
|
40
|
+
"pykafka>=2.8.0",
|
|
41
|
+
"playwright~=1.41.2",
|
|
42
|
+
# pymssql 在macOS M 芯片的依赖
|
|
43
|
+
# brew install freetds
|
|
44
|
+
# brew install openssl
|
|
45
|
+
# "pymssql==2.2.7",
|
|
46
|
+
"alibabacloud-maxcompute20220104>=2.3.0",
|
|
47
|
+
"pandas>=2.2.2",
|
|
48
|
+
"openpyxl>=3.1.5",
|
|
49
|
+
]
|
|
50
|
+
readme = "README.md"
|
|
51
|
+
requires-python = ">= 3.8"
|
|
52
|
+
|
|
53
|
+
[build-system]
|
|
54
|
+
requires = ["hatchling"]
|
|
55
|
+
build-backend = "hatchling.build"
|
|
56
|
+
|
|
57
|
+
[tool.rye]
|
|
58
|
+
managed = true
|
|
59
|
+
dev-dependencies = []
|
|
60
|
+
|
|
61
|
+
[tool.hatch.metadata]
|
|
62
|
+
allow-direct-references = true
|
|
63
|
+
|
|
64
|
+
[tool.hatch.build.targets.wheel]
|
|
65
|
+
packages = ["src/jcutils"]
|