awesome-errors 0.3.0__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 (38) hide show
  1. awesome_errors-0.3.0/.gitignore +118 -0
  2. awesome_errors-0.3.0/LICENSE +21 -0
  3. awesome_errors-0.3.0/PKG-INFO +239 -0
  4. awesome_errors-0.3.0/README.md +205 -0
  5. awesome_errors-0.3.0/pyproject.toml +74 -0
  6. awesome_errors-0.3.0/src/awesome_errors/__init__.py +232 -0
  7. awesome_errors-0.3.0/src/awesome_errors/analysis/__init__.py +8 -0
  8. awesome_errors-0.3.0/src/awesome_errors/analysis/decorators.py +251 -0
  9. awesome_errors-0.3.0/src/awesome_errors/analysis/error_analyzer.py +463 -0
  10. awesome_errors-0.3.0/src/awesome_errors/client/__init__.py +7 -0
  11. awesome_errors-0.3.0/src/awesome_errors/client/exceptions.py +97 -0
  12. awesome_errors-0.3.0/src/awesome_errors/client/response_parser.py +175 -0
  13. awesome_errors-0.3.0/src/awesome_errors/converters/__init__.py +31 -0
  14. awesome_errors-0.3.0/src/awesome_errors/converters/generic.py +23 -0
  15. awesome_errors-0.3.0/src/awesome_errors/converters/pydantic_converter.py +75 -0
  16. awesome_errors-0.3.0/src/awesome_errors/converters/python_converter.py +80 -0
  17. awesome_errors-0.3.0/src/awesome_errors/converters/sql_converter.py +258 -0
  18. awesome_errors-0.3.0/src/awesome_errors/converters/universal_converter.py +123 -0
  19. awesome_errors-0.3.0/src/awesome_errors/core/__init__.py +0 -0
  20. awesome_errors-0.3.0/src/awesome_errors/core/error_codes.py +104 -0
  21. awesome_errors-0.3.0/src/awesome_errors/core/error_response.py +61 -0
  22. awesome_errors-0.3.0/src/awesome_errors/core/exceptions.py +613 -0
  23. awesome_errors-0.3.0/src/awesome_errors/core/renderers.py +115 -0
  24. awesome_errors-0.3.0/src/awesome_errors/i18n/__init__.py +0 -0
  25. awesome_errors-0.3.0/src/awesome_errors/i18n/locales/en/errors.json +32 -0
  26. awesome_errors-0.3.0/src/awesome_errors/i18n/locales/test/errors.json +4 -0
  27. awesome_errors-0.3.0/src/awesome_errors/i18n/locales/uk/errors.json +26 -0
  28. awesome_errors-0.3.0/src/awesome_errors/i18n/translator.py +150 -0
  29. awesome_errors-0.3.0/src/awesome_errors/integrations/__init__.py +11 -0
  30. awesome_errors-0.3.0/src/awesome_errors/integrations/fastapi_auto_docs.py +220 -0
  31. awesome_errors-0.3.0/src/awesome_errors/litestar_utils.py +55 -0
  32. awesome_errors-0.3.0/src/awesome_errors/middleware/__init__.py +0 -0
  33. awesome_errors-0.3.0/src/awesome_errors/middleware/fastapi.py +247 -0
  34. awesome_errors-0.3.0/src/awesome_errors/middleware/litestar.py +333 -0
  35. awesome_errors-0.3.0/src/awesome_errors/py.typed +1 -0
  36. awesome_errors-0.3.0/src/awesome_errors/websocket/__init__.py +35 -0
  37. awesome_errors-0.3.0/src/awesome_errors/websocket/error_handler.py +231 -0
  38. awesome_errors-0.3.0/src/awesome_errors/websocket/exceptions.py +286 -0
