infomankit 0.3.4__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 (108) hide show
  1. infomankit-0.3.4/.gitignore +391 -0
  2. infomankit-0.3.4/PKG-INFO +518 -0
  3. infomankit-0.3.4/README.md +373 -0
  4. infomankit-0.3.4/doc/changelog/README.md +53 -0
  5. infomankit-0.3.4/examples/README.md +331 -0
  6. infomankit-0.3.4/infoman/__init__.py +1 -0
  7. infomankit-0.3.4/infoman/cli/README.md +378 -0
  8. infomankit-0.3.4/infoman/cli/__init__.py +7 -0
  9. infomankit-0.3.4/infoman/cli/commands/__init__.py +3 -0
  10. infomankit-0.3.4/infoman/cli/commands/init.py +117 -0
  11. infomankit-0.3.4/infoman/cli/scaffold.py +487 -0
  12. infomankit-0.3.4/infoman/config/__init__.py +25 -0
  13. infomankit-0.3.4/infoman/config/base.py +54 -0
  14. infomankit-0.3.4/infoman/config/db_cache.py +237 -0
  15. infomankit-0.3.4/infoman/config/db_relation.py +180 -0
  16. infomankit-0.3.4/infoman/config/db_vector.py +39 -0
  17. infomankit-0.3.4/infoman/config/jwt.py +16 -0
  18. infomankit-0.3.4/infoman/config/llm.py +16 -0
  19. infomankit-0.3.4/infoman/config/log.py +627 -0
  20. infomankit-0.3.4/infoman/config/mq.py +26 -0
  21. infomankit-0.3.4/infoman/config/settings.py +65 -0
  22. infomankit-0.3.4/infoman/llm/__init__.py +0 -0
  23. infomankit-0.3.4/infoman/llm/llm.py +297 -0
  24. infomankit-0.3.4/infoman/logger/__init__.py +57 -0
  25. infomankit-0.3.4/infoman/logger/context.py +191 -0
  26. infomankit-0.3.4/infoman/logger/core.py +370 -0
  27. infomankit-0.3.4/infoman/logger/filters.py +191 -0
  28. infomankit-0.3.4/infoman/logger/formatters.py +138 -0
  29. infomankit-0.3.4/infoman/logger/handlers.py +276 -0
  30. infomankit-0.3.4/infoman/logger/metrics.py +160 -0
  31. infomankit-0.3.4/infoman/service/__init__.py +8 -0
  32. infomankit-0.3.4/infoman/service/app.py +74 -0
  33. infomankit-0.3.4/infoman/service/core/__init__.py +0 -0
  34. infomankit-0.3.4/infoman/service/core/auth.py +105 -0
  35. infomankit-0.3.4/infoman/service/core/lifespan.py +78 -0
  36. infomankit-0.3.4/infoman/service/core/monitor.py +57 -0
  37. infomankit-0.3.4/infoman/service/core/response.py +37 -0
  38. infomankit-0.3.4/infoman/service/exception/__init__.py +7 -0
  39. infomankit-0.3.4/infoman/service/exception/error.py +274 -0
  40. infomankit-0.3.4/infoman/service/exception/exception.py +25 -0
  41. infomankit-0.3.4/infoman/service/exception/handler.py +238 -0
  42. infomankit-0.3.4/infoman/service/infrastructure/__init__.py +8 -0
  43. infomankit-0.3.4/infoman/service/infrastructure/base.py +212 -0
  44. infomankit-0.3.4/infoman/service/infrastructure/db_cache/__init__.py +8 -0
  45. infomankit-0.3.4/infoman/service/infrastructure/db_cache/manager.py +183 -0
  46. infomankit-0.3.4/infoman/service/infrastructure/db_relation/__init__.py +58 -0
  47. infomankit-0.3.4/infoman/service/infrastructure/db_relation/manager.py +310 -0
  48. infomankit-0.3.4/infoman/service/infrastructure/db_relation/manager_hybrid.py +579 -0
  49. infomankit-0.3.4/infoman/service/infrastructure/db_relation/mysql.py +52 -0
  50. infomankit-0.3.4/infoman/service/infrastructure/db_relation/pgsql.py +54 -0
  51. infomankit-0.3.4/infoman/service/infrastructure/db_relation/sqllite.py +25 -0
  52. infomankit-0.3.4/infoman/service/infrastructure/db_vector/__init__.py +40 -0
  53. infomankit-0.3.4/infoman/service/infrastructure/db_vector/manager.py +216 -0
  54. infomankit-0.3.4/infoman/service/infrastructure/db_vector/qdrant.py +322 -0
  55. infomankit-0.3.4/infoman/service/infrastructure/mq/__init__.py +15 -0
  56. infomankit-0.3.4/infoman/service/infrastructure/mq/manager.py +168 -0
  57. infomankit-0.3.4/infoman/service/infrastructure/mq/nats/__init__.py +0 -0
  58. infomankit-0.3.4/infoman/service/infrastructure/mq/nats/nats_client.py +57 -0
  59. infomankit-0.3.4/infoman/service/infrastructure/mq/nats/nats_event_router.py +25 -0
  60. infomankit-0.3.4/infoman/service/launch.py +288 -0
  61. infomankit-0.3.4/infoman/service/middleware/__init__.py +7 -0
  62. infomankit-0.3.4/infoman/service/middleware/base.py +41 -0
  63. infomankit-0.3.4/infoman/service/middleware/logging.py +83 -0
  64. infomankit-0.3.4/infoman/service/middleware/rate_limit.py +301 -0
  65. infomankit-0.3.4/infoman/service/middleware/request_id.py +21 -0
  66. infomankit-0.3.4/infoman/service/middleware/white_list.py +24 -0
  67. infomankit-0.3.4/infoman/service/models/__init__.py +8 -0
  68. infomankit-0.3.4/infoman/service/models/base.py +441 -0
  69. infomankit-0.3.4/infoman/service/models/type/embed.py +70 -0
  70. infomankit-0.3.4/infoman/service/routers/__init__.py +18 -0
  71. infomankit-0.3.4/infoman/service/routers/health_router.py +19 -0
  72. infomankit-0.3.4/infoman/service/routers/monitor_router.py +44 -0
  73. infomankit-0.3.4/infoman/service/utils/__init__.py +8 -0
  74. infomankit-0.3.4/infoman/service/utils/cache/__init__.py +0 -0
  75. infomankit-0.3.4/infoman/service/utils/cache/cache.py +192 -0
  76. infomankit-0.3.4/infoman/service/utils/module_loader.py +10 -0
  77. infomankit-0.3.4/infoman/service/utils/parse.py +10 -0
  78. infomankit-0.3.4/infoman/service/utils/resolver/__init__.py +8 -0
  79. infomankit-0.3.4/infoman/service/utils/resolver/base.py +47 -0
  80. infomankit-0.3.4/infoman/service/utils/resolver/resp.py +102 -0
  81. infomankit-0.3.4/infoman/service/vector/__init__.py +20 -0
  82. infomankit-0.3.4/infoman/service/vector/base.py +56 -0
  83. infomankit-0.3.4/infoman/service/vector/qdrant.py +125 -0
  84. infomankit-0.3.4/infoman/service/vector/service.py +67 -0
  85. infomankit-0.3.4/infoman/utils/__init__.py +2 -0
  86. infomankit-0.3.4/infoman/utils/decorators/__init__.py +8 -0
  87. infomankit-0.3.4/infoman/utils/decorators/cache.py +137 -0
  88. infomankit-0.3.4/infoman/utils/decorators/retry.py +99 -0
  89. infomankit-0.3.4/infoman/utils/decorators/safe_execute.py +99 -0
  90. infomankit-0.3.4/infoman/utils/decorators/timing.py +99 -0
  91. infomankit-0.3.4/infoman/utils/encryption/__init__.py +8 -0
  92. infomankit-0.3.4/infoman/utils/encryption/aes.py +66 -0
  93. infomankit-0.3.4/infoman/utils/encryption/ecc.py +108 -0
  94. infomankit-0.3.4/infoman/utils/encryption/rsa.py +112 -0
  95. infomankit-0.3.4/infoman/utils/file/__init__.py +0 -0
  96. infomankit-0.3.4/infoman/utils/file/handler.py +22 -0
  97. infomankit-0.3.4/infoman/utils/hash/__init__.py +0 -0
  98. infomankit-0.3.4/infoman/utils/hash/hash.py +61 -0
  99. infomankit-0.3.4/infoman/utils/http/__init__.py +8 -0
  100. infomankit-0.3.4/infoman/utils/http/client.py +62 -0
  101. infomankit-0.3.4/infoman/utils/http/info.py +36 -0
  102. infomankit-0.3.4/infoman/utils/http/result.py +19 -0
  103. infomankit-0.3.4/infoman/utils/notification/__init__.py +8 -0
  104. infomankit-0.3.4/infoman/utils/notification/feishu.py +35 -0
  105. infomankit-0.3.4/infoman/utils/text/__init__.py +8 -0
  106. infomankit-0.3.4/infoman/utils/text/extractor.py +111 -0
  107. infomankit-0.3.4/pyproject.toml +218 -0
  108. infomankit-0.3.4/tests/README.md +330 -0
