fireant.middleware package


fireant.middleware.concurrency module

class fireant.middleware.concurrency.BaseConcurrencyMiddleware[source]

Bases: abc.ABC

The abstract base class that should be inherited from to define a concurrency middleware.

fetch_queries_as_dataframe(queries, database)[source]

Implementations of this method should execute the given queries on the supplied database and return the results. :return: A list of the results of the executed queries.

fetch_query(query, database)[source]

Perform a query on the database.

  • query – The query to execute.
  • database – The database to perform the query on.

The result of the query.

class fireant.middleware.concurrency.ThreadPoolConcurrencyMiddleware(max_processes=1)[source]

Bases: fireant.middleware.concurrency.BaseConcurrencyMiddleware

A concurrency middleware implementation based on threadpools used as a default middleware.

fetch_queries_as_dataframe(queries, database)[source]

Executes the different queries in separate threads.