Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/alexferl/falcon-casbin

Casbin RBAC Middleware for Falcon
https://github.com/alexferl/falcon-casbin

casbin falcon falcon-framework falcon-middleware python-falcon rbac

Last synced: about 1 month ago
JSON representation

Casbin RBAC Middleware for Falcon

Awesome Lists containing this project

README

        

# falcon-casbin [![codecov](https://codecov.io/gh/alexferl/falcon-casbin/branch/master/graph/badge.svg)](https://codecov.io/gh/alexferl/falcon-casbin)

A simple [Falcon](https://github.com/falconry/falcon) module for [Casbin](https://casbin.org/) using
[RBAC](https://casbin.org/docs/en/rbac).

## Install
```shell
pip install falcon-casbin
```

## Usage
```python
import falcon
from falcon_casbin import CasbinMiddleware

casbin = CasbinMiddleware("path/to/model.conf", "path/to/policy.csv")

app = falcon.App(middleware=[casbin])
```

## Credits
Inspired by [falcon-policy](https://github.com/falconry/falcon-policy).