@@ -0,0 +1,391 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[codz]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+ ./.claude
9
+ /dist
10
+ # Distribution / packaging
11
+ .Python
12
+ build/
13
+ develop-eggs/
14
+ dist/
15
+ downloads/
16
+ eggs/
17
+ .eggs/
18
+ lib/
19
+ lib64/
20
+ parts/
21
+ sdist/
22
+ var/
23
+ wheels/
24
+ share/python-wheels/
25
+ *.egg-info/
26
+ .installed.cfg
27
+ *.egg
28
+ MANIFEST
29
+
30
+ # PyInstaller
31
+ # Usually these files are written by a python script from a template
32
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
33
+ *.manifest
34
+ *.spec
35
+
36
+ # Installer logs
37
+ pip-log.txt
38
+ pip-delete-this-directory.txt
39
+
40
+ # Unit test / coverage reports
41
+ htmlcov/
42
+ .tox/
43
+ .nox/
44
+ .coverage
45
+ .coverage.*
46
+ .cache
47
+ nosetests.xml
48
+ coverage.xml
49
+ *.cover
50
+ *.py.cover
51
+ .hypothesis/
52
+ .pytest_cache/
53
+ cover/
54
+
55
+ # Translations
56
+ *.mo
57
+ *.pot
58
+
59
+ # Django stuff:
60
+ *.log
61
+ local_settings.py
62
+ db.sqlite3
63
+ db.sqlite3-journal
64
+
65
+ # Flask stuff:
66
+ instance/
67
+ .webassets-cache
68
+
69
+ # Scrapy stuff:
70
+ .scrapy
71
+
72
+ # Sphinx documentation
73
+ docs/_build/
74
+
75
+ # PyBuilder
76
+ .pybuilder/
77
+ target/
78
+
79
+ # Jupyter Notebook
80
+ .ipynb_checkpoints
81
+
82
+ # IPython
83
+ profile_default/
84
+ ipython_config.py
85
+
86
+ # pyenv
87
+ # For a library or package, you might want to ignore these files since the code is
88
+ # intended to run in multiple environments; otherwise, check them in:
89
+ # .python-version
90
+
91
+ # pipenv
92
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
93
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
94
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
95
+ # install all needed dependencies.
96
+ #Pipfile.lock
97
+
98
+ # UV
99
+ # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
100
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
101
+ # commonly ignored for libraries.
102
+ #uv.lock
103
+
104
+ # poetry
105
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
106
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
107
+ # commonly ignored for libraries.
108
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
109
+ #poetry.lock
110
+ #poetry.toml
111
+
112
+ # pdm
113
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
114
+ # pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
115
+ # https://pdm-project.org/en/latest/usage/project/#working-with-version-control
116
+ #pdm.lock
117
+ #pdm.toml
118
+ .pdm-python
119
+ .pdm-build/
120
+
121
+ # pixi
122
+ # Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
123
+ #pixi.lock
124
+ # Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
125
+ # in the .venv directory. It is recommended not to include this directory in version control.
126
+ .pixi
127
+
128
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
129
+ __pypackages__/
130
+
131
+ # Celery stuff
132
+ celerybeat-schedule
133
+ celerybeat.pid
134
+
135
+ # SageMath parsed files
136
+ *.sage.py
137
+
138
+ # Environments
139
+ .env
140
+ .envrc
141
+ .venv
142
+ env/
143
+ venv/
144
+ ENV/
145
+ env.bak/
146
+ venv.bak/
147
+
148
+ # Spyder project settings
149
+ .spyderproject
150
+ .spyproject
151
+
152
+ # Rope project settings
153
+ .ropeproject
154
+
155
+ # mkdocs documentation
156
+ /site
157
+
158
+ # mypy
159
+ .mypy_cache/
160
+ .dmypy.json
161
+ dmypy.json
162
+
163
+ # Pyre type checker
164
+ .pyre/
165
+
166
+ # pytype static type analyzer
167
+ .pytype/
168
+
169
+ # Cython debug symbols
170
+ cython_debug/
171
+
172
+ # PyCharm
173
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
174
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
175
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
176
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
177
+ #.idea/
178
+
179
+ # Abstra
180
+ # Abstra is an AI-powered process automation framework.
181
+ # Ignore directories containing user credentials, local state, and settings.
182
+ # Learn more at https://abstra.io/docs
183
+ .abstra/
184
+
185
+ # Visual Studio Code
186
+ # Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
187
+ # that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
188
+ # and can be added to the global gitignore or merged into this file. However, if you prefer,
189
+ # you could uncomment the following to ignore the entire vscode folder
190
+ # .vscode/
191
+
192
+ # Ruff stuff:
193
+ .ruff_cache/
194
+
195
+ # PyPI configuration file
196
+ .pypirc
197
+
198
+ # Cursor
199
+ # Cursor is an AI-powered code editor. `.cursorignore` specifies files/directories to
200
+ # exclude from AI features like autocomplete and code analysis. Recommended for sensitive data
201
+ # refer to https://docs.cursor.com/context/ignore-files
202
+ .cursorignore
203
+ .cursorindexingignore
204
+
205
+ # Marimo
206
+ marimo/_static/
207
+ marimo/_lsp/
208
+ __marimo__/
209
+
210
+ # Byte-compiled / optimized / DLL files
211
+ __pycache__/
212
+ */**/__pycache__/
213
+ *.py[cod]
214
+ *$py.class
215
+ /logs
216
+ /volumes
217
+ .DS_Store
218
+ */**/.DS_Store
219
+ *.env
220
+ # C extensions
221
+ *.so
222
+ *.log
223
+ # Distribution / packaging
224
+ .Python
225
+ volumes/
226
+ build/
227
+ develop-eggs/
228
+ dist/
229
+ downloads/
230
+ eggs/
231
+ .eggs/
232
+ lib/
233
+ lib64/
234
+ parts/
235
+ sdist/
236
+ var/
237
+ wheels/
238
+ share/python-wheels/
239
+ *.egg-info/
240
+ .installed.cfg
241
+ *.egg
242
+ MANIFEST
243
+
244
+ # PyInstaller
245
+ # Usually these files are written by a python script from a template
246
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
247
+ *.manifest
248
+ *.spec
249
+
250
+ # Installer logs
251
+ pip-log.txt
252
+ pip-delete-this-directory.txt
253
+
254
+ # Unit test / coverage reports
255
+ htmlcov/
256
+ .tox/
257
+ .nox/
258
+ .coverage
259
+ .coverage.*
260
+ .cache
261
+ nosetests.xml
262
+ coverage.xml
263
+ *.cover
264
+ *.py,cover
265
+ .hypothesis/
266
+ .pytest_cache/
267
+ cover/
268
+
269
+ # Translations
270
+ *.mo
271
+ *.pot
272
+
273
+ # Django stuff:
274
+ *.log
275
+ local_settings.py
276
+ db.sqlite3
277
+ db.sqlite3-journal
278
+
279
+ # Flask stuff:
280
+ instance/
281
+ .webassets-cache
282
+
283
+ # Scrapy stuff:
284
+ .scrapy
285
+
286
+ # Sphinx documentation
287
+ docs/_build/
288
+
289
+ # PyBuilder
290
+ .pybuilder/
291
+ target/
292
+
293
+ # Jupyter Notebook
294
+ .ipynb_checkpoints
295
+
296
+ # IPython
297
+ profile_default/
298
+ ipython_config.py
299
+
300
+ # pyenv
301
+ # For a library or package, you might want to ignore these files since the code is
302
+ # intended to run in multiple environments; otherwise, check them in:
303
+ # .python-version
304
+
305
+ # pipenv
306
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
307
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
308
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
309
+ # install all needed dependencies.
310
+ #Pipfile.lock
311
+
312
+ # poetry
313
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
314
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
315
+ # commonly ignored for libraries.
316
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
317
+ #poetry.lock
318
+
319
+ # pdm
320
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
321
+ #pdm.lock
322
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
323
+ # in version control.
324
+ # https://pdm.fming.dev/#use-with-ide
325
+ .pdm.toml
326
+
327
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
328
+ __pypackages__/
329
+
330
+ # Celery stuff
331
+ celerybeat-schedule
332
+ celerybeat.pid
333
+
334
+ # SageMath parsed files
335
+ *.sage.py
336
+
337
+ # Environments
338
+ app/.env
339
+ .env
340
+ .venv
341
+ env/
342
+ venv/
343
+ ENV/
344
+ env.bak/
345
+ venv.bak/
346
+
347
+ # Spyder project settings
348
+ .spyderproject
349
+ .spyproject
350
+
351
+ # Rope project settings
352
+ .ropeproject
353
+
354
+ # mkdocs documentation
355
+ /site
356
+
357
+ # mypy
358
+ .mypy_cache/
359
+ .dmypy.json
360
+ dmypy.json
361
+
362
+ # Pyre type checker
363
+ .pyre/
364
+
365
+ # pytype schemas type analyzer
366
+ .pytype/
367
+
368
+ # Cython debug symbols
369
+ cython_debug/
370
+
371
+ # PyCharm
372
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
373
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
374
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
375
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
376
+ .idea/
377
+
378
+ # Other files
379
+ output/*
380
+ log/*
381
+ .chroma
382
+ vector_store/*
383
+ content/*
384
+ api_content/*
385
+ knowledge_base/*
386
+
387
+ llm/*
388
+
389
+ pyrightconfig.json
390
+ loader/tmp_files
391
+ flagged/*