Sqlalchemy Adapter

SQLAlchemy Adapter for PyCasbin
Alternatives To Sqlalchemy Adapter
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Sqlalchemy Cockroachdb1258a month ago13September 09, 202214apache-2.0Python
SQLAlchemy adapter for CockroachDB
Sqlalchemy Adapter63
4 months ago12September 09, 2021apache-2.0Python
SQLAlchemy Adapter for PyCasbin
Sqlalchemy Ibmi16
a year ago11apache-2.0Python
Db2 for i SQL Alchemy adapter
Mobilitydb Python10
6 months agoPython
Python driver for MobilityDB
Pgawedge6
5 years agomitPython
Postgresql Sqlalchemy adapter
Products.sqlalchemyda2
a month ago2otherPython
SQLAlchemyDA is a generic database adapter for ZSQL methods. Since it is based on SQLAlchemy, SQLAlchemyDA supports all databases out-of-the box that are supported by SQLAlchemy (Postgres, MySQL, Oracle, SQLite, MS-SQL, Firebird, Informix).
Alternatives To Sqlalchemy Adapter
Select To Compare


Alternative Project Comparisons
Readme

SQLAlchemy Adapter for PyCasbin

GitHub Actions Coverage Status Version PyPI - Wheel Pyversions Download License

SQLAlchemy Adapter is the SQLAlchemy adapter for PyCasbin. With this library, Casbin can load policy from SQLAlchemy supported database or save policy to it.

Based on Officially Supported Databases, The current supported databases are:

  • PostgreSQL
  • MySQL
  • SQLite
  • Oracle
  • Microsoft SQL Server
  • Firebird
  • Sybase

Installation

pip install casbin_sqlalchemy_adapter

Simple Example

import casbin_sqlalchemy_adapter
import casbin

adapter = casbin_sqlalchemy_adapter.Adapter('sqlite:///test.db')

e = casbin.Enforcer('path/to/model.conf', adapter)

sub = "alice"  # the user that wants to access a resource.
obj = "data1"  # the resource that is going to be accessed.
act = "read"  # the operation that the user performs on the resource.

if e.enforce(sub, obj, act):
    # permit alice to read data1
    pass
else:
    # deny the request, show an error
    pass

Getting Help

License

This project is licensed under the Apache 2.0 license.

Popular Adapter Projects
Popular Sqlalchemy Projects
Popular Libraries Categories
Related Searches

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
Python
Databases
Auth
Permissions
Adapter
Orm
Sqlalchemy
Sql Server
Acl
Access Control
Firebird
Casbin
Abac