funboost-faas-deploy

Expose funboost task functions as HTTP microservice endpoints using built-in FastAPI, Flask, and Django routers.

892|166|Updated Dec 25, 2021
One-click install
npx skills add https://github.com/ydf0509/funboost --skill funboost-faas-deploy-ydf0509
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: funboost-faas-deploy
Source: https://github.com/ydf0509/funboost/tree/main/.agents/skills/funboost-faas-deploy
Command: npx skills add https://github.com/ydf0509/funboost --skill funboost-faas-deploy-ydf0509

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires funboost, fastapi, flask.

What problem does it solve? Manually writing HTTP APIs to publish tasks and query results for distributed queue workers is repetitive and error-prone. This Skill shows how to use funboost's built-in FaaS routers to expose publish and result-query endpoints for all @boost decorated functions without writing API code. ## Core Features & Use Cases - Built-in Web Routers: Integrate with FastAPI via app.include_router(fastapi_router), Flask via app.register_blueprint(flask_blueprint), or Django Ninja via api.add_router, automatically providing POST /funboost/publish and GET /funboost/get_result endpoints. - Publisher/Consumer Separation: Guides correct architecture where the web process only publishes tasks while worker processes run consume(), with queue metadata discovered through Redis heartbeats. - Custom API Fallback: Demonstrates manual endpoint creation with aio_push and AioAsyncResult when built-in routers do not meet requirements. - Use Case: A backend team needs a REST API so a frontend can submit email-sending tasks and poll for results; mounting fastapi_router exposes the endpoints instantly while workers consume from a Redis queue. ## Quick Start Add the funboost FastAPI router to my FastAPI app so my boosted task functions are exposed as HTTP publish and result-query endpoints.

Frequently Asked Questions about funboost-faas-deploy

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I expose funboost tasks as HTTP API endpoints?▼

Import fastapi_router from funboost.faas and call app.include_router(fastapi_router) in your FastAPI app. This automatically provides POST /funboost/publish for task submission and GET /funboost/get_result for querying task results.

How to integrate funboost with Flask or Django?▼

For Flask, register the built-in blueprint with app.register_blueprint(flask_blueprint). For Django Ninja, use api.add_router with the django_router. Both expose the same publish and result-query endpoints as the FastAPI integration.

Why does the funboost FaaS endpoint return no queues?▼

The FaaS router discovers queues from Redis metadata registered by running consumers. Ensure your worker processes have started with consume() and that Redis is correctly configured in funboost_config.py.

Does funboost FaaS support returning task results over HTTP?▼

Yes, pass need_result=true in the publish request body to wait for and receive the task result. For custom APIs, enable is_using_rpc_mode=True in BoosterParams and use AioAsyncResult to await results asynchronously.

Should consumers run in the same process as the web server?▼

No, consumers should run in separate worker processes calling consume(), while the web process only publishes tasks. Mixing them couples scaling and can block the web server's event loop.