Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

ppauth-0.1.2-cp313-abi3-manylinux_2_34_x86_64.whl (5.3 MB view details)

Uploaded CPython 3.13+manylinux: glibc 2.34+ x86-64

ppauth-0.1.2-cp312-abi3-manylinux_2_34_x86_64.whl (5.3 MB view details)

Uploaded CPython 3.12+manylinux: glibc 2.34+ x86-64

ppauth-0.1.2-cp311-abi3-manylinux_2_34_x86_64.whl (5.3 MB view details)

Uploaded CPython 3.11+manylinux: glibc 2.34+ x86-64

ppauth-0.1.2-cp310-abi3-manylinux_2_34_x86_64.whl (5.3 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.34+ x86-64

ppauth-0.1.2-cp39-abi3-manylinux_2_34_x86_64.whl (5.3 MB view details)

Uploaded CPython 3.9+manylinux: glibc 2.34+ x86-64

ppauth-0.1.2-cp38-abi3-manylinux_2_34_x86_64.whl (5.3 MB view details)

Uploaded CPython 3.8+manylinux: glibc 2.34+ x86-64

ppauth-0.1.2-cp37-abi3-manylinux_2_34_x86_64.whl (5.3 MB view details)

Uploaded CPython 3.7+manylinux: glibc 2.34+ x86-64

File details

Details for the file ppauth-0.1.2-cp313-abi3-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for ppauth-0.1.2-cp313-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 c28dc0846aff9790e3966434898427b1f5f59d540d48b89b1dd9c2386b924b92
MD5 173c544e13187e2a4770944dd9edac64
BLAKE2b-256 110d3dc3774584d6825ed8a93c751baf9cfacfc396edb909121875b223789993

See more details on using hashes here.

File details

Details for the file ppauth-0.1.2-cp312-abi3-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for ppauth-0.1.2-cp312-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 73d98cd0fc7468db77dcdd3b5193f9b7a27eb6b2b3ab9c6088e8a966921b6240
MD5 4f7abb8cf391a77a839c0d77161e21a2
BLAKE2b-256 cc482b2308bad4c3ebb7b91b6c966a99274ff6a1c9160362dd6c1ecb2f6989d5

See more details on using hashes here.

File details

Details for the file ppauth-0.1.2-cp311-abi3-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for ppauth-0.1.2-cp311-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 9ff1f1915e80570227212e8788f772e7b1878964502714e1ca566f57aa9e10b4
MD5 58f24ab1891572577ef388bc814267b7
BLAKE2b-256 f892ffb9e38ee35c19b8ed13aba9a1759e1e0f04c7aace5471867d567c8426a4

See more details on using hashes here.

File details

Details for the file ppauth-0.1.2-cp310-abi3-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for ppauth-0.1.2-cp310-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 b023d956b016b4d31a1565621a7d428e4f0a807052f69ac47d4b623bef7d795b
MD5 158e35e5747115abdf3e19926449baad
BLAKE2b-256 710beb62e4533fae92dd04363ba10381aa5645e93aeeffea78c8aaf17fbbbba7

See more details on using hashes here.

File details

Details for the file ppauth-0.1.2-cp39-abi3-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for ppauth-0.1.2-cp39-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 872d9d70956b8e5c9b78ae8a2a81ee42ea44b5a470742318e98b5ec50ae68870
MD5 982c3a7ebdcd010d9fc2088a3405898b
BLAKE2b-256 7d3356d8521f480c16f47bce1bfa7bf82505f2630f1a81dc71d822ae14bdc4ec

See more details on using hashes here.

File details

Details for the file ppauth-0.1.2-cp38-abi3-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for ppauth-0.1.2-cp38-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 e06388a30790ac3194ae042d37971ac92fa9144643b2aca83a9d8211afd7e4f2
MD5 88232d552a0332c3b77d86270fc95711
BLAKE2b-256 a568ad9dff97291aed33323addea4f33e21d74b0f30bbca4ba087f083394143a

See more details on using hashes here.

File details

Details for the file ppauth-0.1.2-cp37-abi3-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for ppauth-0.1.2-cp37-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 bbae56a891e98cf5c79a79b11c789c8192c807f33c342ecc1f387a4f382b913f
MD5 35627467368cfbceab1c89815061db56
BLAKE2b-256 217ad4d50913b1fcce5c0e4f220e20535d07d27d6cc29b98f14867753677d5d9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page