arpakitlib 1.8.304__py3-none-any.whl → 1.8.305__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.
Potentially problematic release.
This version of arpakitlib might be problematic. Click here for more details.
- arpakitlib/_arpakit_project_template_v_5/project/tg_bot/router/admin/arpakitlib_project_template_info.py +1 -1
- arpakitlib/_arpakit_project_template_v_5/project/tg_bot/router/admin/clear_log_file.py +1 -1
- arpakitlib/_arpakit_project_template_v_5/project/tg_bot/router/admin/current_state.py +1 -1
- arpakitlib/_arpakit_project_template_v_5/project/tg_bot/router/admin/drop_sqlalchemy_db.py +1 -1
- arpakitlib/_arpakit_project_template_v_5/project/tg_bot/router/admin/init_sqlalchemy_db.py +1 -1
- arpakitlib/_arpakit_project_template_v_5/project/tg_bot/router/admin/kb_with_not_modified.py +1 -1
- arpakitlib/_arpakit_project_template_v_5/project/tg_bot/router/admin/kb_with_old_cd.py +1 -1
- arpakitlib/_arpakit_project_template_v_5/project/tg_bot/router/admin/kb_with_raise_error.py +1 -1
- arpakitlib/_arpakit_project_template_v_5/project/tg_bot/router/admin/kb_with_remove_message.py +1 -1
- arpakitlib/_arpakit_project_template_v_5/project/tg_bot/router/admin/log_file.py +1 -1
- arpakitlib/_arpakit_project_template_v_5/project/tg_bot/router/admin/me.py +1 -1
- arpakitlib/_arpakit_project_template_v_5/project/tg_bot/router/admin/raise_fake_error.py +1 -1
- arpakitlib/_arpakit_project_template_v_5/project/tg_bot/router/admin/reinit_sqlalchemy_db.py +1 -1
- arpakitlib/_arpakit_project_template_v_5/project/tg_bot/router/admin/set_tg_bot_commands.py +1 -1
- {arpakitlib-1.8.304.dist-info → arpakitlib-1.8.305.dist-info}/METADATA +1 -1
- {arpakitlib-1.8.304.dist-info → arpakitlib-1.8.305.dist-info}/RECORD +20 -21
- arpakitlib/ar_dream_ai_api_client_util.py +0 -97
- /arpakitlib/{ar_aiogram_util.py → ar_aiogram_as_tg_command_util.py} +0 -0
- {arpakitlib-1.8.304.dist-info → arpakitlib-1.8.305.dist-info}/WHEEL +0 -0
- {arpakitlib-1.8.304.dist-info → arpakitlib-1.8.305.dist-info}/entry_points.txt +0 -0
- {arpakitlib-1.8.304.dist-info → arpakitlib-1.8.305.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import aiogram.filters
|
|
2
2
|
from aiogram.fsm.context import FSMContext
|
|
3
3
|
|
|
4
|
-
from arpakitlib.
|
|
4
|
+
from arpakitlib.ar_aiogram_as_tg_command_util import as_tg_command
|
|
5
5
|
from arpakitlib.ar_json_util import transfer_data_to_json_str
|
|
6
6
|
from project.tg_bot.const import AdminTgBotCommands
|
|
7
7
|
from project.tg_bot.filter_.is_private_chat import IsPrivateChatTgBotFilter
|
|
@@ -3,7 +3,7 @@ from aiogram import Router, types
|
|
|
3
3
|
from aiogram.filters import Command
|
|
4
4
|
from aiogram.fsm.context import FSMContext
|
|
5
5
|
|
|
6
|
-
from arpakitlib.
|
|
6
|
+
from arpakitlib.ar_aiogram_as_tg_command_util import as_tg_command
|
|
7
7
|
from project.core.settings import get_cached_settings
|
|
8
8
|
from project.tg_bot.blank.admin import get_cached_eng_admin_tg_bot_blank
|
|
9
9
|
from project.tg_bot.const import AdminTgBotCommands
|
|
@@ -3,7 +3,7 @@ from aiogram import Router, types
|
|
|
3
3
|
from aiogram.filters import Command
|
|
4
4
|
from aiogram.fsm.context import FSMContext
|
|
5
5
|
|
|
6
|
-
from arpakitlib.
|
|
6
|
+
from arpakitlib.ar_aiogram_as_tg_command_util import as_tg_command
|
|
7
7
|
from project.tg_bot.const import AdminTgBotCommands
|
|
8
8
|
from project.tg_bot.filter_.is_private_chat import IsPrivateChatTgBotFilter
|
|
9
9
|
from project.tg_bot.filter_.user_roles_has_admin import UserRolesHasAdminTgBotFilter
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import aiogram.filters
|
|
2
2
|
from aiogram.fsm.context import FSMContext
|
|
3
3
|
|
|
4
|
-
from arpakitlib.
|
|
4
|
+
from arpakitlib.ar_aiogram_as_tg_command_util import as_tg_command
|
|
5
5
|
from project.core.settings import get_cached_settings
|
|
6
6
|
from project.sqlalchemy_db_.sqlalchemy_db import get_cached_sqlalchemy_db
|
|
7
7
|
from project.tg_bot.blank.admin import get_cached_eng_admin_tg_bot_blank
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import aiogram.filters
|
|
2
2
|
from aiogram.fsm.context import FSMContext
|
|
3
3
|
|
|
4
|
-
from arpakitlib.
|
|
4
|
+
from arpakitlib.ar_aiogram_as_tg_command_util import as_tg_command
|
|
5
5
|
from project.sqlalchemy_db_.sqlalchemy_db import get_cached_sqlalchemy_db
|
|
6
6
|
from project.tg_bot.blank.admin import get_cached_eng_admin_tg_bot_blank
|
|
7
7
|
from project.tg_bot.const import AdminTgBotCommands
|
arpakitlib/_arpakit_project_template_v_5/project/tg_bot/router/admin/kb_with_not_modified.py
CHANGED
|
@@ -6,7 +6,7 @@ from aiogram.fsm.context import FSMContext
|
|
|
6
6
|
from aiogram.types import InlineKeyboardButton
|
|
7
7
|
from aiogram.utils.keyboard import InlineKeyboardBuilder
|
|
8
8
|
|
|
9
|
-
from arpakitlib.
|
|
9
|
+
from arpakitlib.ar_aiogram_as_tg_command_util import as_tg_command
|
|
10
10
|
from project.tg_bot.blank.admin import get_cached_eng_admin_tg_bot_blank
|
|
11
11
|
from project.tg_bot.const import AdminTgBotCommands
|
|
12
12
|
from project.tg_bot.filter_.is_private_chat import IsPrivateChatTgBotFilter
|
|
@@ -3,7 +3,7 @@ from aiogram.fsm.context import FSMContext
|
|
|
3
3
|
from aiogram.types import InlineKeyboardButton
|
|
4
4
|
from aiogram.utils.keyboard import InlineKeyboardBuilder
|
|
5
5
|
|
|
6
|
-
from arpakitlib.
|
|
6
|
+
from arpakitlib.ar_aiogram_as_tg_command_util import as_tg_command
|
|
7
7
|
from project.tg_bot.callback_data_.common import BaseCD
|
|
8
8
|
from project.tg_bot.const import AdminTgBotCommands
|
|
9
9
|
from project.tg_bot.filter_.is_private_chat import IsPrivateChatTgBotFilter
|
|
@@ -3,7 +3,7 @@ from aiogram.fsm.context import FSMContext
|
|
|
3
3
|
from aiogram.types import InlineKeyboardButton
|
|
4
4
|
from aiogram.utils.keyboard import InlineKeyboardBuilder
|
|
5
5
|
|
|
6
|
-
from arpakitlib.
|
|
6
|
+
from arpakitlib.ar_aiogram_as_tg_command_util import as_tg_command
|
|
7
7
|
from project.tg_bot.blank.admin import get_cached_eng_admin_tg_bot_blank
|
|
8
8
|
from project.tg_bot.callback_data_.common import BaseCD
|
|
9
9
|
from project.tg_bot.const import AdminTgBotCommands
|
arpakitlib/_arpakit_project_template_v_5/project/tg_bot/router/admin/kb_with_remove_message.py
CHANGED
|
@@ -3,7 +3,7 @@ from aiogram.fsm.context import FSMContext
|
|
|
3
3
|
from aiogram.types import InlineKeyboardButton
|
|
4
4
|
from aiogram.utils.keyboard import InlineKeyboardBuilder
|
|
5
5
|
|
|
6
|
-
from arpakitlib.
|
|
6
|
+
from arpakitlib.ar_aiogram_as_tg_command_util import as_tg_command
|
|
7
7
|
from project.tg_bot.blank.admin import get_cached_eng_admin_tg_bot_blank
|
|
8
8
|
from project.tg_bot.callback_data_.client import RemoveMessageClientCD
|
|
9
9
|
from project.tg_bot.const import AdminTgBotCommands
|
|
@@ -6,7 +6,7 @@ from aiogram.filters import Command
|
|
|
6
6
|
from aiogram.fsm.context import FSMContext
|
|
7
7
|
from aiogram.types import FSInputFile
|
|
8
8
|
|
|
9
|
-
from arpakitlib.
|
|
9
|
+
from arpakitlib.ar_aiogram_as_tg_command_util import as_tg_command
|
|
10
10
|
from project.core.settings import get_cached_settings
|
|
11
11
|
from project.tg_bot.const import AdminTgBotCommands
|
|
12
12
|
from project.tg_bot.filter_.is_private_chat import IsPrivateChatTgBotFilter
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import aiogram.filters
|
|
2
2
|
from aiogram.fsm.context import FSMContext
|
|
3
3
|
|
|
4
|
-
from arpakitlib.
|
|
4
|
+
from arpakitlib.ar_aiogram_as_tg_command_util import as_tg_command
|
|
5
5
|
from project.tg_bot.blank.admin import get_cached_eng_admin_tg_bot_blank
|
|
6
6
|
from project.tg_bot.const import AdminTgBotCommands
|
|
7
7
|
from project.tg_bot.filter_.is_private_chat import IsPrivateChatTgBotFilter
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import aiogram.filters
|
|
2
2
|
from aiogram.fsm.context import FSMContext
|
|
3
3
|
|
|
4
|
-
from arpakitlib.
|
|
4
|
+
from arpakitlib.ar_aiogram_as_tg_command_util import as_tg_command
|
|
5
5
|
from project.tg_bot.const import AdminTgBotCommands
|
|
6
6
|
from project.tg_bot.filter_.is_private_chat import IsPrivateChatTgBotFilter
|
|
7
7
|
from project.tg_bot.filter_.user_roles_has_admin import UserRolesHasAdminTgBotFilter
|
arpakitlib/_arpakit_project_template_v_5/project/tg_bot/router/admin/reinit_sqlalchemy_db.py
CHANGED
|
@@ -3,7 +3,7 @@ from aiogram import Router
|
|
|
3
3
|
from aiogram.filters import Command
|
|
4
4
|
from aiogram.fsm.context import FSMContext
|
|
5
5
|
|
|
6
|
-
from arpakitlib.
|
|
6
|
+
from arpakitlib.ar_aiogram_as_tg_command_util import as_tg_command
|
|
7
7
|
from project.core.settings import get_cached_settings
|
|
8
8
|
from project.sqlalchemy_db_.sqlalchemy_db import get_cached_sqlalchemy_db
|
|
9
9
|
from project.tg_bot.blank.admin import get_cached_eng_admin_tg_bot_blank
|
|
@@ -3,7 +3,7 @@ from aiogram import Router
|
|
|
3
3
|
from aiogram.filters import Command
|
|
4
4
|
from aiogram.fsm.context import FSMContext
|
|
5
5
|
|
|
6
|
-
from arpakitlib.
|
|
6
|
+
from arpakitlib.ar_aiogram_as_tg_command_util import as_tg_command
|
|
7
7
|
from project.tg_bot.blank.admin import get_cached_eng_admin_tg_bot_blank
|
|
8
8
|
from project.tg_bot.const import AdminTgBotCommands
|
|
9
9
|
from project.tg_bot.filter_.is_private_chat import IsPrivateChatTgBotFilter
|
|
@@ -326,21 +326,21 @@ arpakitlib/_arpakit_project_template_v_5/project/tg_bot/middleware/init_user.py,
|
|
|
326
326
|
arpakitlib/_arpakit_project_template_v_5/project/tg_bot/middleware/uil.py,sha256=66v3pHu8nhJ8pJayXaHNKjmPVK4fKUCNWilOM0yzNKg,319
|
|
327
327
|
arpakitlib/_arpakit_project_template_v_5/project/tg_bot/router/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
328
328
|
arpakitlib/_arpakit_project_template_v_5/project/tg_bot/router/admin/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
329
|
-
arpakitlib/_arpakit_project_template_v_5/project/tg_bot/router/admin/arpakitlib_project_template_info.py,sha256=
|
|
330
|
-
arpakitlib/_arpakit_project_template_v_5/project/tg_bot/router/admin/clear_log_file.py,sha256=
|
|
331
|
-
arpakitlib/_arpakit_project_template_v_5/project/tg_bot/router/admin/current_state.py,sha256=
|
|
332
|
-
arpakitlib/_arpakit_project_template_v_5/project/tg_bot/router/admin/drop_sqlalchemy_db.py,sha256=
|
|
329
|
+
arpakitlib/_arpakit_project_template_v_5/project/tg_bot/router/admin/arpakitlib_project_template_info.py,sha256=aO9fcVFYLDMNP-TNppUDcCfR0A9W6AsGsUgo6Tzl_7E,1088
|
|
330
|
+
arpakitlib/_arpakit_project_template_v_5/project/tg_bot/router/admin/clear_log_file.py,sha256=s6liobnWWIaM8JFj29VXVLsbuFjmskvPpkeWdkt1bjY,1359
|
|
331
|
+
arpakitlib/_arpakit_project_template_v_5/project/tg_bot/router/admin/current_state.py,sha256=y3bAXwbu0GloPrQsTvdk939xEJ1AczTQNqRZgqZz5bY,935
|
|
332
|
+
arpakitlib/_arpakit_project_template_v_5/project/tg_bot/router/admin/drop_sqlalchemy_db.py,sha256=khQkv_H37cirjD2ZMXgm3eAjifhroFbBavFUjPT4siU,1288
|
|
333
333
|
arpakitlib/_arpakit_project_template_v_5/project/tg_bot/router/admin/hello_world.py,sha256=jGE8p-rBiWIwDz8Hozg-q92NdFenD5uE6K8cLbXuXRA,2430
|
|
334
|
-
arpakitlib/_arpakit_project_template_v_5/project/tg_bot/router/admin/init_sqlalchemy_db.py,sha256=
|
|
335
|
-
arpakitlib/_arpakit_project_template_v_5/project/tg_bot/router/admin/kb_with_not_modified.py,sha256=
|
|
336
|
-
arpakitlib/_arpakit_project_template_v_5/project/tg_bot/router/admin/kb_with_old_cd.py,sha256=
|
|
337
|
-
arpakitlib/_arpakit_project_template_v_5/project/tg_bot/router/admin/kb_with_raise_error.py,sha256=
|
|
338
|
-
arpakitlib/_arpakit_project_template_v_5/project/tg_bot/router/admin/kb_with_remove_message.py,sha256=
|
|
339
|
-
arpakitlib/_arpakit_project_template_v_5/project/tg_bot/router/admin/log_file.py,sha256=
|
|
340
|
-
arpakitlib/_arpakit_project_template_v_5/project/tg_bot/router/admin/me.py,sha256
|
|
341
|
-
arpakitlib/_arpakit_project_template_v_5/project/tg_bot/router/admin/raise_fake_error.py,sha256=
|
|
342
|
-
arpakitlib/_arpakit_project_template_v_5/project/tg_bot/router/admin/reinit_sqlalchemy_db.py,sha256=
|
|
343
|
-
arpakitlib/_arpakit_project_template_v_5/project/tg_bot/router/admin/set_tg_bot_commands.py,sha256=
|
|
334
|
+
arpakitlib/_arpakit_project_template_v_5/project/tg_bot/router/admin/init_sqlalchemy_db.py,sha256=Tgr7ZKM_PMvXxSfFActFi_Ht7hrx-9hvgTo4WsIobEw,1064
|
|
335
|
+
arpakitlib/_arpakit_project_template_v_5/project/tg_bot/router/admin/kb_with_not_modified.py,sha256=nkHcwpKcd8JMQjXqLqA9sKqJ57RDjZ96gHI9WKHZxBc,2045
|
|
336
|
+
arpakitlib/_arpakit_project_template_v_5/project/tg_bot/router/admin/kb_with_old_cd.py,sha256=ZXV5tUeNi3bZv_UYFKTkcJenKkq851kEmETdj5ivSoQ,1299
|
|
337
|
+
arpakitlib/_arpakit_project_template_v_5/project/tg_bot/router/admin/kb_with_raise_error.py,sha256=ohCdp7jJr7wucpMRoZd3ParsEqQsA84NPULnRjbX94A,1619
|
|
338
|
+
arpakitlib/_arpakit_project_template_v_5/project/tg_bot/router/admin/kb_with_remove_message.py,sha256=iysrIOCPs0b8eLaXYxP7YkJYAIGNzB5UbgunYm4oSa8,1341
|
|
339
|
+
arpakitlib/_arpakit_project_template_v_5/project/tg_bot/router/admin/log_file.py,sha256=7Xvd-300Ww6MY5eSkOTsw8_0XOBzmmYBchw3KO0_fSM,1358
|
|
340
|
+
arpakitlib/_arpakit_project_template_v_5/project/tg_bot/router/admin/me.py,sha256=zK9iFn93NmIqMjkiiKLH_-RMJYDYxwbEkAt3awX7Koo,988
|
|
341
|
+
arpakitlib/_arpakit_project_template_v_5/project/tg_bot/router/admin/raise_fake_error.py,sha256=KO-wEBSgs5NiF88RhKisIWe-gXJBjiNleATpx9qGVRc,829
|
|
342
|
+
arpakitlib/_arpakit_project_template_v_5/project/tg_bot/router/admin/reinit_sqlalchemy_db.py,sha256=KC9qyp3D0TPrRcZR2HSRyYBJjHDlrBeSnORPYS8vjTw,1309
|
|
343
|
+
arpakitlib/_arpakit_project_template_v_5/project/tg_bot/router/admin/set_tg_bot_commands.py,sha256=JcE_to1-VnZVv6vyowY-I2R_IW5YBs_dm1uAKaQ49kA,1097
|
|
344
344
|
arpakitlib/_arpakit_project_template_v_5/project/tg_bot/router/client/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
345
345
|
arpakitlib/_arpakit_project_template_v_5/project/tg_bot/router/client/about.py,sha256=blOgJ2eNJm6eE2odtcnCMfIrmelJUmEaZVP_Kirwclo,935
|
|
346
346
|
arpakitlib/_arpakit_project_template_v_5/project/tg_bot/router/client/author.py,sha256=7GXp916EAtCjnG5bekEACjSxTSwilZgod0NzQYDn--I,957
|
|
@@ -376,7 +376,7 @@ arpakitlib/_arpakit_project_template_v_5/project/util/etc.py,sha256=47DEQpj8HBSa
|
|
|
376
376
|
arpakitlib/_arpakit_project_template_v_5/project/util/send_email_.py,sha256=AZ2PHRQh-l7H3WLxgxygEKD8c_WPguIq4weP2zqfF9I,4748
|
|
377
377
|
arpakitlib/_arpakit_project_template_v_5/todo.txt,sha256=q132Jbx229ThY77S3YiN-Cj5AVm7k1VlJcMYIbZUHUY,3
|
|
378
378
|
arpakitlib/ar_additional_model_util.py,sha256=GFg-glLCxH9X95R2bhTJsscVwv37FgE1qbaAAyXrnIE,917
|
|
379
|
-
arpakitlib/
|
|
379
|
+
arpakitlib/ar_aiogram_as_tg_command_util.py,sha256=4bizX5Xg-E2-r2TXXGQGanJozsIWPVf5luO3vKUN8p8,8471
|
|
380
380
|
arpakitlib/ar_arpakit_lib_module_util.py,sha256=g9uWwTK2eEzmErqwYeVgXDYVMREN8m5CdmgEumAEQfw,5919
|
|
381
381
|
arpakitlib/ar_arpakit_project_template_util.py,sha256=5-o6eTmh-2DqsIqmo63SXw7ttExhmuAehMNc4s0GdtU,3278
|
|
382
382
|
arpakitlib/ar_arpakit_schedule_uust_api_client_util.py,sha256=MRPaF31CRhYA45ldPnoRpaTPMazCJq0jbwDxW5rvMww,12937
|
|
@@ -390,7 +390,6 @@ arpakitlib/ar_class_util.py,sha256=i76pQW_7k_S2m_DlQh6xNjtggv9Col3WSx9W_bwk98E,7
|
|
|
390
390
|
arpakitlib/ar_clone_pydantic_model_fields.py,sha256=5i77NGEjnY2ppk_Ot179egQGNDvg7zre8NBl5Es1nkg,1453
|
|
391
391
|
arpakitlib/ar_datetime_util.py,sha256=3Pw8ljsBKkkEUCmu1PsnJqNeG5bVLqtpsUGaztJF8jQ,1432
|
|
392
392
|
arpakitlib/ar_dict_util.py,sha256=oet-9AJEjQZfG_EI82BuYW0jdW2NQxKjPXol_nfTXjw,447
|
|
393
|
-
arpakitlib/ar_dream_ai_api_client_util.py,sha256=Z1oii_XSsgunYx17SdcHl54S4KPQti7-MJs0xXZ8vL0,2830
|
|
394
393
|
arpakitlib/ar_encrypt_decrypt_util.py,sha256=GhWnp7HHkbhwFVVCzO1H07m-5gryr4yjWsXjOaNQm1Y,520
|
|
395
394
|
arpakitlib/ar_ensure_sqlalchemy_check_constraints.py,sha256=JJbgaUiLT8D8oDVevP25wlMz1BTtx0JMasJ_ILyIJ3o,5328
|
|
396
395
|
arpakitlib/ar_enumeration_util.py,sha256=XoFInWtGzbIr6fJq0un5nettaDfOLAyY84ovwj7n_7g,3030
|
|
@@ -431,8 +430,8 @@ arpakitlib/ar_sqlalchemy_util.py,sha256=vWNCzFv13YsGRZaemkNI1_BF__4Z1_Vqm-gqQL1P
|
|
|
431
430
|
arpakitlib/ar_str_util.py,sha256=2lGpnXDf2h1cBZpVf5i1tX_HCv5iBd6IGnrCw4QWWlY,4350
|
|
432
431
|
arpakitlib/ar_type_util.py,sha256=Cs_tef-Fc5xeyAF54KgISCsP11NHyzIsglm4S3Xx7iM,4049
|
|
433
432
|
arpakitlib/ar_uppercase_env_keys.py,sha256=UFHLGIR70UB02eD7IAIBrZIbycwWCx3OP_W4J2cx2Jw,2395
|
|
434
|
-
arpakitlib-1.8.
|
|
435
|
-
arpakitlib-1.8.
|
|
436
|
-
arpakitlib-1.8.
|
|
437
|
-
arpakitlib-1.8.
|
|
438
|
-
arpakitlib-1.8.
|
|
433
|
+
arpakitlib-1.8.305.dist-info/METADATA,sha256=3Af4Vr5d4aLDSVb8SlIuRofHnnfHvp3zYJxRQ0H7_98,3793
|
|
434
|
+
arpakitlib-1.8.305.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
|
|
435
|
+
arpakitlib-1.8.305.dist-info/entry_points.txt,sha256=36xqR3PJFT2kuwjkM_EqoIy0qFUDPKSm_mJaI7emewE,87
|
|
436
|
+
arpakitlib-1.8.305.dist-info/licenses/LICENSE,sha256=GPEDQMam2r7FSTYqM1mm7aKnxLaWcBotH7UvQtea-ec,11355
|
|
437
|
+
arpakitlib-1.8.305.dist-info/RECORD,,
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
# arpakit
|
|
2
|
-
|
|
3
|
-
import asyncio
|
|
4
|
-
import logging
|
|
5
|
-
from typing import Any
|
|
6
|
-
from urllib.parse import urljoin
|
|
7
|
-
|
|
8
|
-
from aiohttp import ClientResponse
|
|
9
|
-
from pydantic import ConfigDict, BaseModel
|
|
10
|
-
|
|
11
|
-
from arpakitlib.ar_base64_util import convert_base64_string_to_bytes
|
|
12
|
-
from arpakitlib.ar_http_request_util import async_make_http_request
|
|
13
|
-
|
|
14
|
-
_ARPAKIT_LIB_MODULE_VERSION = "3.0"
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
class BaseAPIModel(BaseModel):
|
|
18
|
-
model_config = ConfigDict(extra="ignore", arbitrary_types_allowed=True, from_attributes=True)
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
class GenerateImageFromNumberResApiModel(BaseAPIModel):
|
|
22
|
-
image_filename: str
|
|
23
|
-
image_url: str
|
|
24
|
-
image_base64: str
|
|
25
|
-
|
|
26
|
-
def save_file(self, filepath: str):
|
|
27
|
-
with open(filepath, mode="wb") as f:
|
|
28
|
-
f.write(convert_base64_string_to_bytes(base64_string=self.image_base64))
|
|
29
|
-
return filepath
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
class DREAMAIAPIClient:
|
|
33
|
-
def __init__(
|
|
34
|
-
self,
|
|
35
|
-
*,
|
|
36
|
-
base_url: str = "https://api.dreamai.arpakit.com/api/v1",
|
|
37
|
-
api_key: str | None = "1"
|
|
38
|
-
):
|
|
39
|
-
self._logger = logging.getLogger(__name__)
|
|
40
|
-
self.api_key = api_key
|
|
41
|
-
base_url = base_url.strip()
|
|
42
|
-
if not base_url.endswith("/"):
|
|
43
|
-
base_url += "/"
|
|
44
|
-
self.base_url = base_url
|
|
45
|
-
self.headers = {"Content-Type": "application/json"}
|
|
46
|
-
if api_key is not None:
|
|
47
|
-
self.headers.update({"apikey": api_key})
|
|
48
|
-
|
|
49
|
-
async def _async_make_http_request(
|
|
50
|
-
self,
|
|
51
|
-
*,
|
|
52
|
-
method: str = "GET",
|
|
53
|
-
url: str,
|
|
54
|
-
params: dict[str, Any] | None = None
|
|
55
|
-
) -> ClientResponse:
|
|
56
|
-
response = await async_make_http_request(
|
|
57
|
-
method=method,
|
|
58
|
-
url=url,
|
|
59
|
-
params=params,
|
|
60
|
-
headers=self.headers,
|
|
61
|
-
)
|
|
62
|
-
response.raise_for_status()
|
|
63
|
-
return response
|
|
64
|
-
|
|
65
|
-
async def healthcheck(self) -> bool:
|
|
66
|
-
response = await self._async_make_http_request(method="GET", url=urljoin(self.base_url, "healthcheck"))
|
|
67
|
-
json_data = await response.json()
|
|
68
|
-
return json_data["data"]["healthcheck"] == "healthcheck"
|
|
69
|
-
|
|
70
|
-
async def is_healthcheck_good(self) -> bool:
|
|
71
|
-
try:
|
|
72
|
-
return await self.healthcheck()
|
|
73
|
-
except Exception as exception:
|
|
74
|
-
self._logger.error(exception)
|
|
75
|
-
return False
|
|
76
|
-
|
|
77
|
-
async def generate_image_from_number(self, *, number: int) -> GenerateImageFromNumberResApiModel:
|
|
78
|
-
response = await self._async_make_http_request(
|
|
79
|
-
method="GET",
|
|
80
|
-
url=urljoin(self.base_url, "generate_image_from_number"),
|
|
81
|
-
params={"number": number}
|
|
82
|
-
)
|
|
83
|
-
json_data = await response.json()
|
|
84
|
-
return GenerateImageFromNumberResApiModel.model_validate(json_data)
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
def __example():
|
|
88
|
-
pass
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
async def __async_example():
|
|
92
|
-
pass
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
if __name__ == '__main__':
|
|
96
|
-
__example()
|
|
97
|
-
asyncio.run(__async_example())
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|