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()),
    # ...
]

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.1.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.1.0
File Size Uploaded
lamparo_lantern-0.1.0.tar.gz 8.5 kB Details

Built distribution (wheel)

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

Total release size: 16.4 kB

Release files / lamparo_lantern-0.1.0.tar.gz

Download URL lamparo_lantern-0.1.0.tar.gz
Size 8.5 kB
Tags Source
SHA-256 checksum
How to use checksums
51322fa208115b77c2d05b959743b59861600d1d7cbfa30cdf95cc8a8b9723ae
BLAKE2b-256 checksum
How to use checksums
5698d1d49099447c09398ec2b9a2d7e2e379c518d9f3dafd583c3ad1758c3339
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.1.0-py3-none-any.whl

Download URL lamparo_lantern-0.1.0-py3-none-any.whl
Size 7.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
03ea5d9dd8ff5d85728e427d77ea012464a27aafe217a8ede5137854f949df03
BLAKE2b-256 checksum
How to use checksums
a901d095711a7f72e5d9922b325b16130aea9af7db1d88d17e7ceea72a69c9e9
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

0.2.0

2 release files

This release

0.1.0 This release

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