Skip to content

A FastAPI and Playwright based template for scheduling and processing jobs using a RabbitMQ queue system, designed as a springboard for job processing applications.

License

Notifications You must be signed in to change notification settings

mbroton/fastapi-playwright-tasker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FastAPI-Playwright-Tasker

This project serves as a springboard for kickstarting an application that utilizes FastAPI for handling API requests and Playwright for browser automation. Designed with a RabbitMQ queue and worker setup, this project is for anyone looking to adapt and build upon a foundational structure for processing jobs.

However, it's important to note that this project is not production-ready and hasn't been fortified with security measures.

Features

  • API Endpoint: Accept and queue jobs via an API.
  • Worker Pool: Scalable worker setup to process jobs in parallel.
  • Queue System: RabbitMQ based reliable queue system.
  • Browser Automation: Playwright setup for automated browser interactions.
  • Dockerized: Defined docker-compose.yaml for easy deployment and scaling.

Getting Started

Prerequisites

  • Docker and Docker Compose installed.

Setup

  1. Clone the repository:

    git clone https://github.com/mbroton/fastapi-playwright-tasker.git
    cd fastapi-playwright-tasker
  2. Configuration: Update the docker-compose.yaml file to specify the number of workers and other preferences.

  3. Build and Run:

    docker-compose up --build

Usage

Once deployed, FastAPI’s interactive API documentation at http://localhost:8000/docs allows for easy testing of the API.

RabbitMQ Management Interface

Access the RabbitMQ management interface at http://localhost:15672 to monitor the queue.

License

MIT

Acknowledgements

About

A FastAPI and Playwright based template for scheduling and processing jobs using a RabbitMQ queue system, designed as a springboard for job processing applications.

Topics

Resources

License

Stars

Watchers

Forks