Python bindings for ProxyAuth authentication via Rust
Project description
PyProxyAuth
A lightweight Python library to authenticate and retrieve tokens via ProxyAuth.
install
pip install ppauth
usage
import ppauth
ppauth.auth(
host="127.0.0.1", port=8080,
username="admin", password="admin123",
timezone="Europe/Paris"
)
token = ppauth.token()
token = ppauth.token(renew=True) # Automatically re-authenticates and returns a new token if the previous one has expired.
lease_token = ppauth.lease_token()
print({"token": token, "expire_at": lease_token})
> {"expire_at": 16500,"token":"ZoHAauGmCyxjq6+1sfVbqy..."}
# for easy use method GET
# Use the route defined in routes.yml within your backend delivery.
# You don't need to manually include the token in the headers it's handled automatically
headers = {"user-agent": "ppauth/0.1.1"}
params = {"params_key": "my_send_request_params_via_get"}
ppauth.get("/app", headers=headers, params=params)
# result
> 'ok'
# you are similar for POST method
headers = {"user-agent": "ppauth/0.1.1"}
body = {"body_key": "my_send_request_data_via_post"}
ppauth.post("/app", headers, body)
# result
> 'ok'
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ppauth-0.1.3-cp313-abi3-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: ppauth-0.1.3-cp313-abi3-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 5.3 MB
- Tags: CPython 3.13+, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.9.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f0f794b130fba1019f2940095282b04ad61e26f74677e10eefcb5a33ea3003dc
|
|
| MD5 |
d57dcba2dce201233825a344faf0b15b
|
|
| BLAKE2b-256 |
a53d2cc5b615d2efd341a04897fda34c47aa78cd5c1026992ab91503f6391621
|
File details
Details for the file ppauth-0.1.3-cp312-abi3-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: ppauth-0.1.3-cp312-abi3-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 5.3 MB
- Tags: CPython 3.12+, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.9.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5cd661d47cfaab35ff852944a03eab5fdf7e7e3810d2585d3be5776996b130cd
|
|
| MD5 |
5398ca54eed11d1f59e7d26a9f2de7b3
|
|
| BLAKE2b-256 |
5c69987bf2b134d2f3d8d6abc32d62a3e6ae767a4effa4f55ca6b1e2d24a1188
|
File details
Details for the file ppauth-0.1.3-cp311-abi3-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: ppauth-0.1.3-cp311-abi3-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 5.3 MB
- Tags: CPython 3.11+, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.9.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6bba5f6e13a3689dc8ddba7e6169d90f344e4729141640489e17d07f45e0215c
|
|
| MD5 |
38d414878022ffac0c38d5bc1bfae413
|
|
| BLAKE2b-256 |
505f0831bdf421860e642d95fc561b576f96cc0e1a33989d1ee86902efdfe6c8
|
File details
Details for the file ppauth-0.1.3-cp310-abi3-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: ppauth-0.1.3-cp310-abi3-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 5.3 MB
- Tags: CPython 3.10+, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.9.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5fb251bdcc897505c34318bc5831dcbf1e2d4e181cb1e7846590f491d210c33d
|
|
| MD5 |
1c3f7efbbf85efab982834f46fb8ae0b
|
|
| BLAKE2b-256 |
33f5cae5fe5c75bc32d8ae96122ac5a4dec07f83e4e92c3dec5d7cd33a7d191c
|
File details
Details for the file ppauth-0.1.3-cp39-abi3-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: ppauth-0.1.3-cp39-abi3-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 5.3 MB
- Tags: CPython 3.9+, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.9.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0eb73c1e8e070f30944621d8956abb197c976117c08ac790ac5aae1588b3fe45
|
|
| MD5 |
e6e452b5a82a6e64b0b1388f9618e832
|
|
| BLAKE2b-256 |
83c4f48f083e8f95ab959c10e15c1402464c98cbc79c003d6383b6f8817f7cb8
|
File details
Details for the file ppauth-0.1.3-cp38-abi3-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: ppauth-0.1.3-cp38-abi3-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 5.3 MB
- Tags: CPython 3.8+, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.9.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
071f1f9f7c2f9ffa853e162664faa3fc1711ea6cb09274978815946389cbf5a3
|
|
| MD5 |
679de0218cdd68b9826dc5e057fa835f
|
|
| BLAKE2b-256 |
0a9a6ba3673d410d7c08f9782b94b5c23d7e313aed469891fef1b2000caed33f
|
File details
Details for the file ppauth-0.1.3-cp37-abi3-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: ppauth-0.1.3-cp37-abi3-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 5.3 MB
- Tags: CPython 3.7+, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.9.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c91626e71338a772943258daa6b8b050e9a0569c310ac9c7f68df0415f7df4d1
|
|
| MD5 |
57f737490449908b9d54e28f06f6a604
|
|
| BLAKE2b-256 |
fd475c33cb429df66a5b1691d27ac73f3f4f0f4f3d3529d2181dfef917e8bbd5
|