GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - apache/casbin-python-sqlobject-adapter: SQLObject Adapter for PyCasbin

BranchesTags
Open more actions menu

Latest commit

 

History

17 Commits
17 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
sqlobject_adapter
sqlobject_adapter
 
 
tests
tests
 
 
.gitignore
.gitignore
 
 
.releaserc.json
.releaserc.json
 
 
CHANGELOG.md
CHANGELOG.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
package.json
package.json
 
 
pyproject.toml
pyproject.toml
 
 
requirements.txt
requirements.txt
 
 

Repository files navigation

SQLObject Adapter for PyCasbin

GitHub Action Coverage Status Version PyPI - Wheel Pyversions Download License

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

The current supported databases are:

  • PostgreSQL
  • MySQL
  • SQLite
  • Microsoft SQL Server
  • Firebird
  • Sybase
  • MAX DB
  • pyfirebirdsql

Installation

pip install sqlobject_adapter

Simple Example

import sqlobject_adapter
import casbin

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

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

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 data1casbin_sqlalchemy_adapter
    pass
else:
    # deny the request, show an error
    pass

Getting Help

  • PyCasbin

License

This project is licensed under the Apache 2.0 license.

About

SQLObject Adapter for PyCasbin

github.com/casbin/pycasbin

Topics

abacacladapterauthauthzcasbinormpycasbinpythonrbacsqlsqlobject

Resources

Readme
Apache-2.0 license

Code of conduct

Code of conduct

Security policy

Security policy
Activity
Custom properties

Stars

0 stars

Watchers

2 watching

Forks

1 fork
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.