{"id":22959839,"url":"https://github.com/pycasbin/sqlobject-adapter","last_synced_at":"2025-08-13T05:32:39.928Z","repository":{"id":62560946,"uuid":"165790876","full_name":"pycasbin/sqlobject-adapter","owner":"pycasbin","description":"SQLObject Adapter for PyCasbin","archived":false,"fork":false,"pushed_at":"2024-04-12T14:06:00.000Z","size":20,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-13T21:43:42.425Z","etag":null,"topics":["abac","acl","adapter","auth","authorization","authz","casbin","orm","pycasbin","python","rbac","sql","sqlobject","storage-driver"],"latest_commit_sha":null,"homepage":"https://github.com/casbin/pycasbin","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pycasbin.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2019-01-15T05:29:43.000Z","updated_at":"2024-03-28T16:34:29.000Z","dependencies_parsed_at":"2024-04-11T18:24:39.937Z","dependency_job_id":"0297c9d9-fb6a-4d0b-b206-41bc0cc7dc42","html_url":"https://github.com/pycasbin/sqlobject-adapter","commit_stats":{"total_commits":6,"total_committers":2,"mean_commits":3.0,"dds":"0.33333333333333337","last_synced_commit":"4a79a24366251e8f104d463674e351a2b48b152a"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pycasbin%2Fsqlobject-adapter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pycasbin%2Fsqlobject-adapter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pycasbin%2Fsqlobject-adapter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pycasbin%2Fsqlobject-adapter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pycasbin","download_url":"https://codeload.github.com/pycasbin/sqlobject-adapter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229740039,"owners_count":18116882,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["abac","acl","adapter","auth","authorization","authz","casbin","orm","pycasbin","python","rbac","sql","sqlobject","storage-driver"],"created_at":"2024-12-14T18:29:00.113Z","updated_at":"2024-12-14T18:29:00.886Z","avatar_url":"https://github.com/pycasbin.png","language":"Python","readme":"SQLObject Adapter for PyCasbin\r\n====\r\n\r\n[![GitHub Action](https://github.com/pycasbin/sqlobject-adapter/workflows/build/badge.svg)](https://github.com/pycasbin/sqlobject-adapter/actions)\r\n[![Coverage Status](https://coveralls.io/repos/github/pycasbin/sqlobject-adapter/badge.svg)](https://coveralls.io/github/pycasbin/sqlobject-adapter)\r\n[![Version](https://img.shields.io/pypi/v/casbin_sqlobject_adapter.svg)](https://pypi.org/project/casbin_sqlobject_adapter/)\r\n[![PyPI - Wheel](https://img.shields.io/pypi/wheel/casbin_sqlobject_adapter.svg)](https://pypi.org/project/casbin_sqlobject_adapter/)\r\n[![Pyversions](https://img.shields.io/pypi/pyversions/casbin_sqlobject_adapter.svg)](https://pypi.org/project/casbin_sqlobject_adapter/)\r\n[![Download](https://img.shields.io/pypi/dm/casbin_sqlobject_adapter.svg)](https://pypi.org/project/casbin_sqlobject_adapter/)\r\n[![License](https://img.shields.io/pypi/l/casbin_sqlobject_adapter.svg)](https://pypi.org/project/casbin_sqlobject_adapter/)\r\n\r\nSQLObject Adapter is the [SQLObject](http://www.sqlobject.org/index.html) adapter for [PyCasbin](https://github.com/casbin/pycasbin). With this library, Casbin can load policy from SQLObject supported database or save policy to it.\r\n\r\nThe current supported databases are:\r\n\r\n- PostgreSQL\r\n- MySQL\r\n- SQLite\r\n- Microsoft SQL Server\r\n- Firebird\r\n- Sybase\r\n- MAX DB\r\n- pyfirebirdsql\r\n\r\n## Installation\r\n\r\n```\r\npip install casbin_sqlobject_adapter\r\n```\r\n\r\n## Simple Example\r\n\r\n```python\r\nimport casbin_sqlobject_adapter\r\nimport casbin\r\n\r\nadapter = casbin_sqlobject_adapter.Adapter('sqlite:///test.db')\r\n\r\ne = casbin.Enforcer('path/to/model.conf', adapter, True)\r\n\r\nsub = \"alice\"  # the user that wants to access a resource.\r\nobj = \"data1\"  # the resource that is going to be accessed.\r\nact = \"read\"  # the operation that the user performs on the resource.\r\n\r\nif e.enforce(sub, obj, act):\r\n    # permit alice to read data1casbin_sqlalchemy_adapter\r\n    pass\r\nelse:\r\n    # deny the request, show an error\r\n    pass\r\n```\r\n\r\n\r\n### Getting Help\r\n\r\n- [PyCasbin](https://github.com/casbin/pycasbin)\r\n\r\n### License\r\n\r\nThis project is licensed under the [Apache 2.0 license](LICENSE).\r\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpycasbin%2Fsqlobject-adapter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpycasbin%2Fsqlobject-adapter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpycasbin%2Fsqlobject-adapter/lists"}