crypticorn-utils 0.1.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.
- crypticorn_utils/__init__.py +16 -0
- crypticorn_utils/_migration.py +12 -0
- crypticorn_utils/ansi_colors.py +41 -0
- crypticorn_utils/auth.py +345 -0
- crypticorn_utils/cli/__init__.py +4 -0
- crypticorn_utils/cli/__main__.py +17 -0
- crypticorn_utils/cli/init.py +127 -0
- crypticorn_utils/cli/templates/__init__.py +0 -0
- crypticorn_utils/cli/templates/auth.py +33 -0
- crypticorn_utils/cli/version.py +8 -0
- crypticorn_utils/decorators.py +38 -0
- crypticorn_utils/enums.py +175 -0
- crypticorn_utils/errors.py +915 -0
- crypticorn_utils/exceptions.py +183 -0
- crypticorn_utils/logging.py +130 -0
- crypticorn_utils/metrics.py +32 -0
- crypticorn_utils/middleware.py +125 -0
- crypticorn_utils/mixins.py +68 -0
- crypticorn_utils/openapi.py +10 -0
- crypticorn_utils/pagination.py +286 -0
- crypticorn_utils/router/admin_router.py +117 -0
- crypticorn_utils/router/status_router.py +36 -0
- crypticorn_utils/utils.py +93 -0
- crypticorn_utils/warnings.py +79 -0
- crypticorn_utils-0.1.0.dist-info/METADATA +98 -0
- crypticorn_utils-0.1.0.dist-info/RECORD +30 -0
- crypticorn_utils-0.1.0.dist-info/WHEEL +5 -0
- crypticorn_utils-0.1.0.dist-info/entry_points.txt +2 -0
- crypticorn_utils-0.1.0.dist-info/licenses/LICENSE +15 -0
- crypticorn_utils-0.1.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,98 @@
|
|
1
|
+
Metadata-Version: 2.4
|
2
|
+
Name: crypticorn_utils
|
3
|
+
Version: 0.1.0
|
4
|
+
Summary: Shared utilities for the Crypticorn APIs
|
5
|
+
Author-email: Crypticorn <timon@crypticorn.com>
|
6
|
+
License-Expression: MIT
|
7
|
+
Project-URL: Homepage, https://crypticorn.com
|
8
|
+
Project-URL: Documentation, https://docs.crypticorn.com
|
9
|
+
Project-URL: Dashboard, https://app.crypticorn.com
|
10
|
+
Classifier: Topic :: Scientific/Engineering
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
12
|
+
Classifier: Intended Audience :: Developers
|
13
|
+
Classifier: Operating System :: OS Independent
|
14
|
+
Classifier: Programming Language :: Python :: 3.9
|
15
|
+
Classifier: Programming Language :: Python :: 3.10
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
18
|
+
Classifier: Programming Language :: Python :: 3.13
|
19
|
+
Classifier: Typing :: Typed
|
20
|
+
Requires-Python: >=3.9
|
21
|
+
Description-Content-Type: text/markdown
|
22
|
+
License-File: LICENSE
|
23
|
+
Requires-Dist: fastapi<1.0.0,>=0.115.0
|
24
|
+
Requires-Dist: click<9.0.0,>=8.0.0
|
25
|
+
Requires-Dist: psutil<8.0.0,>=7.0.0
|
26
|
+
Requires-Dist: setuptools<81.0.0,>=80.0.0
|
27
|
+
Requires-Dist: strenum
|
28
|
+
Requires-Dist: prometheus-client<1.0.0,>=0.22.0
|
29
|
+
Provides-Extra: dev
|
30
|
+
Requires-Dist: build; extra == "dev"
|
31
|
+
Requires-Dist: twine; extra == "dev"
|
32
|
+
Requires-Dist: black; extra == "dev"
|
33
|
+
Requires-Dist: ruff; extra == "dev"
|
34
|
+
Requires-Dist: isort; extra == "dev"
|
35
|
+
Requires-Dist: mypy; extra == "dev"
|
36
|
+
Requires-Dist: openapi-generator-cli<8.0.0,>=7.12.0; extra == "dev"
|
37
|
+
Requires-Dist: python-semantic-release==9.21.0; extra == "dev"
|
38
|
+
Provides-Extra: test
|
39
|
+
Requires-Dist: pytest==8.3.5; extra == "test"
|
40
|
+
Requires-Dist: pytest-asyncio==0.26.0; extra == "test"
|
41
|
+
Requires-Dist: pytest-cov==6.1.1; extra == "test"
|
42
|
+
Requires-Dist: python-dotenv==1.0.1; extra == "test"
|
43
|
+
Requires-Dist: PyJWT==2.10.0; extra == "test"
|
44
|
+
Requires-Dist: httpx>=0.27.0; extra == "test"
|
45
|
+
Requires-Dist: crypticorn>=2.17.0; extra == "test"
|
46
|
+
Dynamic: license-file
|
47
|
+
|
48
|
+
This module serves as a central place for providing utilities for our python backends.
|
49
|
+
|
50
|
+
- **Auth**: Authentication and authorization for APIs with API key and JWT bearer token support
|
51
|
+
- **Ansi Colors**: ANSI color codes for terminal text formatting and colorful console output
|
52
|
+
- **Decorators**: Utility decorators for model manipulation, including `partial_model` for optional fields
|
53
|
+
- **Enums**: Common enumerations for type safety and consistency
|
54
|
+
- **Errors**: Comprehensive error handling system with HTTP exceptions and error content structures
|
55
|
+
- **Exceptions**: Custom exception classes and error handling utilities
|
56
|
+
- **Logging**: Logging configuration and utilities for consistent formatting
|
57
|
+
- **Middleware**: API middleware components for request/response processing
|
58
|
+
- **Mixins**: Reusable functionality components for class mixing
|
59
|
+
- **Pagination**: Utilities for paginated API responses and cursor-based pagination
|
60
|
+
- **Router**: API routing utilities and components
|
61
|
+
- **Scopes**: Authorization scope definitions and management for API access control
|
62
|
+
- **Urls**: URL management utilities including base URLs, service endpoints, and API versioning
|
63
|
+
- **Utils**: General utility functions and helper methods
|
64
|
+
- **Warnings**: Warning handling and custom warning types
|
65
|
+
- **Metrics**: Shared metrics collection from APIs for visualization
|
66
|
+
|
67
|
+
# Changelog
|
68
|
+
|
69
|
+
<!-- changelog-insertion -->
|
70
|
+
|
71
|
+
## v0.1.0 (2025-06-27)
|
72
|
+
|
73
|
+
|
74
|
+
## v0.1.0-rc.1 (2025-06-23)
|
75
|
+
|
76
|
+
### Documentation
|
77
|
+
|
78
|
+
- Add changelog
|
79
|
+
([`788f1f6`](https://github.com/crypticorn-ai/util-libraries/commit/788f1f670a8a50251401ebd1fc9ab7d2ca855a8d))
|
80
|
+
|
81
|
+
- Update Readme
|
82
|
+
([`d2b52cf`](https://github.com/crypticorn-ai/util-libraries/commit/d2b52cfe48de7a8b248ceefbc3bc7007ad21ea72))
|
83
|
+
|
84
|
+
### Features
|
85
|
+
|
86
|
+
- Initial release
|
87
|
+
([`4da5fe3`](https://github.com/crypticorn-ai/util-libraries/commit/4da5fe3d33abd31b3b35462e93052db0cde077c2))
|
88
|
+
|
89
|
+
|
90
|
+
## Unreleased
|
91
|
+
|
92
|
+
### Documentation
|
93
|
+
|
94
|
+
- Add changelog
|
95
|
+
([`788f1f6`](https://github.com/crypticorn-ai/util-libraries/commit/788f1f670a8a50251401ebd1fc9ab7d2ca855a8d))
|
96
|
+
|
97
|
+
- Update Readme
|
98
|
+
([`d2b52cf`](https://github.com/crypticorn-ai/util-libraries/commit/d2b52cfe48de7a8b248ceefbc3bc7007ad21ea72))
|
@@ -0,0 +1,30 @@
|
|
1
|
+
crypticorn_utils/__init__.py,sha256=PlxMppwUMmbNR9Jr1z9DNCYAYnTuWzW9IFyGTwV5slA,700
|
2
|
+
crypticorn_utils/_migration.py,sha256=YPVEDVIz9Lt3ntwrVmUtavQxsJVjtSqQeQ0A_qydiaY,445
|
3
|
+
crypticorn_utils/ansi_colors.py,sha256=-tMlUTE8NI7TPv7uj0kGRe-SI2hGaUNPKBFI_dfiZy0,1392
|
4
|
+
crypticorn_utils/auth.py,sha256=oJORAuYBD0qiAmUpbMe0JSvp_gsof3oQMNpqay8L6Ek,13018
|
5
|
+
crypticorn_utils/decorators.py,sha256=chsbF27_q3hC0egBaZLfv2vcqUcBSfQXRkLi3Ewb-20,1063
|
6
|
+
crypticorn_utils/enums.py,sha256=hr6QfOwl8AnfPDtxBDc-v7TA9hzKkPhFq0ZdREb6Hzc,5059
|
7
|
+
crypticorn_utils/errors.py,sha256=tR1yZCfI7DL0k7mKHfsRdWNMDU8hNB5v91YLShikWoY,30429
|
8
|
+
crypticorn_utils/exceptions.py,sha256=iHJOtEBrqgzZVa3ZC60TVYpEfUnhxzos_A9QefmVXT8,6633
|
9
|
+
crypticorn_utils/logging.py,sha256=510DSQr4g5UbweSvZAxjdUKtmj-LU3Dw0clARaAvsZA,4439
|
10
|
+
crypticorn_utils/metrics.py,sha256=WjnNs3RE6A_LzO7m_2hp6EQHvOw1r_nWa2Okhm1OGB0,867
|
11
|
+
crypticorn_utils/middleware.py,sha256=tr6IOti_xrZPA5EoFJpEFqLJ2VuxSnXHkCjsFLBtp6w,4130
|
12
|
+
crypticorn_utils/mixins.py,sha256=bN55jStSXk9XGskChh1OE80Oj4B6Wg8LDpxFkP0vw5I,2206
|
13
|
+
crypticorn_utils/openapi.py,sha256=D8bCpCVVzYQptHrJ7SYOgCxI3R_d0cjW9KMOBq-x0xk,279
|
14
|
+
crypticorn_utils/pagination.py,sha256=06shym28tfD-Cc9EPk2W7K2GHqUj2Kk4ShQ0BrKCDWY,11432
|
15
|
+
crypticorn_utils/utils.py,sha256=DXIOjJCdrDqoNCLAtohWYrFnEd1nvmg9NXdL07yWAgk,3137
|
16
|
+
crypticorn_utils/warnings.py,sha256=ErEB108UVZgV5ykSuFkjQgDTb9sb_T9yKq-h753Kw64,3085
|
17
|
+
crypticorn_utils/cli/__init__.py,sha256=5qIQ_WXKSoJk3tGU6n0XwmSX8a2cDRSM6dncaU1qOZ4,123
|
18
|
+
crypticorn_utils/cli/__main__.py,sha256=q_3MdBGUJPukr_xexup3TICf8kLL7Tp4JxLWB5XCESs,303
|
19
|
+
crypticorn_utils/cli/init.py,sha256=Ubu0eOwUqVweb4EzqsceV4K5VMN2qz6_Riy9h2Pjb64,4099
|
20
|
+
crypticorn_utils/cli/version.py,sha256=OVDxeL80eMgZsFgw2cDSzFfuaRToDfnYAVOQTpkoMWs,206
|
21
|
+
crypticorn_utils/cli/templates/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
22
|
+
crypticorn_utils/cli/templates/auth.py,sha256=i27-Ts-Eiyv6_WRshOp7NV5OYUNbw2-kiN5Ll0k2UOA,839
|
23
|
+
crypticorn_utils/router/admin_router.py,sha256=B8s0hqOFe6CFTTsCxtwMUZSdb5EbRsFeKPixH9CXwOU,4090
|
24
|
+
crypticorn_utils/router/status_router.py,sha256=tqrTXq4ZWCxiTXinQoK-2tadWu2jUFzzzkN_Dft0P8g,1084
|
25
|
+
crypticorn_utils-0.1.0.dist-info/licenses/LICENSE,sha256=HonAVvzFXkP2C1d7D3ByIKPwjGH8NcHTAQvKH7uvOHQ,1856
|
26
|
+
crypticorn_utils-0.1.0.dist-info/METADATA,sha256=kFV5kMGArsAVP3GOeCT5Z6MkcdB0RIGIQ5-OZXCaeTI,4021
|
27
|
+
crypticorn_utils-0.1.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
28
|
+
crypticorn_utils-0.1.0.dist-info/entry_points.txt,sha256=G4yWDll7v_Kb4uemqI-_qTKXHvs10R4mD7hNuD-biv4,71
|
29
|
+
crypticorn_utils-0.1.0.dist-info/top_level.txt,sha256=jLPvdxnI36RPf8TX3aZhl35OSd721xEYyFSEeQKF6Ic,17
|
30
|
+
crypticorn_utils-0.1.0.dist-info/RECORD,,
|
@@ -0,0 +1,15 @@
|
|
1
|
+
Copyright © 2025 Crypticorn
|
2
|
+
|
3
|
+
All rights reserved. This software and accompanying documentation files (collectively referred to as "the Software") are the proprietary property of Crypticorn. Any unauthorised reproduction, modification, integration, publication, distribution, sublicensing, sale, or enabling access to the Software without explicit written permission from Crypticorn is strictly prohibited, subject to the conditions outlined herein:
|
4
|
+
|
5
|
+
1. The aforementioned copyright notice and this permission notice must be included unaltered in all copies, or significant portions, of the Software.
|
6
|
+
|
7
|
+
2. The Software is provided "AS IS", without any warranty, whether express or implied. Crypticorn expressly disclaims any guarantees, including but not limited to those of satisfactory quality, fitness for a particular purpose, or non-infringement of third-party rights.
|
8
|
+
|
9
|
+
3. In no event shall Crypticorn, its authors, or copyright holders be held liable for any claim, damages, or other liability arising from or associated with the use of the Software or any other dealings involving the Software, to the extent that such liability can be limited or excluded by applicable law.
|
10
|
+
|
11
|
+
Changes to this agreement may be made without notice, and it is the user's responsibility to keep abreast of any changes. This agreement and its interpretation are subject to the laws of the Federal Republic of Germany.
|
12
|
+
|
13
|
+
If any provision of this license agreement is held to be invalid or unenforceable under applicable law, the remaining provisions will continue in full force and effect. Crypticorn's failure to enforce any provision of this agreement does not constitute a waiver of its right to do so in the future.
|
14
|
+
|
15
|
+
This agreement is written in English. In the event of any discrepancy between the English version and any translation, the English version shall prevail.
|
@@ -0,0 +1 @@
|
|
1
|
+
crypticorn_utils
|