Skip to main content

Snipercorn

Hypercorn + SNI (multiple SSL certificates per server) + easy letsencrypt integration

Snipercorn is a layer on top of the Hypercorn web server designed to make it as easy as possible to use https:// with your Python project. It extends Hypercorn’s Config class to look for a tree of certificates in a layout compatible with the dehydrated ACME / letsencrypt client (https://dehydrated.io), making it easier for any project on the public web to run with a real https certificate.

Usage

Download dehydrated.io client.

Make config directory ~/etc/dehydrated/config:

CA="https://acme-v02.api.letsencrypt.org/directory"
CHALLENGETYPE="tls-alpn-01"

Snipercorn can serve the tls-alpn-01 challenge type.

~/etc/dehydrated/domains.txt should contain the fqdn of your server and desired alternate names:

example.com www.example.com

Start snipercorn:

authbind python -m snipercorn fileserver.py -b :::443 --sni ~/etc/dehydrated

Run dehydrated to get certificates:

dehydrated -f ~/etc/dehydrated/config --register --accept-terms # once
dehydrated -f ~/etc/dehydrated/config -c    # auto-renews when necessary

Alternate names may not work. If it doesn’t work, try just one domain in domains.txt. Remember your domain has to be reachable from the CA (letsencrypt) server on port 443.

Visit your new site.

Metadata

Release files for snipercorn 0.0.1

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

Built distribution (wheel)

Table of built distributions (wheels) for snipercorn 0.0.1
File Interpreter ABI Platform Actions
snipercorn-0.0.1-py2.py3-none-any.whl Python 2, Python 3 none any Details for snipercorn-0.0.1-py2.py3-none-any.whl

Release files / snipercorn-0.0.1-py2.py3-none-any.whl

Download URL snipercorn-0.0.1-py2.py3-none-any.whl
Size 6.7 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
8a45b068216ab11b95c1b0c3a6227811e5d13ef900cfa71544e5a1537f3eb26a
BLAKE2b-256 checksum
How to use checksums
88a0e298c8b88d49634cec46445a78662a9f73fc6911e888e9680a2be4b68f07
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

Security for snipercorn 0.0.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.0.1 This release

1 release file 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