bella-openapi 1.0.0.3__tar.gz → 1.0.1__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.
Files changed (28) hide show
  1. {bella_openapi-1.0.0.3/src/bella_openapi.egg-info → bella_openapi-1.0.1}/PKG-INFO +10 -10
  2. {bella_openapi-1.0.0.3 → bella_openapi-1.0.1}/README.md +8 -8
  3. {bella_openapi-1.0.0.3 → bella_openapi-1.0.1}/setup.py +2 -2
  4. {bella_openapi-1.0.0.3 → bella_openapi-1.0.1/src/bella_openapi.egg-info}/PKG-INFO +10 -10
  5. {bella_openapi-1.0.0.3 → bella_openapi-1.0.1}/LICENSE +0 -0
  6. {bella_openapi-1.0.0.3 → bella_openapi-1.0.1}/setup.cfg +0 -0
  7. {bella_openapi-1.0.0.3 → bella_openapi-1.0.1}/src/bella_openapi/__init__.py +0 -0
  8. {bella_openapi-1.0.0.3 → bella_openapi-1.0.1}/src/bella_openapi/auth_billing.py +0 -0
  9. {bella_openapi-1.0.0.3 → bella_openapi-1.0.1}/src/bella_openapi/authorize.py +0 -0
  10. {bella_openapi-1.0.0.3 → bella_openapi-1.0.1}/src/bella_openapi/bella_trace/__init__.py +0 -0
  11. {bella_openapi-1.0.0.3 → bella_openapi-1.0.1}/src/bella_openapi/bella_trace/_context.py +0 -0
  12. {bella_openapi-1.0.0.3 → bella_openapi-1.0.1}/src/bella_openapi/bella_trace/fastapi_interceptor.py +0 -0
  13. {bella_openapi-1.0.0.3 → bella_openapi-1.0.1}/src/bella_openapi/bella_trace/record_log.py +0 -0
  14. {bella_openapi-1.0.0.3 → bella_openapi-1.0.1}/src/bella_openapi/bella_trace/trace_requests.py +0 -0
  15. {bella_openapi-1.0.0.3 → bella_openapi-1.0.1}/src/bella_openapi/config.py +0 -0
  16. {bella_openapi-1.0.0.3 → bella_openapi-1.0.1}/src/bella_openapi/console/__init__.py +0 -0
  17. {bella_openapi-1.0.0.3 → bella_openapi-1.0.1}/src/bella_openapi/console/models.py +0 -0
  18. {bella_openapi-1.0.0.3 → bella_openapi-1.0.1}/src/bella_openapi/exception.py +0 -0
  19. {bella_openapi-1.0.0.3 → bella_openapi-1.0.1}/src/bella_openapi/log.py +0 -0
  20. {bella_openapi-1.0.0.3 → bella_openapi-1.0.1}/src/bella_openapi/middleware/__init__.py +0 -0
  21. {bella_openapi-1.0.0.3 → bella_openapi-1.0.1}/src/bella_openapi/middleware/context_middleware.py +0 -0
  22. {bella_openapi-1.0.0.3 → bella_openapi-1.0.1}/src/bella_openapi/openapi_contexvar.py +0 -0
  23. {bella_openapi-1.0.0.3 → bella_openapi-1.0.1}/src/bella_openapi/schema.py +0 -0
  24. {bella_openapi-1.0.0.3 → bella_openapi-1.0.1}/src/bella_openapi.egg-info/SOURCES.txt +0 -0
  25. {bella_openapi-1.0.0.3 → bella_openapi-1.0.1}/src/bella_openapi.egg-info/dependency_links.txt +0 -0
  26. {bella_openapi-1.0.0.3 → bella_openapi-1.0.1}/src/bella_openapi.egg-info/not-zip-safe +0 -0
  27. {bella_openapi-1.0.0.3 → bella_openapi-1.0.1}/src/bella_openapi.egg-info/requires.txt +0 -0
  28. {bella_openapi-1.0.0.3 → bella_openapi-1.0.1}/src/bella_openapi.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
- Name: bella_openapi
3
- Version: 1.0.0.3
2
+ Name: bella-openapi
3
+ Version: 1.0.1
4
4
  Summary: client for openapi service.
5
5
  Home-page:
6
6
  Author: ['tangxiaolong', 'fanqiangwei', 'zhangxiaojia', 'liumin', 'wangyukun']
@@ -33,7 +33,7 @@ OpenAPI网关服务客户端
33
33
  ### 安装
34
34
 
35
35
  ```shell
36
- pip install bella_openapi
36
+ pip install bella-openapi
37
37
  ```
38
38
 
39
39
  ### 配置网关域名
@@ -49,14 +49,14 @@ OPENAPI_CONSOLE_KEY = "************"
49
49
  ### 配置校验
50
50
 
51
51
  ```python
52
- from ait_openapi import check_configuration
52
+ from bella_openapi import check_configuration
53
53
  # 该函数判断是否所有配置ok,只有所有配置ok的情况下,才能调用鉴权计费等接口
54
54
  config_is_ok = check_configuration()
55
55
  ```
56
56
  ### token校验
57
57
 
