Skip to content

Commit 6fc0a68

Browse files
committed
fix: fix package
1 parent 191c6f1 commit 6fc0a68

6 files changed

Lines changed: 29 additions & 79 deletions

File tree

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ python setup.py install
1313
```
1414

1515
## Quickstart
16+
1617
This middleware is designed to work with another middleware which implement `AuthenticationMiddleware` interface.
18+
1719
```python
1820
import base64
1921
import binascii
@@ -60,10 +62,13 @@ async def index():
6062
async def auth_test():
6163
return "You must be alice to see this."
6264
```
65+
6366
- anonymous request
67+
6468
```bash
6569
curl -i http://127.0.0.1:8000/dataset1/protected
6670
```
71+
6772
```bash
6873
HTTP/1.1 403 Forbidden
6974
date: Mon, 01 Mar 2021 09:00:08 GMT
@@ -75,6 +80,7 @@ content-type: application/json
7580
```
7681

7782
- authenticated request
83+
7884
```bash
7985
curl -i -u alice:password http://127.0.0.1:8000/dataset1/protected
8086
```
@@ -91,7 +97,7 @@ content-type: application/json
9197

9298
It used the casbin config from `examples` folder, and you can find this demo in `demo` folder.
9399

94-
You can also view the unit tests to understand this middleware.
100+
You can also view the unit tests to understand this middleware.
95101

96102
## Development
97103

dev-requirements.in

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ pytest
44
pip-tools
55
pytest-cov
66
coverage
7-
pypi-publisher
87
bumpversion
98
uvicorn
109
starlette-auth-toolkit
11-
requests
10+
requests
11+
twine
12+
build

dev-requirements.txt

Lines changed: 15 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,85 +1,44 @@
1-
#
2-
# This file is autogenerated by pip-compile
3-
# To update, run:
4-
#
5-
# pip-compile dev-requirements.in
6-
#
7-
--index-url https://mirrors.aliyun.com/pypi/simple/
8-
91
atomicwrites==1.4.0
10-
# via pytest
112
attrs==20.3.0
12-
# via pytest
3+
bleach==3.3.0
4+
build==0.3.0
135
bump2version==1.0.1
14-
# via bumpversion
156
bumpversion==0.6.0
16-
# via -r dev-requirements.in
177
casbin==0.18.1
18-
# via -r dev-requirements.in
198
certifi==2020.12.5
20-
# via requests
219
chardet==4.0.0
22-
# via requests
2310
click==7.1.2
24-
# via
25-
# pip-tools
26-
# uvicorn
2711
colorama==0.4.4
28-
# via pytest
2912
coverage==5.4
30-
# via
31-
# -r dev-requirements.in
32-
# pytest-cov
13+
docutils==0.16
3314
fastapi==0.63.0
34-
# via -r dev-requirements.in
35-
gitdb==4.0.5
36-
# via gitpython
37-
gitpython==0.3.6
38-
# via pypi-publisher
3915
h11==0.12.0
40-
# via uvicorn
4116
idna==2.10
42-
# via requests
4317
iniconfig==1.1.1
44-
# via pytest
18+
keyring==22.3.0
4519
packaging==20.9
46-
# via pytest
20+
pep517==0.9.1
4721
pip-tools==5.5.0
48-
# via -r dev-requirements.in
22+
pkginfo==1.7.0
4923
pluggy==0.13.1
50-
# via pytest
5124
py==1.10.0
52-
# via pytest
5325
pydantic==1.7.3
54-
# via fastapi
26+
pygments==2.8.0
5527
pyparsing==2.4.7
56-
# via packaging
57-
pypi-publisher==0.0.4
58-
# via -r dev-requirements.in
5928
pytest-cov==2.11.1
60-
# via -r dev-requirements.in
6129
pytest==6.2.2
62-
# via
63-
# -r dev-requirements.in
64-
# pytest-cov
30+
pywin32-ctypes==0.2.0
31+
readme-renderer==29.0
32+
requests-toolbelt==0.9.1
6533
requests==2.25.1
66-
# via -r dev-requirements.in
34+
rfc3986==1.4.0
6735
simpleeval==0.9.10
68-
# via casbin
69-
smmap==3.0.5
70-
# via gitdb
36+
six==1.15.0
7137
starlette-auth-toolkit==0.5.0
72-
# via -r dev-requirements.in
7338
starlette==0.13.6
74-
# via
75-
# fastapi
76-
# starlette-auth-toolkit
7739
toml==0.10.2
78-
# via pytest
40+
tqdm==4.58.0
41+
twine==3.3.0
7942
urllib3==1.26.3
80-
# via requests
8143
uvicorn==0.13.4
82-
# via -r dev-requirements.in
83-
84-
# The following packages are considered to be unsafe in a requirements file:
85-
# pip
44+
webencodings==0.5.1

requirements.txt

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,5 @@
1-
#
2-
# This file is autogenerated by pip-compile
3-
# To update, run:
4-
#
5-
# pip-compile requirements.in
6-
#
7-
81
casbin==0.18.1
9-
# via -r requirements.in
102
fastapi==0.63.0
11-
# via -r requirements.in
123
pydantic==1.7.3
13-
# via fastapi
144
simpleeval==0.9.10
15-
# via casbin
165
starlette==0.13.6
17-
# via fastapi

setup.cfg

Lines changed: 0 additions & 5 deletions
This file was deleted.

setup.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
from setuptools import setup, find_packages
2-
from codecs import open
32
from os import path
43

5-
__version__ = "0.0.1"
4+
__version__ = "0.0.2"
65
desc_file = "README.md"
76

87
here = path.abspath(path.dirname(__file__))
@@ -11,6 +10,8 @@
1110
with open(path.join(here, desc_file), encoding="utf-8") as f:
1211
long_description = f.read()
1312

13+
print(long_description)
14+
1415
# get the dependencies and installs
1516
with open(path.join(here, "requirements.txt"), encoding="utf-8") as f:
1617
all_reqs = f.read().split("\n")
@@ -26,7 +27,7 @@
2627
description="An authorization middleware for FastAPI that supports ACL, RBAC, ABAC, based on PyCasbin",
2728
long_description=long_description,
2829
long_description_content_type="text/markdown",
29-
author=["Zxilly"],
30+
author="Zxilly",
3031
author_email="zhouxinyu1001@gmail.com",
3132
url="https://github.com/pycasbin/fastapi-authz",
3233
download_url="https://github.com/pycasbin/fastapi-authz/tarball/" + __version__,

0 commit comments

Comments
 (0)