Replies: 3 comments
-
Hey @cirezd. Thank you for your interest! Take a look at |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thank you. I am not sure it covers the same use case, but it seems more appropriate than user_data. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hi @cirezd, as was mentioned, you can use either either |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, I am looking for a way to inject or pass arbitrary data to the context object. Similar to what is possible in fastapi via
app.state
or via dependencies:My use case is that I have the handlers in separate files and I would like to pass general run information to the handlers, without the need for database requests. I am aware of
user_data
, but I am not sure this is appropriate here, since it is more tied to theRequest
and not the overall run. Furthermore, I don't see a straight-forward way to pass the data from the start_urls? Is it possible to abuse thepre_navigation_hook
or something similar?Any guidance would be helpful. Thanks!
Beta Was this translation helpful? Give feedback.
All reactions