58
58
  ```python
59
- from ait_openapi import validate_token, support_model, account_balance_enough
59
+ from bella_openapi import validate_token, support_model, account_balance_enough
60
60
 
61
61
  token = "****"
62
62
  # 根据token,解析用户身份
@@ -84,7 +84,7 @@ balance = account_balance_enough(token, cost=1.0)
84
84
  日志上报,将采用异步io的方式,上报操作日志,这种方式,可以在单线程中,同时处理多个并发非阻塞IO操作
85
85
 
86
86
  ```python
87
- from ait_openapi import operation_log
87
+ from bella_openapi import operation_log
88
88
 
89
89
 
90
90
  @operation_log()
@@ -97,7 +97,7 @@ def safety_check(request, *, validate_output: bool):
97
97
  操作日志记录,需要传递一些动态参数,需导入预定义的contextvar,在请求起始处进行设置, 请求结束时清空contextvar
98
98
 
99
99
  ```python
100
- from ait_openapi import trace_id_context, caller_id_context, request_url_context
100
+ from bella_openapi import trace_id_context, caller_id_context, request_url_context
101
101
 
102
102
  # 整个链路处理前,设置
103
103
  t_token = trace_id_context.set("*********") # trace_id 当前请求链路唯一标识
@@ -116,7 +116,7 @@ request_url_context.reset(r_token)
116
116
  如果当前url不需要进行拦截,可以配置exclude_path进行过滤
117
117
 
118
118
  ```python
119
- from ait_openapi.middleware import HttpContextMiddleware, WebSocketHttpContextMiddleware
119
+ from bella_openapi.middleware import HttpContextMiddleware, WebSocketHttpContextMiddleware
120
120
  from fastapi import FastAPI
121
121
 
122
122
  app = FastAPI()
@@ -169,7 +169,7 @@ t.join()
169
169
  为了进行调用计费,如果当前操作日志中的信息,需要用于回调计费,则需要在装饰器中传入is_cost_log=True
170
170
 
171
171
  ```python
172
- from ait_openapi import operation_log
172
+ from bella_openapi import operation_log
173
173
 
174
174
 
175
175
  @operation_log(op_type='safety_check', is_cost_log=False, ucid="ucid")
@@ -186,7 +186,7 @@ async def safety_check(request, *, validate_output: bool):
186
186
  ##### 4.1 调用submit_log方法
187
187
 
188
188
  ```python
189
- from ait_openapi import submit_log
189
+ from bella_openapi import submit_log
190
190
  # construct log
191
191
  log = ...
192
192
  submit_log(log)
@@ -11,7 +11,7 @@ OpenAPI网关服务客户端
11
11
  ### 安装
12
12
 
13
13
  ```shell
14
- pip install bella_openapi
14
+ pip install bella-openapi
15
15
  ```
16
16
 
17
17
  ### 配置网关域名
@@ -27,14 +27,14 @@ OPENAPI_CONSOLE_KEY = "************"
27
27
  ### 配置校验
28
28
 
29
29
  ```python
30
- from ait_openapi import check_configuration
30
+ from bella_openapi import check_configuration
31
31
  # 该函数判断是否所有配置ok,只有所有配置ok的情况下,才能调用鉴权计费等接口
32
32
  config_is_ok = check_configuration()
33
33
  ```
34
34
  ### token校验
35
35
 
36
36
  ```python
37
- from ait_openapi import validate_token, support_model, account_balance_enough
37
+ from bella_openapi import validate_token, support_model, account_balance_enough
38
38
 
39
39
  token = "****"
40
40
  # 根据token,解析用户身份
@@ -62,7 +62,7 @@ balance = account_balance_enough(token, cost=1.0)
62
62
  日志上报,将采用异步io的方式,上报操作日志,这种方式,可以在单线程中,同时处理多个并发非阻塞IO操作
63
63
 
64
64
  ```python
65
- from ait_openapi import operation_log
65
+ from bella_openapi import operation_log
66
66
 
67
67
 
68
68
  @operation_log()
@@ -75,7 +75,7 @@ def safety_check(request, *, validate_output: bool):
75
75
  操作日志记录,需要传递一些动态参数,需导入预定义的contextvar,在请求起始处进行设置, 请求结束时清空contextvar
76
76
 
77
77
  ```python
78
- from ait_openapi import trace_id_context, caller_id_context, request_url_context
78
+ from bella_openapi import trace_id_context, caller_id_context, request_url_context
79
79
 
80
80
  # 整个链路处理前,设置
81
81
  t_token = trace_id_context.set("*********") # trace_id 当前请求链路唯一标识
@@ -94,7 +94,7 @@ request_url_context.reset(r_token)
94
94
  如果当前url不需要进行拦截,可以配置exclude_path进行过滤
95
95
 
96
96
  ```python
97
- from ait_openapi.middleware import HttpContextMiddleware, WebSocketHttpContextMiddleware
97
+ from bella_openapi.middleware import HttpContextMiddleware, WebSocketHttpContextMiddleware
98
98
  from fastapi import FastAPI
99
99
 
100
100
  app = FastAPI()