@@ -0,0 +1,118 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ env/
12
+ build/
13
+ develop-eggs/
14
+ dist/
15
+ downloads/
16
+ eggs/
17
+ .eggs/
18
+ lib/
19
+ lib64/
20
+ parts/
21
+ sdist/
22
+ var/
23
+ *.egg-info/
24
+ .installed.cfg
25
+ *.egg
26
+ .venv/
27
+
28
+ # PyInstaller
29
+ # Usually these files are written by a python script from a template
30
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
31
+ *.manifest
32
+ *.spec
33
+
34
+ # Installer logs
35
+ debug.log
36
+ pip-log.txt
37
+ pip-delete-this-directory.txt
38
+
39
+ # Unit test / coverage reports
40
+ htmlcov/
41
+ .tox/
42
+ .nox/
43
+ .coverage
44
+ .coverage.*
45
+ .cache
46
+ nosetests.xml
47
+ coverage.xml
48
+ *.cover
49
+ .hypothesis/
50
+ .pytest_cache/
51
+
52
+ # Translations
53
+ *.mo
54
+ *.pot
55
+
56
+ # Django stuff:
57
+ *.log
58
+ local_settings.py
59
+ *.local.*
60
+
61
+ # Flask stuff:
62
+ instance/
63
+ .webassets-cache
64
+
65
+ # Scrapy stuff:
66
+ .scrapy
67
+
68
+ # Sphinx documentation
69
+ docs/_build/
70
+
71
+ # PyBuilder
72
+ .target/
73
+
74
+ # Jupyter Notebook
75
+ .ipynb_checkpoints
76
+
77
+ # IPython
78
+ profile_default/
79
+ ipython_config.py
80
+
81
+ # pyenv
82
+ .python-version
83
+
84
+ # pipenv
85
+ Pipfile.lock
86
+
87
+ # poetry
88
+ poetry.lock
89
+
90
+ # mypy
91
+ .mypy_cache/
92
+ .dmypy.json
93
+
94
+ # Pyre type checker
95
+ .pyre/
96
+
97
+ # pyright
98
+ pyrightconfig.json
99
+
100
+ # VS Code
101
+ .vscode/
102
+
103
+ # Ruff
104
+ .ruff_cache/
105
+
106
+ # System files
107
+ .DS_Store
108
+ Thumbs.db
109
+
110
+ # Test artifacts
111
+ test-results/
112
+
113
+ # Locales cache
114
+ src/awesome_errors/i18n/locales/empty/
115
+
116
+ # Examples cache
117
+ examples/locales/en/empty/
118
+ examples/locales/uk/empty/
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 THEROER
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,239 @@
1
+ Metadata-Version: 2.4
2
+ Name: awesome-errors
3
+ Version: 0.3.0
4
+ Summary: A comprehensive error handling library for Python applications with i18n support
5
+ Project-URL: Homepage, https://github.com/THEROER/awesome-errors
6
+ Project-URL: Repository, https://github.com/THEROER/awesome-errors
7
+ Project-URL: Issues, https://github.com/THEROER/awesome-errors/issues
8
+ Author-email: THEROER <theroer09@gmail.com>
9
+ License-Expression: MIT
10
+ License-File: LICENSE
11
+ Keywords: error-handling,exceptions,fastapi,i18n,litestar
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
16
+ Classifier: Typing :: Typed
17
+ Requires-Python: <4,>=3.10
18
+ Requires-Dist: msgspec<0.22,>=0.21.0
19
+ Provides-Extra: all
20
+ Requires-Dist: fastapi<0.116,>=0.115.14; extra == 'all'
21
+ Requires-Dist: litestar<3,>=2.21.1; extra == 'all'
22
+ Requires-Dist: pydantic[email]<3,>=2.0; extra == 'all'
23
+ Requires-Dist: sqlalchemy<3,>=2.0; extra == 'all'
24
+ Provides-Extra: fastapi
25
+ Requires-Dist: fastapi<0.116,>=0.115.14; extra == 'fastapi'
26
+ Requires-Dist: pydantic[email]<3,>=2.0; extra == 'fastapi'
27
+ Provides-Extra: litestar
28
+ Requires-Dist: litestar<3,>=2.21.1; extra == 'litestar'
29
+ Provides-Extra: pydantic
30
+ Requires-Dist: pydantic[email]<3,>=2.0; extra == 'pydantic'
31
+ Provides-Extra: sqlalchemy
32
+ Requires-Dist: sqlalchemy<3,>=2.0; extra == 'sqlalchemy'
33
+ Description-Content-Type: text/markdown
34
+
35
+ # Awesome Errors
36
+
37
+ A comprehensive Python library for standardized error handling, analysis, and documentation.
38
+
39
+ ## Architecture Overview
40
+
41
+ ### Core Components
42
+
43
+ #### 1. **Core Exceptions** (`src/awesome_errors/core/`)
44
+
45
+ - **AppError**: Base exception class for server-side error handling
46
+ - **ValidationError**: HTTP 400 errors for input validation failures
47
+ - **AuthError**: HTTP 401/403 errors for authentication/authorization
48
+ - **NotFoundError**: HTTP 404 errors for missing resources
49
+ - **DatabaseError**: HTTP 500/409/422 errors for database issues
50
+ - **BusinessLogicError**: HTTP 422 errors for business rule violations
51
+
52
+ #### 2. **Client Exceptions** (`src/awesome_errors/client/`)
53
+
54
+ - **BackendError**: Client-side exception for handling server responses
55
+ - **ErrorResponseParser**: Parser for backend error responses
56
+
57
+ **Key Difference**: Core exceptions are raised on the server, while client exceptions handle errors received from the server.
58
+
59
+ #### 3. **Error Converters** (`src/awesome_errors/converters/`)
60
+
61
+ - **UniversalErrorConverter**: Handles any type of exception
62
+ - **SQLErrorConverter**: Converts SQLAlchemy errors
63
+ - **PythonErrorConverter**: Converts standard Python exceptions
64
+ - **PydanticErrorConverter**: Converts Pydantic validation errors
65
+ - **generic_error_handler**: Shared logic for unknown errors
66
+
67
+ #### 4. **Analysis Tools** (`src/awesome_errors/analysis/`)
68
+
69
+ - **ErrorAnalyzer**: AST-based error analysis
70
+ - **analyze_errors**: Decorator for automatic error analysis
71
+ - **openapi_errors**: Decorator for OpenAPI documentation
72
+
73
+ #### 5. **HTTP Response Renderers** (`src/awesome_errors/core/renderers.py`)
74
+
75
+ - **ErrorResponseRenderer**: Produces either legacy envelopes or RFC 7807 documents
76
+ - **ErrorResponseFormat**: Toggle between response formats per application
77
+
78
+ #### 6. **Framework Integrations** (`src/awesome_errors/middleware/`)
79
+
80
+ - **FastAPI middleware**: `setup_error_handling`
81
+ - **Litestar handlers**: `create_litestar_exception_handlers`
82
+
83
+ #### 6. **Internationalization** (`src/awesome_errors/i18n/`)
84
+
85
+ - **ErrorTranslator**: Multi-language error message support
86
+ - Locale files in `src/awesome_errors/i18n/locales/`
87
+
88
+ #### 7. **Middleware** (`src/awesome_errors/middleware/`)
89
+
90
+ - **setup_error_handling**: FastAPI error handling middleware
91
+
92
+ ## Usage Examples
93
+
94
+ ### Server-Side Error Handling
95
+
96
+ ```python
97
+ from awesome_errors import ValidationError, NotFoundError, ErrorCode
98
+
99
+ # Validation error
100
+ raise ValidationError("Email is required", field="email")
101
+
102
+ # Not found error
103
+ raise NotFoundError("user", user_id=123)
104
+
105
+ # Custom error code
106
+ raise ValidationError("Invalid format", code=ErrorCode("CUSTOM_ERROR"))
107
+ ```
108
+
109
+ ### Client-Side Error Handling
110
+
111
+ ```python
112
+ from awesome_errors import BackendError
113
+
114
+ try:
115
+ response = api_client.get_user(123)
116
+ except BackendError as e:
117
+ if e.is_not_found_error():
118
+ print("User not found")
119
+ elif e.is_validation_error():
120
+ print("Invalid input")
121
+ ```
122
+
123
+ ### FastAPI Integration
124
+
125
+ ```python
126
+ from fastapi import FastAPI
127
+ from awesome_errors import setup_error_handling, auto_analyze_errors
128
+
129
+ app = FastAPI()
130
+ setup_error_handling(app)
131
+
132
+ @auto_analyze_errors
133
+ @app.get("/users/{user_id}")
134
+ def get_user(user_id: int):
135
+ if user_id == 404:
136
+ raise NotFoundError("user", user_id)
137
+ return {"id": user_id}
138
+ ```
139
+
140
+ ### Litestar Integration
141
+
142
+ ```python
143
+ from litestar import Litestar
144
+ from awesome_errors import (
145
+ ErrorResponseFormat,
146
+ ErrorTranslator,
147
+ create_litestar_exception_handlers,
148
+ )
149
+
150
+ translator = ErrorTranslator(default_locale="en")
151
+ translator.add_translations("en", {"CUSTOM": "Custom error"}, persist=False)
152
+
153
+ exception_handlers = create_litestar_exception_handlers(
154
+ translator=translator,
155
+ response_format=ErrorResponseFormat.RFC7807,
156
+ problem_type_resolver=lambda err: f"urn:demo:error:{err.code.value.lower()}",
157
+ )
158
+
159
+ app = Litestar(route_handlers=[...], exception_handlers=exception_handlers)
160
+ ```
161
+
162
+ ### Error Analysis
163
+
164
+ ```python
165
+ from awesome_errors import analyze_errors, openapi_errors
166
+
167
+ @analyze_errors()
168
+ def my_function():
169
+ raise ValidationError("Test error")
170
+
171
+ @openapi_errors(additional_errors=["CUSTOM_ERROR"])
172
+ def my_api_endpoint():
173
+ # Automatically documented in OpenAPI
174
+ pass
175
+ ```
176
+
177
+ ## Key Features
178
+
179
+ ### ✅ **Unified Error Models**
180
+
181
+ - Lightweight msgspec structs used across server & client sides
182
+ - Single serialization layer for legacy and RFC 7807 formats
183
+ - Consistent error structure
184
+
185
+ ### ✅ **Shared Generic Error Handling**
186
+
187
+ - Common `generic_error_handler` for unknown errors
188
+ - Used by all converters to avoid code duplication
189
+ - Debug mode support for detailed error information
190
+
191
+ ### ✅ **Consolidated FastAPI Integration**
192
+
193
+ - Single entry point for all FastAPI integrations
194
+ - Automatic OpenAPI documentation generation
195
+ - Combined analysis and documentation decorators
196
+
197
+ ### ✅ **Clean Architecture**
198
+
199
+ - Clear separation between server and client error handling
200
+ - Modular converter system
201
+ - Pluggable renderers for multiple frameworks
202
+
203
+ ### ✅ **Internationalization Support**
204
+
205
+ - Multi-language error messages
206
+ - Locale-based translation
207
+ - Template parameter support
208
+ - Optional persistence when extending translations at runtime
209
+
210
+ ## Installation
211
+
212
+ ```bash
213
+ pip install awesome-errors
214
+ ```
215
+
216
+ ## Development
217
+
218
+ ```bash
219
+ # Install dependencies
220
+ uv sync --dev
221
+
222
+ # Run tests
223
+ uv run pytest
224
+
225
+ # Run linting
226
+ uv run ruff check src/
227
+ ```
228
+
229
+ ## Contributing
230
+
231
+ 1. Fork the repository
232
+ 2. Create a feature branch
233
+ 3. Make your changes
234
+ 4. Add tests
235
+ 5. Submit a pull request
236
+
237
+ ## License
238
+
239
+ MIT License - see LICENSE file for details.
@@ -0,0 +1,205 @@
1
+ # Awesome Errors
2
+
3
+ A comprehensive Python library for standardized error handling, analysis, and documentation.
4
+
5
+ ## Architecture Overview
6
+
7
+ ### Core Components
8
+
9
+ #### 1. **Core Exceptions** (`src/awesome_errors/core/`)
10
+
11
+ - **AppError**: Base exception class for server-side error handling
12
+ - **ValidationError**: HTTP 400 errors for input validation failures
13
+ - **AuthError**: HTTP 401/403 errors for authentication/authorization
14
+ - **NotFoundError**: HTTP 404 errors for missing resources
15
+ - **DatabaseError**: HTTP 500/409/422 errors for database issues
16
+ - **BusinessLogicError**: HTTP 422 errors for business rule violations
17
+
18
+ #### 2. **Client Exceptions** (`src/awesome_errors/client/`)
19
+
20
+ - **BackendError**: Client-side exception for handling server responses
21
+ - **ErrorResponseParser**: Parser for backend error responses
22
+
23
+ **Key Difference**: Core exceptions are raised on the server, while client exceptions handle errors received from the server.
24
+
25
+ #### 3. **Error Converters** (`src/awesome_errors/converters/`)
26
+
27
+ - **UniversalErrorConverter**: Handles any type of exception
28
+ - **SQLErrorConverter**: Converts SQLAlchemy errors
29
+ - **PythonErrorConverter**: Converts standard Python exceptions
30
+ - **PydanticErrorConverter**: Converts Pydantic validation errors
31
+ - **generic_error_handler**: Shared logic for unknown errors
32
+
33
+ #### 4. **Analysis Tools** (`src/awesome_errors/analysis/`)
34
+
35
+ - **ErrorAnalyzer**: AST-based error analysis
36
+ - **analyze_errors**: Decorator for automatic error analysis
37
+ - **openapi_errors**: Decorator for OpenAPI documentation
38
+
39
+ #### 5. **HTTP Response Renderers** (`src/awesome_errors/core/renderers.py`)
40
+
41
+ - **ErrorResponseRenderer**: Produces either legacy envelopes or RFC 7807 documents
42
+ - **ErrorResponseFormat**: Toggle between response formats per application
43
+
44
+ #### 6. **Framework Integrations** (`src/awesome_errors/middleware/`)
45
+
46
+ - **FastAPI middleware**: `setup_error_handling`
47
+ - **Litestar handlers**: `create_litestar_exception_handlers`
48
+
49
+ #### 6. **Internationalization** (`src/awesome_errors/i18n/`)
50
+
51
+ - **ErrorTranslator**: Multi-language error message support
52
+ - Locale files in `src/awesome_errors/i18n/locales/`
53
+
54
+ #### 7. **Middleware** (`src/awesome_errors/middleware/`)
55
+
56
+ - **setup_error_handling**: FastAPI error handling middleware
57
+
58
+ ## Usage Examples
59
+
60
+ ### Server-Side Error Handling
61
+
62
+ ```python
63
+ from awesome_errors import ValidationError, NotFoundError, ErrorCode
64
+
65
+ # Validation error
66
+ raise ValidationError("Email is required", field="email")
67
+
68
+ # Not found error
69
+ raise NotFoundError("user", user_id=123)
70
+
71
+ # Custom error code
72
+ raise ValidationError("Invalid format", code=ErrorCode("CUSTOM_ERROR"))
73
+ ```
74
+
75
+ ### Client-Side Error Handling
76
+
77
+ ```python
78
+ from awesome_errors import BackendError
79
+
80
+ try:
81
+ response = api_client.get_user(123)
82
+ except BackendError as e:
83
+ if e.is_not_found_error():
84
+ print("User not found")
85
+ elif e.is_validation_error():
86
+ print("Invalid input")
87
+ ```
88
+
89
+ ### FastAPI Integration
90
+
91
+ ```python
92
+ from fastapi import FastAPI
93
+ from awesome_errors import setup_error_handling, auto_analyze_errors
94
+
95
+ app = FastAPI()
96
+ setup_error_handling(app)
97
+
98
+ @auto_analyze_errors
99
+ @app.get("/users/{user_id}")
100
+ def get_user(user_id: int):
101
+ if user_id == 404:
102
+ raise NotFoundError("user", user_id)
103
+ return {"id": user_id}
104
+ ```
105
+
106
+ ### Litestar Integration
107
+
108
+ ```python
109
+ from litestar import Litestar
110
+ from awesome_errors import (
111
+ ErrorResponseFormat,
112
+ ErrorTranslator,
113
+ create_litestar_exception_handlers,
114
+ )
115
+
116
+ translator = ErrorTranslator(default_locale="en")
117
+ translator.add_translations("en", {"CUSTOM": "Custom error"}, persist=False)
118
+
119
+ exception_handlers = create_litestar_exception_handlers(
120
+ translator=translator,
121
+ response_format=ErrorResponseFormat.RFC7807,
122
+ problem_type_resolver=lambda err: f"urn:demo:error:{err.code.value.lower()}",
123
+ )
124
+
125
+ app = Litestar(route_handlers=[...], exception_handlers=exception_handlers)
126
+ ```
127
+
128
+ ### Error Analysis
129
+
130
+ ```python
131
+ from awesome_errors import analyze_errors, openapi_errors
132
+
133
+ @analyze_errors()
134
+ def my_function():
135
+ raise ValidationError("Test error")
136
+
137
+ @openapi_errors(additional_errors=["CUSTOM_ERROR"])
138
+ def my_api_endpoint():
139
+ # Automatically documented in OpenAPI
140
+ pass
141
+ ```
142
+
143
+ ## Key Features
144
+
145
+ ### ✅ **Unified Error Models**
146
+
147
+ - Lightweight msgspec structs used across server & client sides
148
+ - Single serialization layer for legacy and RFC 7807 formats
149
+ - Consistent error structure
150
+
151
+ ### ✅ **Shared Generic Error Handling**
152
+
153
+ - Common `generic_error_handler` for unknown errors
154
+ - Used by all converters to avoid code duplication
155
+ - Debug mode support for detailed error information
156
+
157
+ ### ✅ **Consolidated FastAPI Integration**
158
+
159
+ - Single entry point for all FastAPI integrations
160
+ - Automatic OpenAPI documentation generation
161
+ - Combined analysis and documentation decorators
162
+
163
+ ### ✅ **Clean Architecture**
164
+
165
+ - Clear separation between server and client error handling
166
+ - Modular converter system
167
+ - Pluggable renderers for multiple frameworks
168
+
169
+ ### ✅ **Internationalization Support**
170
+
171
+ - Multi-language error messages
172
+ - Locale-based translation
173
+ - Template parameter support
174
+ - Optional persistence when extending translations at runtime
175
+
176
+ ## Installation
177
+
178
+ ```bash
179
+ pip install awesome-errors
180
+ ```
181
+
182
+ ## Development
183
+
184
+ ```bash
185
+ # Install dependencies
186
+ uv sync --dev
187
+
188
+ # Run tests
189
+ uv run pytest
190
+
191
+ # Run linting
192
+ uv run ruff check src/
193
+ ```
194
+
195
+ ## Contributing
196
+
197
+ 1. Fork the repository
198
+ 2. Create a feature branch
199
+ 3. Make your changes
200
+ 4. Add tests
201
+ 5. Submit a pull request
202
+
203
+ ## License
204
+
205
+ MIT License - see LICENSE file for details.
@@ -0,0 +1,74 @@
1
+ [project]
2
+ name = "awesome-errors"
3
+ version = "0.3.0"
4
+ description = "A comprehensive error handling library for Python applications with i18n support"
5
+ authors = [{ name = "THEROER", email = "theroer09@gmail.com" }]
6
+ readme = "README.md"
7
+ license = "MIT"
8
+ requires-python = ">=3.10,<4"
9
+ keywords = ["error-handling", "exceptions", "i18n", "fastapi", "litestar"]
10
+ classifiers = [
11
+ "Development Status :: 4 - Beta",
12
+ "Intended Audience :: Developers",
13
+ "Programming Language :: Python :: 3",
14
+ "Topic :: Software Development :: Libraries :: Python Modules",
15
+ "Typing :: Typed",
16
+ ]
17
+ dependencies = [
18
+ "msgspec>=0.21.0,<0.22",
19
+ ]
20
+
21
+ [project.optional-dependencies]
22
+ sqlalchemy = [
23
+ "sqlalchemy>=2.0,<3",
24
+ ]
25
+ litestar = [
26
+ "litestar>=2.21.1,<3",
27
+ ]
28
+ fastapi = [
29
+ "fastapi>=0.115.14,<0.116",
30
+ "pydantic[email]>=2.0,<3",
31
+ ]
32
+ pydantic = [
33
+ "pydantic[email]>=2.0,<3",
34
+ ]
35
+ all = [
36
+ "sqlalchemy>=2.0,<3",
37
+ "litestar>=2.21.1,<3",
38
+ "fastapi>=0.115.14,<0.116",
39
+ "pydantic[email]>=2.0,<3",
40
+ ]
41
+
42
+ [project.urls]
43
+ Homepage = "https://github.com/THEROER/awesome-errors"
44
+ Repository = "https://github.com/THEROER/awesome-errors"
45
+ Issues = "https://github.com/THEROER/awesome-errors/issues"
46
+
47
+ [dependency-groups]
48
+ dev = [
49
+ "pre-commit>=4.6.0",
50
+ "pytest>=9.0.2,<10",
51
+ "pytest-cov>=4.0,<5",
52
+ "pytest-asyncio>=1.3.0,<2",
53
+ "black>=23.0,<24",
54
+ "mypy>=1.0,<2",
55
+ "httpx>=0.28.1,<1",
56
+ "ruff>=0.15.5,<0.16",
57
+ "fastapi>=0.115.14,<0.116",
58
+ "pydantic[email]>=2.0,<3",
59
+ "sqlalchemy>=2.0,<3",
60
+ "litestar>=2.21.1,<3",
61
+ ]
62
+
63
+ [tool.hatch.build.targets.sdist]
64
+ include = ["src/awesome_errors"]
65
+
66
+ [tool.hatch.build.targets.wheel]
67
+ include = ["src/awesome_errors"]
68
+
69
+ [tool.hatch.build.targets.wheel.sources]
70
+ "src/awesome_errors" = "awesome_errors"
71
+
72
+ [build-system]
73
+ requires = ["hatchling"]
74
+ build-backend = "hatchling.build"