Skip to main content
Archived

This project has been archived by its maintainers, and is no longer receiving any updates.

https://img.shields.io/badge/python-3.4%2C%203.5%2C%203.6-blue.svg https://img.shields.io/badge/license-MPLv2.0-blue.svg

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).

Release files for datapunt-authorization 0.3.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for datapunt-authorization 0.3.2
File Size Uploaded
datapunt-authorization-0.3.2.tar.gz 6.1 kB Details

Release files / datapunt-authorization-0.3.2.tar.gz

Download URL datapunt-authorization-0.3.2.tar.gz
Size 6.1 kB
Tags Source
SHA-256 checksum
How to use checksums
cc46679f31efa0e65da5aee733617a38484e3cee64959ef8a2ca52bdd455f5f9
BLAKE2b-256 checksum
How to use checksums
7f500c01dbb96eb49c736caa7f2fc4e47169fb3a611102c5aa08c3c27c4fcca1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page