datapunt-authorization-0.3.2
توضیحات
Datapunt authorization
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | datapunt-authorization-0.3.2 |
| نام | datapunt-authorization |
| نسخه کتابخانه | 0.3.2 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Amsterdam Datapunt |
| ایمیل نویسنده | datapunt.ois@amsterdam.nl |
| آدرس صفحه اصلی | https://github.com/DatapuntAmsterdam/authorization |
| آدرس اینترنتی | https://pypi.org/project/datapunt-authorization/ |
| مجوز | Mozilla Public License Version 2.0 |
Datapunt Authorization
======================
.. image:: https://img.shields.io/badge/python-3.4%2C%203.5%2C%203.6-blue.svg
:target: https://www.python.org/
.. image:: https://img.shields.io/badge/license-MPLv2.0-blue.svg
:target: https://www.mozilla.org/en-US/MPL/2.0/
---------------------
Interface to authorization logic in the backend of Amsterdam's (Netherlands)
open data distribution platform, [Datapunt](http://data.amsterdam.nl).
In Datapunt authorization levels associated with users are stored in a central
database. When a user accesses a resource she needs to provide a
cryptographically secure token. That token contains the user's authorization
level. The resource in turn uses that information to decide what information
the user can access.
Install
-------
::
$ pip install datapunt-authorization
In order to use this library you need to have access to a Postgress database.
Usage
-----
::
import authorization
import authorization_levels # pip install datapunt-authorization-levels
authzmap = authorization.AuthzMap(**psycopgconf)
if authzmap['myuser'] == authorization_levels.LEVEL_EMPLOYEE:
... # do some eployee-e things
Contribute
----------
Activate your virtualenv, install the egg in `editable` mode, and start coding:
::
$ source env/bin/activate
$ pip install -e .
Testing:
::
make test
Documentation
-------------
The docs can be found at [datapunt-authorization.readthedocs.io](https://datapunt-authorization.readthedocs.io).
نحوه نصب
نصب پکیج whl datapunt-authorization-0.3.2:
pip install datapunt-authorization-0.3.2.whl
نصب پکیج tar.gz datapunt-authorization-0.3.2:
pip install datapunt-authorization-0.3.2.tar.gz