Skip to content

Fastapi-Nacos-Extension v0.1.1

Latest

Choose a tag to compare

@pumpkin-nbc pumpkin-nbc released this 11 Sep 02:12
3539888

FastAPI-Nacos-Extension v0.1.1

中文

面向 FastAPI 与 Nacos 2.x 的生产级集成插件。

主要功能

  • 支持服务自动注册、优雅注销及生命周期故障恢复。
  • 提供服务发现、集群与 metadata 过滤,以及 first、random、weight 选择策略。
  • 支持按 Data ID 和 Group 读取配置中心原始文本。
  • 同时提供异步接口和对应的 _sync 同步接口。
  • 支持多应用、多进程及 Uvicorn/Gunicorn Worker。
  • 提供本地状态查询和可选的 /health/nacos 健康检查。
  • 包含有限重试、日志脱敏及 fork 后运行时重建。
  • 使用 Apache License 2.0。

兼容范围

Python >=3.8 · FastAPI >=0.112.2,<1.0.0 · nacos-sdk-python >=2.0.0,<3.0.0 · Nacos Server 2.3.2


English

A production-oriented FastAPI integration for Nacos 2.x.

Highlights

  • Automatic registration, graceful deregistration, and lifecycle recovery.
  • Service discovery with cluster and metadata filters.
  • first, random, and weight instance-selection strategies.
  • Raw configuration reads by Data ID and Group.
  • Matching asynchronous and _sync synchronous APIs.
  • Multi-application, multi-process, and Uvicorn/Gunicorn worker support.
  • Local status reporting and optional /health/nacos endpoint.
  • Finite retries, sanitized logging, and post-fork runtime reconstruction.
  • Licensed under Apache License 2.0.

Compatibility

Python >=3.8 · FastAPI >=0.112.2,<1.0.0 · nacos-sdk-python >=2.0.0,<3.0.0 · Nacos Server 2.3.2

Installation

pip install fastapi-nacos-extension==0.1.1