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.mount("/lamparo", lantern())

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.0

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.0
File Size Uploaded
lamparo_lantern-0.2.0.tar.gz 9.3 kB Details

Built distribution (wheel)

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

Total release size: 17.9 kB

Release files / lamparo_lantern-0.2.0.tar.gz

Download URL lamparo_lantern-0.2.0.tar.gz
Size 9.3 kB
Tags Source
SHA-256 checksum
How to use checksums
988c6c4ae77c612a05e9ed3fc4269cf0f702a6c5295a41be5e714808ee10f0a1
BLAKE2b-256 checksum
How to use checksums
fb9e1c359a879186d7c32273b9bef60bdd7d152a959a39d9b2ebbaeadcc50325
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 24, 2026.

Transparency log

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

Download URL lamparo_lantern-0.2.0-py3-none-any.whl
Size 8.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
468eb985139bfdd6c773c4c0e3afabefe0378246fe0289abb64029eb4ac84612
BLAKE2b-256 checksum
How to use checksums
04f95b0a572af895d28fc2aa036973aa6a5c3e995694c30bedc7184a59878ecc
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 24, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.0 This release

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