@@ -147,7 +147,7 @@ t.join()
147
147
  为了进行调用计费,如果当前操作日志中的信息,需要用于回调计费,则需要在装饰器中传入is_cost_log=True
148
148
 
149
149
  ```python
150
- from ait_openapi import operation_log
150
+ from bella_openapi import operation_log
151
151
 
152
152
 
153
153
  @operation_log(op_type='safety_check', is_cost_log=False, ucid="ucid")
@@ -164,7 +164,7 @@ async def safety_check(request, *, validate_output: bool):
164
164
  ##### 4.1 调用submit_log方法
165
165
 
166
166
  ```python
167
- from ait_openapi import submit_log
167
+ from bella_openapi import submit_log
168
168
  # construct log
169
169
  log = ...
170
170
  submit_log(log)
@@ -3,13 +3,13 @@ from setuptools import setup, find_packages
3
3
 
4
4
  SHORT = "client for openapi service."
5
5
 
6
- __version__ = "1.0.0.3"
6
+ __version__ = "1.0.1"
7
7
  __author__ = ["tangxiaolong", "fanqiangwei", "zhangxiaojia", 'liumin', 'wangyukun']
8
8
  __email__ = ''
9
9
  readme_path = 'README.md'
10
10
 
11
11
  setup(
12
- name='bella_openapi',
12
+ name='bella-openapi',
13
13
  version=__version__,
14
14
  packages=find_packages('src'),
15
15
  package_dir={'': 'src'},
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
- Name: bella_openapi
3
- Version: 1.0.0.3
2
+ Name: bella-openapi
3
+ Version: 1.0.1
4
4
  Summary: client for openapi service.
5
5
  Home-page:
6
6
  Author: ['tangxiaolong', 'fanqiangwei', 'zhangxiaojia', 'liumin', 'wangyukun']
@@ -33,7 +33,7 @@ OpenAPI网关服务客户端
33
33
  ### 安装
34
34
 
35
35
  ```shell
36
- pip install bella_openapi
36
+ pip install bella-openapi
37
37
  ```
38
38
 
39
39
  ### 配置网关域名
@@ -49,14 +49,14 @@ OPENAPI_CONSOLE_KEY = "************"
49
49
  ### 配置校验
50
50
 
51
51
  ```python
52
- from ait_openapi import check_configuration
52
+ from bella_openapi import check_configuration
53
53
  # 该函数判断是否所有配置ok,只有所有配置ok的情况下,才能调用鉴权计费等接口
54
54
  config_is_ok = check_configuration()
55
55
  ```
56
56
  ### token校验
57
57
 
58
58
  ```python
59
- from ait_openapi import validate_token, support_model, account_balance_enough
59
+ from bella_openapi import validate_token, support_model, account_balance_enough
60
60
 
61
61
  token = "****"
62
62
  # 根据token,解析用户身份
@@ -84,7 +84,7 @@ balance = account_balance_enough(token, cost=1.0)
84
84
  日志上报,将采用异步io的方式,上报操作日志,这种方式,可以在单线程中,同时处理多个并发非阻塞IO操作
85
85
 
86
86
  ```python
87
- from ait_openapi import operation_log
87
+ from bella_openapi import operation_log
88
88
 
89
89
 
90
90
  @operation_log()
@@ -97,7 +97,7 @@ def safety_check(request, *, validate_output: bool):
97
97
  操作日志记录,需要传递一些动态参数,需导入预定义的contextvar,在请求起始处进行设置, 请求结束时清空contextvar
98
98
 
99
99
  ```python
100
- from ait_openapi import trace_id_context, caller_id_context, request_url_context
100
+ from bella_openapi import trace_id_context, caller_id_context, request_url_context
101
101
 
102
102
  # 整个链路处理前,设置
103
103
  t_token = trace_id_context.set("*********") # trace_id 当前请求链路唯一标识
@@ -116,7 +116,7 @@ request_url_context.reset(r_token)
116
116
  如果当前url不需要进行拦截,可以配置exclude_path进行过滤
117
117
 
118
118
  ```python
119
- from ait_openapi.middleware import HttpContextMiddleware, WebSocketHttpContextMiddleware
119
+ from bella_openapi.middleware import HttpContextMiddleware, WebSocketHttpContextMiddleware
120
120
  from fastapi import FastAPI
121
121
 
122
122
  app = FastAPI()
@@ -169,7 +169,7 @@ t.join()
169
169
  为了进行调用计费,如果当前操作日志中的信息,需要用于回调计费,则需要在装饰器中传入is_cost_log=True
170
170
 
171
171
  ```python
172
- from ait_openapi import operation_log
172
+ from bella_openapi import operation_log
173
173
 
174
174
 
175
175
  @operation_log(op_type='safety_check', is_cost_log=False, ucid="ucid")
@@ -186,7 +186,7 @@ async def safety_check(request, *, validate_output: bool):
186
186
  ##### 4.1 调用submit_log方法
187
187
 
188
188
  ```python
189
- from ait_openapi import submit_log
189
+ from bella_openapi import submit_log
190
190
  # construct log
191
191
  log = ...
192
192
  submit_log(log)
File without changes
File without changes