SAuth is a python3 package which provides a simple authentification system for bottle. Inspired bu cork-bottle but much more simpler.

Leo VIALLON-GALINIER be0a5f5e99 Correcting user name in logging 4 years ago
sauth be0a5f5e99 Correcting user name in logging 4 years ago
users 6dc68ff8ac First commit 4 years ago
views 6dc68ff8ac First commit 4 years ago
README.md f8be6bf3fe Add Readme file 4 years ago
adduser.py 6dc68ff8ac First commit 4 years ago
example.py 6dc68ff8ac First commit 4 years ago

README.md

SAuth : a simple auth add-on for bottle

SAuth is a simple package to make authentification on bottle websites. It is inspired from cork but much more simple. It provides an authentification class, and a decorator.

The package is written for python3. It depends only on bottle and hashlib.

It allows filtering access by role and user.

Storing users

The class is not specific of a storing method as it call a backend for authentification. Currently only the JSON backend is written, so it is the default one. Users are stored in a JSON file (by default users/users.json) whereas available roles are stored in users/roles.json.

Getting startd

An example is proposed. You have to create a sessions folder to allow bottle to manage sessions. Then, just run example.py.

The adduser.py routine allow to create users and save into the users JSON file. The example users file contains two users : user with password user and admin with password admin.

To use in your project, just copy the sauth folder into your project directory !