semvec/pypi-packages huggingface dataset:
authrio 21.2.2
Python wrapper to manage users and organisations utilizing the Authrio platform 🔒
License: MIT
Requires Python: >=3.8,<4.0

# Authrio.py

Python wrapper to manage users and organisations utilizing the Authrio platform 🔒

## Installation

Simply download the latest available installation from PyPi:

```shell
$ pip install authrio.py
```

Every publicly-available function within Authrio.py is fully documented, with examples included.

## Examples

Demo using Flask:

```python
from flask import Flask, request
from authrio import Org, User, BadUserCreds

org = Org.create("qwerty123")
app = Flask(__name__)

@app.route("/protected")
def protected():
    try:
        user = org.auth(request.cookies.get("AUTHRIO_KEY"))
        return f"User {user.id} was created at {user.created}!"
    except BadUserCreds:
        return "Invalid/outdated api key passed!"

@app.route("/signup")
def signup():
    try:
        user = User.create(org, request.args["password"])
        return f"Created user {user.id} at {user.created}!"
    except BadUserCreds:
        return "Password too short/long!"

app.run()
```

You can also check out the [`examples/`](https://github.com/Owez/authrio/tree/master/examples) directory in the main Authrio repository for some more showcases in Authrio.py and various other languages 📚