项目介绍

GregaVrbancic/fastapi-celery 是一个托管在 GitHub 上的开源项目,主要使用 Python 编写,目前获得 662 个 Star、111 次 Fork。

仓库全名
GregaVrbancic/fastapi-celery
Star 数
662
Fork 数
111

README 摘要

FastAPI with Celery Minimal example utilizing FastAPI and Celery with RabbitMQ for task queue, Redis for Celery backend and flower for monitoring the Celery tasks. Requirements Docker docker-compose Run example 1. Run command to start up the RabbitMQ, Redis, flower and our application/worker instances. 2. Navigate to the http://localhost:8000/docs and execute test API call. You can monitor the execution of the…

完整内容见 GitHub 原始 README 或本页 。

常见问题

fastapi-celery 用什么语言开发?

主要使用 Python 编写,目前有 662 个 Star。

如何获取 fastapi-celery 的源码?

可以直接克隆仓库:git clone https://github.com/GregaVrbancic/fastapi-celery.git,默认分支为 master;安装与运行步骤见仓库 README。

fastapi-celery 最近还在维护吗?

仓库最近一次更新为 1月7日,当前没有未关闭的 Issue;Star 数为 662,可作为社区活跃度的参考。

关于

GitHub 原始描述(英文)

Minimal example utilizing fastapi and celery with RabbitMQ for task queue, Redis for celery backend and flower for monitoring the celery tasks.

描述取自 GitHub 官方 API,保持仓库作者书写的原文。

简要分析

热度分
892
价值分
431
活跃状态
活跃

语言占比

Dockerfile
Python

README

FastAPI with Celery

Minimal example utilizing FastAPI and Celery with RabbitMQ for task queue, Redis for Celery backend and flower for monitoring the Celery tasks.

Requirements

Run example

  1. Run command docker-compose upto start up the RabbitMQ, Redis, flower and our application/worker instances.
  2. Navigate to the http://localhost:8000/docs and execute test API call. You can monitor the execution of the celery tasks in the console logs or navigate to the flower monitoring app at http://localhost:5555 (username: user, password: test).

Run application/worker without Docker?

Requirements/dependencies

  • Python >= 3.7
  • RabbitMQ instance
  • Redis instance

The RabbitMQ, Redis and flower services can be started with docker-compose -f docker-compose-services.yml up

Install dependencies

Execute the following command: poetry install --dev

Run FastAPI app and Celery worker app

  1. Start the FastAPI web application with poetry run hypercorn app/main:app --reload.
  2. Start the celery worker with command poetry run celery worker -A app.worker.celery_worker -l info -Q test-queue -c 1
  3. Navigate to the http://localhost:8000/docs and execute test API call. You can monitor the execution of the celery tasks in the console logs or navigate to the flower monitoring app at http://localhost:5555 (username: user, password: test).

评论

暂无评论