Skip to main content

Charge Sats

A very simple Python library to add Pay-Per-View technology to a Flask endpoint.

Here's a quick example of how to use it. Note that it assumes the CLN node is running on/within reach of the Flask server.

from flask import Flask
from chargesats import Charger


app = Flask(__name__)


# Init the charger!
lnrpc = '/home/runner/.lightning/regtest/lightning-rpc'
Charger.init(lnrpc, 'secret do not share')


@app.route('/')
# Use the charger to charge some sats for an endpoint!
@Charger.charge(amount="100sat")
def index():
    return 'This cost you 100 sats\\n'


app.run(host='0.0.0.0', port=81)

Pending Tasks

  • Uses runes as tokens for repeat calls
  • Add ability to use commando

Authors

@niftynei (niftynei@gmail.com) is the responsible party.

Metadata

Release files for chargesats 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for chargesats 0.1.1
File Size Uploaded Provenance Actions
chargesats-0.1.1.tar.gz 2.3 kB Without provenance Details for chargesats-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for chargesats 0.1.1
File Interpreter ABI Platform Actions
chargesats-0.1.1-py3-none-any.whl Python 3 none any Details for chargesats-0.1.1-py3-none-any.whl

Total release size: 5.1 kB

Release files / chargesats-0.1.1.tar.gz

Download URL chargesats-0.1.1.tar.gz
Size 2.3 kB
Tags Source
SHA-256 checksum
How to use checksums
e9eb917bf0aeb7b04f383e7b63fb21816ccebeb7b1743571a652721e465a1f8b
BLAKE2b-256 checksum
How to use checksums
f58d89ad2d768f9e5cff6ea1a68809d13f460bb8e79859ce4522738647dffa97
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.5.1 CPython/3.10.6 Linux/5.15.0-75-generic

Release files / chargesats-0.1.1-py3-none-any.whl

Download URL chargesats-0.1.1-py3-none-any.whl
Size 2.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1caab841b226d2acea32d53ebcc0d027bafa3d92da06d5f8b78a3932940e4268
BLAKE2b-256 checksum
How to use checksums
a76c81e6c8229cb968c82366a7c651b430d6bff918442f40898a79f80156f233
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.5.1 CPython/3.10.6 Linux/5.15.0-75-generic

Security for chargesats 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page