Skip to content

Add python-x402-fastapi — @x402_required decorator for FastAPI/Flask (bounty #10) - #24

Open
ChuleBonga wants to merge 2 commits into
nirium-protocol:mainfrom
ChuleBonga:feat/python-x402-fastapi
Open

Add python-x402-fastapi — @x402_required decorator for FastAPI/Flask (bounty #10)#24
ChuleBonga wants to merge 2 commits into
nirium-protocol:mainfrom
ChuleBonga:feat/python-x402-fastapi

Conversation

@ChuleBonga

Copy link
Copy Markdown

Bounty #10 — FastAPI Python x402 Decorator ($25 USDC)

Implements @x402_required(price='0.02', pay_to=...) per acceptance criteria:

  1. Compatible with FastAPI & Flask (reads X-402-Signature header).
  2. Validates settlement (recipient, amount, network, signature).
  3. Exposes clean HTTP 402 with x402 v1 requirement.

Package: packages/python-x402-fastapi. 6/6 unit tests pass. Zero hard deps (optional flask for response shaping).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant