nginx-proxy-manager-sdk
A modern Python SDK for the Nginx Proxy Manager API.
Features
- Typed, Pythonic client interface with resource-oriented APIs
- Automatic login when you pass email/password credentials
- Defensive validation for domain names and advanced nginx config snippets
- Pre-configured packaging, testing, linting, documentation, and CI/CD workflows
- Friendly local workflows for
uv, virtualenv,pytest, andpre-commit
Installation
pip install nginx-proxy-manager-sdk
For local development with uv:
uv venv
source .venv/bin/activate
uv pip install -e .[dev]
pre-commit install
Or with the standard library tooling:
python -m venv .venv
source .venv/bin/activate
python -m pip install -e .[dev]
pre-commit install
Quick start
from nginx_proxy_manager_sdk import NginxProxyManagerClient
with NginxProxyManagerClient(
"http://127.0.0.1:81",
email="admin@example.com",
password="your-password",
) as client:
hosts = client.proxy_hosts.list()
host = client.proxy_hosts.create(
domain_names=["app.example.com"],
forward_scheme="http",
forward_host="127.0.0.1",
forward_port=3000,
certificate_id="new",
ssl_forced=True,
allow_websocket_upgrade=True,
)
Authentication
Managed credentials
When you pass email and password, the client automatically fetches a bearer token on the first authenticated request.
Pre-issued token
client = NginxProxyManagerClient(
"http://127.0.0.1:81",
token="eyJhbGciOi...",
)
Manual login and refresh
client = NginxProxyManagerClient(
"http://127.0.0.1:81",
email="admin@example.com",
password="secret",
)
token_data = client.login()
refreshed = client.refresh_token()
Resource APIs
Proxy hosts
client.proxy_hosts.list(expand=["owner", "certificate"], query="example.com")
client.proxy_hosts.get(1)
client.proxy_hosts.update(1, forward_port=4000, ssl_forced=True)
client.proxy_hosts.enable(1)
client.proxy_hosts.disable(1)
client.proxy_hosts.delete(1)
Certificates
client.certificates.list()
client.certificates.get(1)
client.certificates.create(
provider="letsencrypt",
domain_names=["*.example.com"],
meta={
"dns_challenge": True,
"dns_provider": "cloudflare",
"dns_provider_credentials": "dns_cloudflare_api_token = xxxxx",
"propagation_seconds": 30,
},
)
client.certificates.renew(1)
client.certificates.test_http(["app.example.com"])
client.certificates.delete(1)
API documentation
The MkDocs site includes API reference pages generated from package docstrings.
mkdocs serve
Local development workflows
A Makefile is included for common tasks:
make installmake lintmake testmake docsmake build
Equivalent direct commands:
pytestfor unit testsblack src testsfor formattingflake8 src testsfor lintingpre-commit run --all-filesto run repository hookspython -m buildto produce wheel and sdist artifacts
Publishing
Build artifacts locally:
python -m build
Upload manually if needed:
twine upload dist/*
GitHub Actions also includes a trusted-publishing workflow for PyPI releases triggered by GitHub Releases.
Metadata
Release files for nginx-proxy-manager-sdk 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| nginx_proxy_manager_sdk-0.1.0.tar.gz | 13.7 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| nginx_proxy_manager_sdk-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 24.4 kB
Release files / nginx_proxy_manager_sdk-0.1.0.tar.gz
| Download URL | nginx_proxy_manager_sdk-0.1.0.tar.gz |
|---|---|
| Size | 13.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c1a833507f82f8b5af5e1f7b267fcb9d314f1282723e3c17fdea9ff735f7c74e
|
|
BLAKE2b-256 checksum How to use checksums |
dca0e8ed80726845c04c9dd5021a900858ce9def827b46663eeed8768e6cb378
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Mar 19, 2026.
Transparency logRelease files / nginx_proxy_manager_sdk-0.1.0-py3-none-any.whl
| Download URL | nginx_proxy_manager_sdk-0.1.0-py3-none-any.whl |
|---|---|
| Size | 10.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7491e27ac5649da7810bbfa2ee5b6cc33e270f680c260b651749f46ad7062e97
|
|
BLAKE2b-256 checksum How to use checksums |
ad09b298e4e77ca2ef6cc927c7ec3a7c53867c51629fee6e1d40cff4744eb3f9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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 Mar 19, 2026.
Transparency logSecurity for nginx-proxy-manager-sdk 0.1.0
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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for nginx_proxy_manager_sdk-0.1.0.tar.gz
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 Mar 19, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.