Skip to content

orcapod-tech/fastapi-addons

Repository files navigation

Odoo FastAPI Addons

Pre-commit Status Build Status

Modern APIs beside Odoo

Odoo remains your system of record. Partners, mobile clients, automation, and AI agents increasingly expect HTTP JSON, predictable status codes, and discoverable API documentation. Traditional RPC-style access still works, but it is often the wrong shape when you want a first-class integration experience.

This repository runs FastAPI on Uvicorn as a sidecar next to Odoo — not a fork of the framework and not a second identity store. Requests can use the same PostgreSQL database, Odoo sessions, API keys, record rules, and access rights you already enforce in Odoo.

What you gain

  • Interactive API docs — OpenAPI, Swagger UI, and ReDoc come from FastAPI so partners and tools can explore your surface without guesswork.
  • async def routes — Handlers can await ORM operations through a safe proxy, which fits concurrent traffic and long-running external calls when you follow the documented patterns (avoid blocking the event loop with naive field reads on records).
  • The usual FastAPI patterns — Dependencies, Pydantic validation, middleware, and streaming responses (for example StreamingResponse for SSE-style flows) work like in any FastAPI project; you add them on top of this stack.
  • Deployment-shaped defaults — CORS, bind host/port, lifecycle tied to Odoo (threaded and prefork), and Nginx examples so the sidecar can sit behind a reverse proxy.

LGPL-3, Odoo 18.0, OCA-style quality gates (pre-commit, CI). Clone, add the directory to --addons-path, install fastapi_base, and ship your first route quickly. Contributions and feedback are welcome.

Quick start

  • Use Odoo 18.0 and add this repository to --addons-path.
  • Install fastapi_base from Apps (fastapi and uvicorn are declared in the manifest; see requirements.txt for CI and local tooling).
  • Optional: install fastapi_example for runnable sample routes (the invoice demo needs the Accounting app).
  • Operator and developer guide (sidecar, Nginx, authentication, async vs sync ORM): fastapi_base/README.md.
Module Summary
fastapi_base FastAPI sidecar wired to Odoo DB, auth, and ORM
fastapi_example Example routers and patterns for fastapi_base

Licenses

This repository is licensed under LGPL-3.0.

However, each module can have a totally different license, as long as they align with this repository’s goals. Consult each module's __manifest__.py file, which contains a license key that explains its license.


Maintainer: @omerahmed1994. This stack connects a FastAPI + Uvicorn sidecar to Odoo’s database, authentication, and transaction lifecycle so you can expose modern HTTP APIs alongside a standard Odoo deployment.

About

High-performance FastAPI engine for Odoo

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors