Skip to main content

Lightning Network L402 payment middleware for FastAPI and Flask

Project description

l402kit

Bitcoin Lightning payment middleware for FastAPI and Flask. 3 lines of code.

pip install l402kit

Usage

from l402kit import l402_required, BlinkProvider

lightning = BlinkProvider(api_key="...", wallet_id="...")

@app.get("/premium")
@l402_required(price_sats=100, lightning=lightning)
async def premium(request: Request):
    return {"data": "You paid 100 sats!"}

Full docs: https://shinydapps.mintlify.app GitHub: https://github.com/ShinyDapps/l402-kit

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

l402kit-0.1.0.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

l402kit-0.1.0-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

Details for the file l402kit-0.1.0.tar.gz.

File metadata

  • Download URL: l402kit-0.1.0.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.2

File hashes

Hashes for l402kit-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b2f405dcfdf011df35ed2446fe7e41f745c6694a9a7f359b11dff22cb4a3d61d
MD5 038a489021161a70220e03181d727663
BLAKE2b-256 a9e3061a429911835199001e0af109cc78d4cfef3169aca6647e1860d2b87650

See more details on using hashes here.

File details

Details for the file l402kit-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: l402kit-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.2

File hashes

Hashes for l402kit-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4d12e1e8ef939f9b918085c41e0d7ead9446e42500c8e5ebd265c37510ec707a
MD5 5395d9e0b66aa5498af1e6e8e3b2bafd
BLAKE2b-256 17682fd93e4b1f881f2963effec17717acdc0b2a8543e250563c5480c766f82a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page