Metadata-Version: 2.4
Name: pyproxyauth
Version: 0.1.5
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Rust
Classifier: Operating System :: OS Independent
Classifier: Topic :: Internet :: Proxy Servers
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Intended Audience :: Developers
Summary: Python bindings for ProxyAuth authentication via Rust
Author: vBlackOut
License: Apache-2.0
Requires-Python: >=3.7
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM

# pyproxyauth 

A lightweight Python library to authenticate and retrieve tokens via ProxyAuth.  

## install 
```
pip install pyproxyauth
```

## usage

```
import pyproxyauth

pyproxyauth.auth(
    host="127.0.0.1", port=8080,
    username="admin", password="admin123"
)

token = pyproxyauth.token()
token = pyproxyauth.token(renew=True) # Automatically re-authenticates and returns a new token if the previous one has expired.
lease_token = pyproxyauth.lease_token()

print({"token": token, "expire_at": lease_token})

> {"expire_at": 16500,"token":"ZoHAauGmCyxjq6+1sfVbqy..."}
```

