arpakitlib 1.4.0__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.

Files changed (68) hide show
  1. arpakitlib/AUTHOR.md +6 -0
  2. arpakitlib/LICENSE +201 -0
  3. arpakitlib/NOTICE +2 -0
  4. arpakitlib/README.md +6 -0
  5. arpakitlib/__init__.py +0 -0
  6. arpakitlib/ar_additional_model_util.py +8 -0
  7. arpakitlib/ar_aiogram_util.py +363 -0
  8. arpakitlib/ar_arpakit_lib_module_util.py +150 -0
  9. arpakitlib/ar_arpakit_schedule_uust_api_client.py +527 -0
  10. arpakitlib/ar_arpakitlib_info.py +11 -0
  11. arpakitlib/ar_base64_util.py +30 -0
  12. arpakitlib/ar_base_worker.py +77 -0
  13. arpakitlib/ar_cache_file.py +124 -0
  14. arpakitlib/ar_datetime_util.py +38 -0
  15. arpakitlib/ar_dict_util.py +24 -0
  16. arpakitlib/ar_dream_ai_api_client.py +120 -0
  17. arpakitlib/ar_encrypt_and_decrypt_util.py +23 -0
  18. arpakitlib/ar_enumeration.py +76 -0
  19. arpakitlib/ar_fastapi_static/redoc/redoc.standalone.js +1826 -0
  20. arpakitlib/ar_fastapi_static/swagger-ui/favicon-16x16.png +0 -0
  21. arpakitlib/ar_fastapi_static/swagger-ui/favicon-32x32.png +0 -0
  22. arpakitlib/ar_fastapi_static/swagger-ui/index.css +16 -0
  23. arpakitlib/ar_fastapi_static/swagger-ui/index.html +19 -0
  24. arpakitlib/ar_fastapi_static/swagger-ui/oauth2-redirect.html +79 -0
  25. arpakitlib/ar_fastapi_static/swagger-ui/swagger-initializer.js +20 -0
  26. arpakitlib/ar_fastapi_static/swagger-ui/swagger-ui-bundle.js +2 -0
  27. arpakitlib/ar_fastapi_static/swagger-ui/swagger-ui-bundle.js.map +1 -0
  28. arpakitlib/ar_fastapi_static/swagger-ui/swagger-ui-es-bundle-core.js +3 -0
  29. arpakitlib/ar_fastapi_static/swagger-ui/swagger-ui-es-bundle-core.js.map +1 -0
  30. arpakitlib/ar_fastapi_static/swagger-ui/swagger-ui-es-bundle.js +2 -0
  31. arpakitlib/ar_fastapi_static/swagger-ui/swagger-ui-es-bundle.js.map +1 -0
  32. arpakitlib/ar_fastapi_static/swagger-ui/swagger-ui-standalone-preset.js +2 -0
  33. arpakitlib/ar_fastapi_static/swagger-ui/swagger-ui-standalone-preset.js.map +1 -0
  34. arpakitlib/ar_fastapi_static/swagger-ui/swagger-ui.css +3 -0
  35. arpakitlib/ar_fastapi_static/swagger-ui/swagger-ui.css.map +1 -0
  36. arpakitlib/ar_fastapi_static/swagger-ui/swagger-ui.js +2 -0
  37. arpakitlib/ar_fastapi_static/swagger-ui/swagger-ui.js.map +1 -0
  38. arpakitlib/ar_fastapi_util.py +294 -0
  39. arpakitlib/ar_file_storage_in_dir.py +127 -0
  40. arpakitlib/ar_generate_env_example.py +16 -0
  41. arpakitlib/ar_hash_util.py +19 -0
  42. arpakitlib/ar_http_request_util.py +75 -0
  43. arpakitlib/ar_ip_util.py +50 -0
  44. arpakitlib/ar_json_db.py +231 -0
  45. arpakitlib/ar_json_util.py +28 -0
  46. arpakitlib/ar_jwt_util.py +38 -0
  47. arpakitlib/ar_list_of_dicts_to_xlsx.py +32 -0
  48. arpakitlib/ar_list_util.py +26 -0
  49. arpakitlib/ar_logging_util.py +45 -0
  50. arpakitlib/ar_mongodb_util.py +143 -0
  51. arpakitlib/ar_need_type_util.py +58 -0
  52. arpakitlib/ar_openai_util.py +59 -0
  53. arpakitlib/ar_parse_command.py +102 -0
  54. arpakitlib/ar_postgresql_util.py +45 -0
  55. arpakitlib/ar_run_cmd.py +48 -0
  56. arpakitlib/ar_safe_sleep.py +23 -0
  57. arpakitlib/ar_schedule_uust_api_client.py +216 -0
  58. arpakitlib/ar_sqlalchemy_util.py +124 -0
  59. arpakitlib/ar_ssh_runner.py +260 -0
  60. arpakitlib/ar_str_util.py +79 -0
  61. arpakitlib/ar_type_util.py +82 -0
  62. arpakitlib/ar_yookassa_api_client.py +224 -0
  63. arpakitlib/ar_zabbix_util.py +190 -0
  64. arpakitlib-1.4.0.dist-info/LICENSE +201 -0
  65. arpakitlib-1.4.0.dist-info/METADATA +327 -0
  66. arpakitlib-1.4.0.dist-info/NOTICE +2 -0
  67. arpakitlib-1.4.0.dist-info/RECORD +68 -0
  68. arpakitlib-1.4.0.dist-info/WHEEL +4 -0
