We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 748c266 commit 4846971Copy full SHA for 4846971
1 file changed
README.md
@@ -29,6 +29,8 @@ pip install sqlalchemy_adapter
29
30
## Simple Example
31
32
+You can save and load policy to database.
33
+
34
```python
35
import sqlalchemy_adapter
36
import casbin
@@ -49,6 +51,22 @@ else:
49
51
pass
50
52
```
53
54
+By default, policies are stored in the `casbin_rule` table.
55
+You can custom the table where the policy is stored by using the `table_name` parameter.
56
57
+```python
58
59
+import sqlalchemy_adapter
60
+import casbin
61
62
+custom_table_name = "<custom_table_name>"
63
64
+# create adapter with custom table name.
65
+adapter = sqlalchemy_adapter.Adapter('sqlite:///test.db', table_name=custom_table_name)
66
67
+e = casbin.Enforcer('path/to/model.conf', adapter)
68
+```
69
70
71
### Getting Help
72
0 commit comments