Skip to content

Commit

Permalink
feat: update path
Browse files Browse the repository at this point in the history
  • Loading branch information
hsluoyz committed Oct 26, 2024
1 parent 9ad0414 commit 7de8ac4
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[run]
include = casbin_sqlalchemy_adapter/*
include = sqlalchemy_adapter/*
2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include README.md
include requirements.txt
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ SQLAlchemy Adapter for PyCasbin

[![GitHub Actions](https://github.com/officialpycasbin/sqlalchemy-adapter/workflows/build/badge.svg?branch=master)](https://github.com/officialpycasbin/sqlalchemy-adapter/actions)
[![Coverage Status](https://coveralls.io/repos/github/officialpycasbin/sqlalchemy-adapter/badge.svg)](https://coveralls.io/github/officialpycasbin/sqlalchemy-adapter)
[![Version](https://img.shields.io/pypi/v/casbin_sqlalchemy_adapter.svg)](https://pypi.org/project/casbin_sqlalchemy_adapter/)
[![PyPI - Wheel](https://img.shields.io/pypi/wheel/casbin_sqlalchemy_adapter.svg)](https://pypi.org/project/casbin_sqlalchemy_adapter/)
[![Pyversions](https://img.shields.io/pypi/pyversions/casbin_sqlalchemy_adapter.svg)](https://pypi.org/project/casbin_sqlalchemy_adapter/)
[![Download](https://img.shields.io/pypi/dm/casbin_sqlalchemy_adapter.svg)](https://pypi.org/project/casbin_sqlalchemy_adapter/)
[![License](https://img.shields.io/pypi/l/casbin_sqlalchemy_adapter.svg)](https://pypi.org/project/casbin_sqlalchemy_adapter/)
[![Version](https://img.shields.io/pypi/v/sqlalchemy-adapter.svg)](https://pypi.org/project/sqlalchemy-adapter/)
[![PyPI - Wheel](https://img.shields.io/pypi/wheel/sqlalchemy-adapter.svg)](https://pypi.org/project/sqlalchemy-adapter/)
[![Pyversions](https://img.shields.io/pypi/pyversions/sqlalchemy-adapter.svg)](https://pypi.org/project/sqlalchemy-adapter/)
[![Download](https://img.shields.io/pypi/dm/sqlalchemy-adapter.svg)](https://pypi.org/project/sqlalchemy-adapter/)
[![License](https://img.shields.io/pypi/l/sqlalchemy-adapter.svg)](https://pypi.org/project/sqlalchemy-adapter/)

SQLAlchemy Adapter is the [SQLAlchemy](https://www.sqlalchemy.org) adapter for [PyCasbin](https://github.com/casbin/pycasbin). With this library, Casbin can load policy from SQLAlchemy supported database or save policy to it.

Expand All @@ -24,16 +24,16 @@ Based on [Officially Supported Databases](http://www.sqlalchemy.org/), The curre
## Installation

```
pip install casbin_sqlalchemy_adapter
pip install sqlalchemy_adapter
```

## Simple Example

```python
import casbin_sqlalchemy_adapter
import sqlalchemy_adapter
import casbin

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

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

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
install_requires = [x.strip() for x in all_reqs if "git+" not in x]

setup(
name="casbin_sqlalchemy_adapter",
name="sqlalchemy_adapter",
author="Casbin",
author_email="admin@casbin.org",
description="SQLAlchemy Adapter for PyCasbin",
Expand Down
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions tests/test_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
from sqlalchemy import create_engine, Column, Integer, String
from sqlalchemy.orm import sessionmaker

from casbin_sqlalchemy_adapter import Adapter
from casbin_sqlalchemy_adapter import Base
from casbin_sqlalchemy_adapter import CasbinRule
from casbin_sqlalchemy_adapter.adapter import Filter
from sqlalchemy_adapter import Adapter
from sqlalchemy_adapter import Base
from sqlalchemy_adapter import CasbinRule
from sqlalchemy_adapter.adapter import Filter


def get_fixture(path):
Expand Down

0 comments on commit 7de8ac4

Please sign in to comment.