release: bump version to 0.3.0

- Refactor Redis backend connection handling and pool management
- Update algorithm implementations with improved type annotations
- Enhance config loader validation with stricter Pydantic schemas
- Improve decorator and middleware error handling
- Expand example scripts with better docstrings and usage patterns
- Add new 00_basic_usage.py example for quick start
- Reorganize examples directory structure
- Fix type annotation inconsistencies across core modules
- Update dependencies in pyproject.toml
This commit is contained in:
2026-03-17 20:55:38 +00:00
parent 492410614f
commit f3453cb0fc
51 changed files with 6507 additions and 166 deletions

View File

@@ -33,6 +33,9 @@ async def lifespan(_: FastAPI):
await limiter.close()
DEFAULT_HOST = "127.0.0.1"
DEFAULT_PORT = 8000
app = FastAPI(title="Custom Responses Example", lifespan=lifespan)
@@ -211,6 +214,22 @@ async def graceful_endpoint(_: Request) -> dict[str, str]:
if __name__ == "__main__":
import argparse
import uvicorn
uvicorn.run(app, host="0.0.0.0", port=8000)
parser = argparse.ArgumentParser(description="Custom responses example")
parser.add_argument(
"--host",
default=DEFAULT_HOST,
help=f"Host to bind to (default: {DEFAULT_HOST})",
)
parser.add_argument(
"--port",
type=int,
default=DEFAULT_PORT,
help=f"Port to bind to (default: {DEFAULT_PORT})",
)
args = parser.parse_args()
uvicorn.run(app, host=args.host, port=args.port)