@@ -0,0 +1,16 @@
1
+ html {
2
+ box-sizing: border-box;
3
+ overflow: -moz-scrollbars-vertical;
4
+ overflow-y: scroll;
5
+ }
6
+
7
+ *,
8
+ *:before,
9
+ *:after {
10
+ box-sizing: inherit;
11
+ }
12
+
13
+ body {
14
+ margin: 0;
15
+ background: #fafafa;
16
+ }
@@ -0,0 +1,19 @@
1
+ <!-- HTML for static distribution bundle build -->
2
+ <!DOCTYPE html>
3
+ <html lang="en">
4
+ <head>
5
+ <meta charset="UTF-8">
6
+ <title>Swagger UI</title>
7
+ <link rel="stylesheet" type="text/css" href="./swagger-ui.css" />
8
+ <link rel="stylesheet" type="text/css" href="index.css" />
9
+ <link rel="icon" type="image/png" href="./favicon-32x32.png" sizes="32x32" />
10
+ <link rel="icon" type="image/png" href="./favicon-16x16.png" sizes="16x16" />
11
+ </head>
12
+
13
+ <body>
14
+ <div id="swagger-ui"></div>
15
+ <script src="./swagger-ui-bundle.js" charset="UTF-8"> </script>
16
+ <script src="./swagger-ui-standalone-preset.js" charset="UTF-8"> </script>
17
+ <script src="./swagger-initializer.js" charset="UTF-8"> </script>
18
+ </body>
19
+ </html>
@@ -0,0 +1,79 @@
1
+ <!doctype html>
2
+ <html lang="en-US">
3
+ <head>
4
+ <title>Swagger UI: OAuth2 Redirect</title>
5
+ </head>
6
+ <body>
7
+ <script>
8
+ 'use strict';
9
+ function run () {
10
+ var oauth2 = window.opener.swaggerUIRedirectOauth2;
11
+ var sentState = oauth2.state;
12
+ var redirectUrl = oauth2.redirectUrl;
13
+ var isValid, qp, arr;
14
+
15
+ if (/code|token|error/.test(window.location.hash)) {
16
+ qp = window.location.hash.substring(1).replace('?', '&');
17
+ } else {
18
+ qp = location.search.substring(1);
19
+ }
20
+
21
+ arr = qp.split("&");
22
+ arr.forEach(function (v,i,_arr) { _arr[i] = '"' + v.replace('=', '":"') + '"';});
23
+ qp = qp ? JSON.parse('{' + arr.join() + '}',
24
+ function (key, value) {
25
+ return key === "" ? value : decodeURIComponent(value);
26
+ }
27
+ ) : {};
28
+
29
+ isValid = qp.state === sentState;
30
+
31
+ if ((
32
+ oauth2.auth.schema.get("flow") === "accessCode" ||
33
+ oauth2.auth.schema.get("flow") === "authorizationCode" ||
34
+ oauth2.auth.schema.get("flow") === "authorization_code"
35
+ ) && !oauth2.auth.code) {
36
+ if (!isValid) {
37
+ oauth2.errCb({
38
+ authId: oauth2.auth.name,
39
+ source: "auth",
40
+ level: "warning",
41
+ message: "Authorization may be unsafe, passed state was changed in server. The passed state wasn't returned from auth server."
42
+ });
43
+ }
44
+
45
+ if (qp.code) {
46
+ delete oauth2.state;
47
+ oauth2.auth.code = qp.code;
48
+ oauth2.callback({auth: oauth2.auth, redirectUrl: redirectUrl});
49
+ } else {
50
+ let oauthErrorMsg;
51
+ if (qp.error) {
52
+ oauthErrorMsg = "["+qp.error+"]: " +
53
+ (qp.error_description ? qp.error_description+ ". " : "no accessCode received from the server. ") +
54
+ (qp.error_uri ? "More info: "+qp.error_uri : "");
55
+ }
56
+
57
+ oauth2.errCb({
58
+ authId: oauth2.auth.name,
59
+ source: "auth",
60
+ level: "error",
61
+ message: oauthErrorMsg || "[Authorization failed]: no accessCode received from the server."
62
+ });
63
+ }
64
+ } else {
65
+ oauth2.callback({auth: oauth2.auth, token: qp, isValid: isValid, redirectUrl: redirectUrl});
66
+ }
67
+ window.close();
68
+ }
69
+
70
+ if (document.readyState !== 'loading') {
71
+ run();
72
+ } else {
73
+ document.addEventListener('DOMContentLoaded', function () {
74
+ run();
75
+ });
76
+ }
77
+ </script>
78
+ </body>
79
+ </html>
@@ -0,0 +1,20 @@
1
+ window.onload = function() {
2
+ //<editor-fold desc="Changeable Configuration Block">
3
+
4
+ // the following lines will be replaced by docker/configurator, when it runs in a docker-container
5
+ window.ui = SwaggerUIBundle({
6
+ url: "https://petstore.swagger.io/v2/swagger.json",
7
+ dom_id: '#swagger-ui',
8
+ deepLinking: true,
9
+ presets: [
10
+ SwaggerUIBundle.presets.apis,
11
+ SwaggerUIStandalonePreset
12
+ ],
13
+ plugins: [
14
+ SwaggerUIBundle.plugins.DownloadUrl
15
+ ],
16
+ layout: "StandaloneLayout"
17
+ });
18
+
19
+ //</editor-fold>
20
+ };