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.1-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.1-cp312-cp312-manylinux_2_34_x86_64.whl (5.3 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

ppauth-0.1.1-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.1-cp311-cp311-manylinux_2_34_x86_64.whl (5.3 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

ppauth-0.1.1-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.1-cp310-cp310-manylinux_2_34_x86_64.whl (5.3 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.34+ x86-64

ppauth-0.1.1-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.1-cp39-cp39-manylinux_2_34_x86_64.whl (5.3 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.34+ x86-64

ppauth-0.1.1-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.1-cp38-cp38-manylinux_2_34_x86_64.whl (5.3 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.34+ x86-64

ppauth-0.1.1-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.1-cp37-cp37m-manylinux_2_34_x86_64.whl (5.3 MB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.34+ x86-64

ppauth-0.1.1-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.1-cp313-abi3-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for ppauth-0.1.1-cp313-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 cbb1dc78047f0746719d476d9a28d4a004b450c15c8e7f08eb05d8ce90b131c8
MD5 47d502f69b525f5d9b34cd3cae276ddf
BLAKE2b-256 630b574c1d82ff3f6beec22dad66e705f999748b42cfcd91ec6d63f4db3282e0

See more details on using hashes here.

File details

Details for the file ppauth-0.1.1-cp312-cp312-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for ppauth-0.1.1-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 c87afe248fc3d5b3747589d63993e1ac5f6393938dd7544aef439fe1eadbab66
MD5 d1576f423bda303fdfaa4ca947cea4ba
BLAKE2b-256 66257ab20dbd29557512972cc82344d75f82a5860f616e2284d12e5fcae76d02

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ppauth-0.1.1-cp312-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 a41ba8f4a7ee6646e40819eb486ba08d92bc711fa9eb22981d8a9eb4ad7fb639
MD5 981b6693a6737c49f4dfbeeb51a507b3
BLAKE2b-256 87ea688c7f863a45b727ebb686d8d2a3ba169b6674f7397bd1cbdb526f938f3a

See more details on using hashes here.

File details

Details for the file ppauth-0.1.1-cp311-cp311-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for ppauth-0.1.1-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 d70b7688026befde5fcfc0c1da180d1020791c8626deca5a1ae3d35395a01549
MD5 e062fbe056dfd7758d387f97f452eae9
BLAKE2b-256 9b322f3a420ce5d4e539ee1c103d7b4d2fdef77c428846fd1dcdc87ef8f0bd9c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ppauth-0.1.1-cp311-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 70be3e965a6cb84a245c3ae84b22fc975d78d1bb615cb771715685ae67407cb0
MD5 9f9e8dddbc98e83b7b760b2c122f7db9
BLAKE2b-256 388412b442d377eb523104a63592b95a6f1790586a206662cb4f063cd3a0e4e7

See more details on using hashes here.

File details

Details for the file ppauth-0.1.1-cp310-cp310-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for ppauth-0.1.1-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 60754a66998b111f842d912eb0ecc706781950862aa22a349037da2f42a1c2af
MD5 67f3ca719c994b41da7a3f20f46e6fe7
BLAKE2b-256 e93ce4da13137be44c8ab21b97ab0abafb224104fdb6142540f1704ca68ff5a2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ppauth-0.1.1-cp310-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 7141ccd1a28fbf768a9a8b264ac51d0a928566cda0f7705dc5a25a9d659ba8ca
MD5 0c730c3e77117d41bc493d8a71021453
BLAKE2b-256 bdcf778020b31c4f763204e90db83b5b091d364e76916ab5791ffee632b45062

See more details on using hashes here.

File details

Details for the file ppauth-0.1.1-cp39-cp39-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for ppauth-0.1.1-cp39-cp39-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 27b202dc88c075a310e505274e4c2cae6e085bfd30276edc80851bb8c67f526d
MD5 ffa98bc759e12ba413d29e73ddd3b5ac
BLAKE2b-256 ed9a1c00965a2e0e57cfaa2d13923300de837fce1d967febe5dd85f70a22a59d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ppauth-0.1.1-cp39-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 1c5f8209f32716dd470d3706cf0fb5a38aaf16e53b5bd5fc6f2b081a8d3e7032
MD5 9d586ad5d45b590a4a321bf6c85ca5ed
BLAKE2b-256 d4a1964143f4157a5fd6e3bf2b0aef39745fba41d568e42cbcfdcb1f3aacccc4

See more details on using hashes here.

File details

Details for the file ppauth-0.1.1-cp38-cp38-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for ppauth-0.1.1-cp38-cp38-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 59ee695f324b5197321840402dd17392f7e81b92737fd74a151c5c9f32f5af1c
MD5 534e564bb7c9a7fa07b25639917a0a4c
BLAKE2b-256 2d1a25b1d5cdd9c0764b081caff0eaf4ce9b9a61093443bf352a06c9b30b2252

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ppauth-0.1.1-cp38-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 70a24654cb77823593862f6f73275ac7bc82ef73467245e639c48a13555599fa
MD5 68e4538eebdb7cb3f9b1f26f6cbe795c
BLAKE2b-256 b7e5a867dba971bdfaaad758512a1a0d5c6be37a1819c017505c86cf595192fa

See more details on using hashes here.

File details

Details for the file ppauth-0.1.1-cp37-cp37m-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for ppauth-0.1.1-cp37-cp37m-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 e533144d359b18fc8112c164611ae20b1eac41e2c74ecf5ae85b1e0d3cde29f4
MD5 cd671bd542f5ed0f12eca6977dbe61b0
BLAKE2b-256 f4b74e0b356a0cc748dd2cc57937b5ecf7660bd8d411e89ab5543f9e18666d4e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for ppauth-0.1.1-cp37-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 63b900b63a3f030abb8fe56c8eed3e9f03e93f295571adf40d81292519d4140d
MD5 ff3d6d973a7b2bae01e861149d1c1e11
BLAKE2b-256 b708e386f0cba05fcf47dac83e21a0eee3d7d7a5f0a67a4ef52ac409cc859aff

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