asyncio library supports asynchronous programming in Python.
An HTTP server and client written for
Virtool contributors should understand all parts of the
aiohttp server components. Most features of the server are used in Virtool.
aiohttp client has minimal use in Virtool. It is used for making simple requests to GitHub and NCBI.
Virtool currently uses MongoDB >= 4.4.
The official MongoDB documentation includes detailed information about the following:
Virtool uses the
motor asynchronous MongoDB driver to connect to the database and perform operations. We suggest starting by following the tutorial here.
You have to refer to the
asyncio-focussed API documentation for
motor. Sections related to Virtool are:
We use SQLAlchemy as a Postgres database and object-relation mapping (ORM) library.
Always use Postgres asyncio support when executing queries.
We use aioredis==1.3.1 for connecting to Redis with asyncio support.
We use a limited set of Redis features:
channel:cancelshould be cancelled.
jobs_create_sampleto queue up job IDs that should be taken up by job runners.