Skip to main content

lamparo-lantern

The lantern for Python: a read-only, signed view that tells lamparo what the site knows about itself — the Python version and the installed distributions with their versions. Zero dependency, Python 3.9 or later. Same protocol as the PHP and Node lanterns.

It never writes, never imports anything from a request, collects a closed list of facts, and answers a bare 404 to any request that is not signed with the site's key. Without a key it stays silent: a staging copy never talks.

Install

pip install lamparo-lantern

Django

urls.py:

from django.urls import path
from lamparo_lantern.django import lantern

urlpatterns = [
    path("lamparo", lantern()),
    # ...
]

FastAPI, Starlette (ASGI)

from lamparo_lantern.asgi import lantern

app.add_route("/lamparo", lantern())  # an exact route, no redirect; app.mount("/lamparo", lantern()) works too

WSGI (Flask, or any WSGI server)

from lamparo_lantern.wsgi import lantern
from werkzeug.middleware.dispatcher import DispatcherMiddleware

app.wsgi_app = DispatcherMiddleware(app.wsgi_app, {"/lamparo": lantern()})

The route must answer at https://your-site/lamparo. Give it the site's key from lamparo, as an environment variable named after the key — never in the code, never in git:

LAMPARO_KEY_09887C4F=k_09887c4f:…

In systemd (Environment=), Docker (environment:), gunicorn (--env), or the host's configuration variables.

What it reads

  • runtime: python, its version, the OS family;
  • packages: the installed distributions (importlib.metadata), each with its exact version, and whether requirements.txt at the project root names it (direct).

Nothing else: no settings, no environment, no data. The whole code is in src/lamparo_lantern/__init__.py, short enough to read before you add it.

Licence

MIT — lamp (lamp-ic.fr).

Release files for lamparo-lantern 0.2.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 lamparo-lantern 0.2.1
File Size Uploaded
lamparo_lantern-0.2.1.tar.gz 11.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for lamparo-lantern 0.2.1
File Interpreter ABI Platform
lamparo_lantern-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 20.3 kB

Release files / lamparo_lantern-0.2.1.tar.gz

Download URL lamparo_lantern-0.2.1.tar.gz
Size 11.1 kB
Tags Source
SHA-256 checksum
How to use checksums
26a29413ecc27af75618f1e6f9211bc3b0ceb291f269a7fc2cbb79462bf2bf0d
BLAKE2b-256 checksum
How to use checksums
ae187627005756375cbfcaed2f42e3c9bba796eb73a17b48adfe482df713a133
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 25, 2026.

Transparency log

Release files / lamparo_lantern-0.2.1-py3-none-any.whl

Download URL lamparo_lantern-0.2.1-py3-none-any.whl
Size 9.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
690d2e5170f914a68720ba6c4ce445bce5b3def943647e8baedf2f8f8b0677e0
BLAKE2b-256 checksum
How to use checksums
f5566d13989876c66b57f6b9972a1c75f99db68971b1de40849091297a8895cb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 25, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files

0.2.0

2 release files

0.1.0

2 release files

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