Taskiq integration with AioHTTP framework
Project description
Taskiq + AioHTTP
This project is used to create mocked application and request that you can use as a dependencies in your taskiq application.
It's useful because it runs all startup events of your application and everything that you might expect in your application's state is available inside of your tasks.
We suggest to use this library along with taskiq-python/aiohttp-deps, because it might be super handy to reuse same dependencies of your application in your tasks.
To add an integration, you need to call the function init
in your broker's module.
import taskiq_aiohttp
broker = ...
taskiq_aiohttp.init(broker, "project.module:app")
How does it work?
It adds startup functions to the broker, so it imports your aiohttp application and creates a single worker-wide Request and Application objects that you can depend on.
THIS REQUEST IS NOT RELATED TO THE ACTUAL REQUESTS IN AioHTTP! This request won't have actual data about the request you were handling while sending a task.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for taskiq_aiohttp-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3ce9ba886fad1956df3f5e8f723bcecf3f528459c222700d6fdf14dcfe190db0 |
|
MD5 | 8b98400022819be9b7edccb2421c8bae |
|
BLAKE2b-256 | f4ce542a162a32d540b19fed7ece00d5af6af9366bb032a7f7ab03c93ac5487c |