██╗███╗ ██╗███████╗██████╗ ███████╗ ██████╗████████╗ ██████╗ ██████╗
██║████╗ ██║██╔════╝██╔══██╗██╔════╝██╔════╝╚══██╔══╝██╔═══██╗██╔══██╗
██║██╔██╗ ██║███████╗██████╔╝█████╗ ██║ ██║ ██║ ██║██████╔╝
██║██║╚██╗██║╚════██║██╔═══╝ ██╔══╝ ██║ ██║ ██║ ██║██╔══██╗
██║██║ ╚████║███████║██║ ███████╗╚██████╗ ██║ ╚██████╔╝██║ ██║
╚═╝╚═╝ ╚═══╝╚══════╝╚═╝ ╚══════╝ ╚═════╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝
>------------------------------------- API for Inspecting HTTP Requests
- See your own IP address
- IP address to Country
- Inspect HTTP headers
# Copy the example environment file to .env
# For development you should set DEBUG=True
cp .env.example .env
# Build the docker image and run the container
docker-compose up --build --detach
API is now available at https://localhost:8888 (by default) - host and port can be changed in .env
.
- root:
/
- See application info - headers:
/headers
- See HTTP request headers - country:
/country
- See country of IP address
Schema documentation is available through Swagger and ReDoc:
# Poetry is required for installing and managing dependencies
# https://python-poetry.org/docs/#installation
poetry install
# Run the application
poetry run python main.py
# Install pre-commit hooks
poetry run pre-commit install
# Formatting (inplace formats code)
poetry run black .
# Linting (and to fix automatically)
poetry run ruff .
poetry run ruff --fix .
# Type checking
poetry run mypy .
Configuration details can be found in pyproject.toml.