Getting started
Requirements
- Python 3.10 or newer
httpx(installed with the package)
Install
The PyPI name is lupaxa-real-url. The import path is lupaxa.real_url.
The console script is real-url. lupaxa is a namespace package — there
is no lupaxa/__init__.py.
From source (development)
Site Markdown lives in mkdocs/ (not GitHub’s special docs/ directory).
After makefile-skills are installed:
First lookup
Pass any HTTP(S) URL. The return value is the URL that finally served the response:
If you omit the scheme, https:// is tried first. When that host cannot
be fetched or returns 404, http:// is tried:
The same lookup from the shell:
The CLI prints the final URL and exits 0. Exit 2 means the URL was
invalid. Exit 1 means a loop, hop limit, or network error.
See the chain
Ask for every hop, or hops with status codes:
from lupaxa.real_url import resolve
resolve("https://example.com", full=True)
resolve("https://example.com", status=True)
--full prints one URL per line. --status prints STATUS URL for
each hop. Passing both flags uses the --status layout.