fastsqs 0.1.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.
fastsqs-0.1.0/LICENSE ADDED
@@ -0,0 +1,5 @@
1
+ # queue
2
+
3
+ Async SQS routing and middleware library.
4
+
5
+ See README.md for usage and details.
@@ -0,0 +1,3 @@
1
+ include README.md
2
+ include setup.py
3
+ recursive-include queue *.py
fastsqs-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,132 @@
1
+ Metadata-Version: 2.4
2
+ Name: fastsqs
3
+ Version: 0.1.0
4
+ Summary: Async SQS routing and middleware library
5
+ Home-page: https://github.com/yourusername/fastsqs
6
+ Author: Your Name
7
+ Author-email: your.email@example.com
8
+ License: MIT
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: License :: OSI Approved :: MIT License
11
+ Classifier: Operating System :: OS Independent
12
+ Requires-Python: >=3.8
13
+ Description-Content-Type: text/markdown
14
+ License-File: LICENSE
15
+ Requires-Dist: pydantic>=2.0.0
16
+ Dynamic: author
17
+ Dynamic: author-email
18
+ Dynamic: classifier
19
+ Dynamic: description
20
+ Dynamic: description-content-type
21
+ Dynamic: home-page
22
+ Dynamic: license
23
+ Dynamic: license-file
24
+ Dynamic: requires-dist
25
+ Dynamic: requires-python
26
+ Dynamic: summary
27
+
28
+ # fastsqs
29
+
30
+ **Fast, modern, async SQS routing and middleware for Python.**
31
+
32
+ [![PyPI version](https://img.shields.io/pypi/v/fastsqs.svg)](https://pypi.org/project/fastsqs/)
33
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
34
+
35
+ ---
36
+
37
+ ## Key Features
38
+
39
+ - 🚀 **High Performance:** Async message routing for AWS SQS, designed for speed and scalability.
40
+ - 🧩 **Declarative Routing:** Organize your SQS message handling with nested routers and decorators.
41
+ - 🔒 **Validation:** Per-route payload validation using Pydantic models.
42
+ - 🛠️ **Middleware:** Add before/after hooks for logging, timing, masking, and more.
43
+ - 🦾 **Partial Batch Failure:** Native support for AWS Lambda batch failure responses.
44
+ - 🐍 **Pythonic & Intuitive:** Type hints, editor support, and a familiar API for Python developers.
45
+
46
+ ---
47
+
48
+ ## Requirements
49
+
50
+ - Python 3.8+
51
+ - [Pydantic](https://docs.pydantic.dev/) (installed automatically)
52
+
53
+ ---
54
+
55
+ ## Installation
56
+
57
+ ```bash
58
+ pip install fastsqs
59
+ ```
60
+
61
+ ---
62
+
63
+ ## Example
64
+
65
+ ### Create your app
66
+
67
+ ```python
68
+ from fastsqs import QueueApp, QueueRouter, Middleware
69
+ from pydantic import BaseModel
70
+
71
+ class GreetingPayload(BaseModel):
72
+ type: str
73
+ message: str
74
+
75
+ router = QueueRouter("type")
76
+
77
+ @router.route("greeting", model=GreetingPayload)
78
+ async def handle_greeting(payload, record, context, ctx, data):
79
+ print(f"Greeting: {data.message}")
80
+
81
+ app = QueueApp(title="Greeting SQS App", debug=True)
82
+ app.include_router(router)
83
+
84
+ def lambda_handler(event, context):
85
+ return app.handler(event, context)
86
+ ```
87
+
88
+ ### Add Middleware
89
+
90
+ ```python
91
+ class PrintMiddleware(Middleware):
92
+ async def before(self, payload, record, context, ctx):
93
+ print("Before:", payload)
94
+ async def after(self, payload, record, context, ctx, error):
95
+ print("After:", payload, "Error:", error)
96
+
97
+ app.add_middleware(PrintMiddleware())
98
+ ```
99
+
100
+ ---
101
+
102
+ ## How it Works
103
+
104
+ - **Routing:** Use `QueueRouter` to route messages by payload fields. Decorators make it easy to register handlers.
105
+ - **Validation:** Attach Pydantic models to routes for automatic payload validation.
106
+ - **Middleware:** Add global or per-route middleware for logging, timing, masking, etc.
107
+ - **Batch Failure:** Handles partial failures for SQS-triggered Lambda functions, so only failed messages are retried.
108
+
109
+ ---
110
+
111
+ ## Documentation
112
+
113
+ - [API Reference](#) (coming soon)
114
+ - [Tutorials](#) (coming soon)
115
+ - [Examples](#) (see `examples/`)
116
+
117
+ ---
118
+
119
+ ## Contributing
120
+
121
+ Contributions, issues, and feature requests are welcome!
122
+ Please open an issue or submit a pull request.
123
+
124
+ ---
125
+
126
+ ## License
127
+
128
+ This project is licensed under the terms of the MIT license.
129
+
130
+ ---
131
+
132
+ **Ready to build async, robust SQS message processors? Try fastsqs today!**
@@ -0,0 +1,105 @@
1
+ # fastsqs
2
+
3
+ **Fast, modern, async SQS routing and middleware for Python.**
4
+
5
+ [![PyPI version](https://img.shields.io/pypi/v/fastsqs.svg)](https://pypi.org/project/fastsqs/)
6
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
7
+
8
+ ---
9
+
10
+ ## Key Features
11
+
12
+ - 🚀 **High Performance:** Async message routing for AWS SQS, designed for speed and scalability.
13
+ - 🧩 **Declarative Routing:** Organize your SQS message handling with nested routers and decorators.
14
+ - 🔒 **Validation:** Per-route payload validation using Pydantic models.
15
+ - 🛠️ **Middleware:** Add before/after hooks for logging, timing, masking, and more.
16
+ - 🦾 **Partial Batch Failure:** Native support for AWS Lambda batch failure responses.
17
+ - 🐍 **Pythonic & Intuitive:** Type hints, editor support, and a familiar API for Python developers.
18
+
19
+ ---
20
+
21
+ ## Requirements
22
+
23
+ - Python 3.8+
24
+ - [Pydantic](https://docs.pydantic.dev/) (installed automatically)
25
+
26
+ ---
27
+
28
+ ## Installation
29
+
30
+ ```bash
31
+ pip install fastsqs
32
+ ```
33
+
34
+ ---
35
+
36
+ ## Example
37
+
38
+ ### Create your app
39
+
40
+ ```python
41
+ from fastsqs import QueueApp, QueueRouter, Middleware
42
+ from pydantic import BaseModel
43
+
44
+ class GreetingPayload(BaseModel):
45
+ type: str
46
+ message: str
47
+
48
+ router = QueueRouter("type")
49
+
50
+ @router.route("greeting", model=GreetingPayload)
51
+ async def handle_greeting(payload, record, context, ctx, data):
52
+ print(f"Greeting: {data.message}")
53
+
54
+ app = QueueApp(title="Greeting SQS App", debug=True)
55
+ app.include_router(router)
56
+
57
+ def lambda_handler(event, context):
58
+ return app.handler(event, context)
59
+ ```
60
+
61
+ ### Add Middleware
62
+
63
+ ```python
64
+ class PrintMiddleware(Middleware):
65
+ async def before(self, payload, record, context, ctx):
66
+ print("Before:", payload)
67
+ async def after(self, payload, record, context, ctx, error):
68
+ print("After:", payload, "Error:", error)
69
+
70
+ app.add_middleware(PrintMiddleware())
71
+ ```
72
+
73
+ ---
74
+
75
+ ## How it Works
76
+
77
+ - **Routing:** Use `QueueRouter` to route messages by payload fields. Decorators make it easy to register handlers.
78
+ - **Validation:** Attach Pydantic models to routes for automatic payload validation.
79
+ - **Middleware:** Add global or per-route middleware for logging, timing, masking, etc.
80
+ - **Batch Failure:** Handles partial failures for SQS-triggered Lambda functions, so only failed messages are retried.
81
+
82
+ ---
83
+
84
+ ## Documentation
85
+
86
+ - [API Reference](#) (coming soon)
87
+ - [Tutorials](#) (coming soon)
88
+ - [Examples](#) (see `examples/`)
89
+
90
+ ---
91
+
92
+ ## Contributing
93
+
94
+ Contributions, issues, and feature requests are welcome!
95
+ Please open an issue or submit a pull request.
96
+
97
+ ---
98
+
99
+ ## License
100
+
101
+ This project is licensed under the terms of the MIT license.
102
+
103
+ ---
104
+
105
+ **Ready to build async, robust SQS message processors? Try fastsqs today!**
@@ -0,0 +1,132 @@
1
+ Metadata-Version: 2.4
2
+ Name: fastsqs
3
+ Version: 0.1.0
4
+ Summary: Async SQS routing and middleware library
5
+ Home-page: https://github.com/yourusername/fastsqs
6
+ Author: Your Name
7
+ Author-email: your.email@example.com
8
+ License: MIT
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: License :: OSI Approved :: MIT License
11
+ Classifier: Operating System :: OS Independent
12
+ Requires-Python: >=3.8
13
+ Description-Content-Type: text/markdown
14
+ License-File: LICENSE
15
+ Requires-Dist: pydantic>=2.0.0
16
+ Dynamic: author
17
+ Dynamic: author-email
18
+ Dynamic: classifier
19
+ Dynamic: description
20
+ Dynamic: description-content-type
21
+ Dynamic: home-page
22
+ Dynamic: license
23
+ Dynamic: license-file
24
+ Dynamic: requires-dist
25
+ Dynamic: requires-python
26
+ Dynamic: summary
27
+
28
+ # fastsqs
29
+
30
+ **Fast, modern, async SQS routing and middleware for Python.**
31
+
32
+ [![PyPI version](https://img.shields.io/pypi/v/fastsqs.svg)](https://pypi.org/project/fastsqs/)
33
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
34
+
35
+ ---
36
+
37
+ ## Key Features
38
+
39
+ - 🚀 **High Performance:** Async message routing for AWS SQS, designed for speed and scalability.
40
+ - 🧩 **Declarative Routing:** Organize your SQS message handling with nested routers and decorators.
41
+ - 🔒 **Validation:** Per-route payload validation using Pydantic models.
42
+ - 🛠️ **Middleware:** Add before/after hooks for logging, timing, masking, and more.
43
+ - 🦾 **Partial Batch Failure:** Native support for AWS Lambda batch failure responses.
44
+ - 🐍 **Pythonic & Intuitive:** Type hints, editor support, and a familiar API for Python developers.
45
+
46
+ ---
47
+
48
+ ## Requirements
49
+
50
+ - Python 3.8+
51
+ - [Pydantic](https://docs.pydantic.dev/) (installed automatically)
52
+
53
+ ---
54
+
55
+ ## Installation
56
+
57
+ ```bash
58
+ pip install fastsqs
59
+ ```
60
+
61
+ ---
62
+
63
+ ## Example
64
+
65
+ ### Create your app
66
+
67
+ ```python
68
+ from fastsqs import QueueApp, QueueRouter, Middleware
69
+ from pydantic import BaseModel
70
+
71
+ class GreetingPayload(BaseModel):
72
+ type: str
73
+ message: str
74
+
75
+ router = QueueRouter("type")
76
+
77
+ @router.route("greeting", model=GreetingPayload)
78
+ async def handle_greeting(payload, record, context, ctx, data):
79
+ print(f"Greeting: {data.message}")
80
+
81
+ app = QueueApp(title="Greeting SQS App", debug=True)
82
+ app.include_router(router)
83
+
84
+ def lambda_handler(event, context):
85
+ return app.handler(event, context)
86
+ ```
87
+
88
+ ### Add Middleware
89
+
90
+ ```python
91
+ class PrintMiddleware(Middleware):
92
+ async def before(self, payload, record, context, ctx):
93
+ print("Before:", payload)
94
+ async def after(self, payload, record, context, ctx, error):
95
+ print("After:", payload, "Error:", error)
96
+
97
+ app.add_middleware(PrintMiddleware())
98
+ ```
99
+
100
+ ---
101
+
102
+ ## How it Works
103
+
104
+ - **Routing:** Use `QueueRouter` to route messages by payload fields. Decorators make it easy to register handlers.
105
+ - **Validation:** Attach Pydantic models to routes for automatic payload validation.
106
+ - **Middleware:** Add global or per-route middleware for logging, timing, masking, etc.
107
+ - **Batch Failure:** Handles partial failures for SQS-triggered Lambda functions, so only failed messages are retried.
108
+
109
+ ---
110
+
111
+ ## Documentation
112
+
113
+ - [API Reference](#) (coming soon)
114
+ - [Tutorials](#) (coming soon)
115
+ - [Examples](#) (see `examples/`)
116
+
117
+ ---
118
+
119
+ ## Contributing
120
+
121
+ Contributions, issues, and feature requests are welcome!
122
+ Please open an issue or submit a pull request.
123
+
124
+ ---
125
+
126
+ ## License
127
+
128
+ This project is licensed under the terms of the MIT license.
129
+
130
+ ---
131
+
132
+ **Ready to build async, robust SQS message processors? Try fastsqs today!**
@@ -0,0 +1,10 @@
1
+ LICENSE
2
+ MANIFEST.in
3
+ README.md
4
+ pyproject.toml
5
+ setup.py
6
+ fastsqs.egg-info/PKG-INFO
7
+ fastsqs.egg-info/SOURCES.txt
8
+ fastsqs.egg-info/dependency_links.txt
9
+ fastsqs.egg-info/requires.txt
10
+ fastsqs.egg-info/top_level.txt
@@ -0,0 +1 @@
1
+ pydantic>=2.0.0
@@ -0,0 +1,4 @@
1
+
2
+ [build-system]
3
+ requires = ["setuptools>=42", "wheel", "pydantic>=2.0.0"]
4
+ build-backend = "setuptools.build_meta"
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
fastsqs-0.1.0/setup.py ADDED
@@ -0,0 +1,24 @@
1
+ from setuptools import setup, find_packages
2
+
3
+ setup(
4
+ name="fastsqs",
5
+ version="0.1.0",
6
+ description="Async SQS routing and middleware library",
7
+ long_description=open("README.md").read(),
8
+ long_description_content_type="text/markdown",
9
+ author="Your Name",
10
+ author_email="your.email@example.com",
11
+ url="https://github.com/yourusername/fastsqs",
12
+ packages=find_packages(),
13
+ install_requires=[
14
+ "pydantic>=2.0.0"
15
+ ],
16
+ python_requires=">=3.8",
17
+ license="MIT",
18
+ classifiers=[
19
+ "Programming Language :: Python :: 3",
20
+ "License :: OSI Approved :: MIT License",
21
+ "Operating System :: OS Independent",
22
+ ],
23
+ include_package_data=True,
24
+ )