Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add picobox.ext.asgiscopes extension #80

Closed
ikalnytskyi opened this issue Nov 29, 2023 · 0 comments · Fixed by #85
Closed

Add picobox.ext.asgiscopes extension #80

ikalnytskyi opened this issue Nov 29, 2023 · 0 comments · Fixed by #85
Milestone

Comments

@ikalnytskyi
Copy link
Owner

ikalnytskyi commented Nov 29, 2023

Ever since I started working on scopes for Starlette web framework (see #77), I realized that there's no Starlette specific facilities (like Flask provides) to access application or request states from any point of execution.

Thus, I'll need to go through a special ASGI middleware to define those scopes, and this approach will work for any ASGI framework.

At this point I'm thinking about three types of scopes: application and request scopes. The middleware must be recommended to be a top-level (or the most outer middleware), and it must save both the current ASGI application and current request context in a global contextvar variable.

@ikalnytskyi ikalnytskyi added this to the 4.1.0 milestone Nov 29, 2023
ikalnytskyi added a commit that referenced this issue Dec 4, 2023
ASGI is a spiritual successor to WSGI, intended to provide a standard
interface between async-capable Python web servers, frameworks, and
applications. Most web frameworks (e.g., FastAPI, Starlette) sit on top
of this protocol.

Resolves: #80
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant