charter/
Public API and CLI for exposing a local TCP port through a managed charter: ngrok, pinggy, tunnl, runlocal or direct (no charter). The stationer's remote pull workers reuse this package when --expose selects a backend.
$ python -m tools.charter expose --port 8765 --backend pinggy
https://abc.free.pinggy.net
from tools.charter import open_charter
with open_charter(port=8765, backend="tunnl") as charter:
print(charter.public_url)
[tool.charter] in pyproject.toml sets the defaults both layers honour:
[tool.charter]
backend = "ngrok"
# ngrok_authtoken = "…" # or set NGROK_AUTHTOKEN
# ngrok_executable = "ngrok" # name or path; auto-install when absent
# ssh_executable = "ssh" # pinggy and tunnl
# expect_executable = "expect" # pinggy
# npx_executable = "npx" # runlocal
# url_timeout_seconds = 20.0 # log-discovered URL wait
# ngrok_timeout_seconds = 15.0
# stop_timeout_seconds = 5.0 # graceful stop grace period
# shortener = "https://shrtr.top/api/v1/shorten"
CLI overrides: --backend, --authtoken, --short [ALIAS], --json,
--pyproject PATH. Other commands: backends, settings, shorten URL,
install-ngrok.
Directory contents
Files
__init__.py— Public API for exposing a local port through a managed charter.__main__.py— Module entry point forpython -m tools.charter.backends.py— Charter backends: ngrok, pinggy, tunnl, runlocal and direct.cli.py— Command-line interface for the charter backends.errors.py— Typed errors shared by every charter backend.http.py— Minimal HTTP(S) requests used by the charter backends.lifecycle.py— Charter lifetime: keep alive, expire after a time, stop on command.models.py— Typed values shared by the charter backends.pyproject.toml— Provide pyproject toml content.settings.py— Layered charter settings: defaults <pyproject.toml< CLI overrides.shorten.py— Anonymous URL shortening for exposed endpoints.
Subdirectories
No subdirectories.
Metadata
Release files for district-charter 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| district_charter-0.1.0.tar.gz | 17.5 kB | Without provenance | Details for district_charter-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| district_charter-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for district_charter-0.1.0-py3-none-any.whl |
Total release size: 38.6 kB
Release files / district_charter-0.1.0.tar.gz
| Download URL | district_charter-0.1.0.tar.gz |
|---|---|
| Size | 17.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b7d8cb4e0cce12518b975d3c0a12e9d4578384516a60976f7be821bb28931609
|
|
BLAKE2b-256 checksum How to use checksums |
7835fdf8698f6e51db099c75b4773db88edade08ae9819a2c807dc36dc157420
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.9
|
Release files / district_charter-0.1.0-py3-none-any.whl
| Download URL | district_charter-0.1.0-py3-none-any.whl |
|---|---|
| Size | 21.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d726a1d8323706f9712c8b9ce2a6ec9bda8bc140db1ae1dc5de53c487ba941bd
|
|
BLAKE2b-256 checksum How to use checksums |
41b084a9171e8dd7c6c152011a265a305b3271a145b18e908409a300e3d9052b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.9
|
Security for district-charter 0.1.0
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.