From 52fa64e66de2089e87fd25da8515feb73747e064 Mon Sep 17 00:00:00 2001 From: Yang Luo Date: Wed, 25 Oct 2023 15:14:51 +0800 Subject: [PATCH] fix: add requirements.txt --- requirements.txt | 6 ++++++ src/casdoor/adapter.py | 2 +- src/casdoor/application.py | 3 +-- src/casdoor/cert.py | 1 - src/casdoor/enforcer.py | 2 +- src/casdoor/group.py | 3 +-- src/casdoor/main.py | 1 + src/casdoor/model.py | 3 +-- src/casdoor/organization.py | 2 +- src/casdoor/payment.py | 2 +- src/casdoor/permisssion.py | 2 +- src/casdoor/plan.py | 2 +- src/casdoor/pricing.py | 2 +- src/casdoor/product.py | 2 +- src/casdoor/provider.py | 2 +- src/casdoor/resource.py | 2 +- src/casdoor/role.py | 2 +- src/casdoor/session.py | 2 +- src/casdoor/subscription.py | 2 +- src/casdoor/syncer.py | 2 +- src/casdoor/token.py | 2 +- src/casdoor/user.py | 2 +- src/casdoor/webhook.py | 3 +-- src/tests/test_async_oauth.py | 2 +- src/tests/test_oauth.py | 2 +- 25 files changed, 29 insertions(+), 27 deletions(-) create mode 100644 requirements.txt diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..554ffb7 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,6 @@ +aiohttp~=3.8.6 +cryptography~=41.0.5 +PyJWT~=2.8.0 +requests~=2.31.0 +setuptools~=68.2.0 +yarl~=1.9.2 diff --git a/src/casdoor/adapter.py b/src/casdoor/adapter.py index dbdf544..aad73b8 100644 --- a/src/casdoor/adapter.py +++ b/src/casdoor/adapter.py @@ -11,9 +11,9 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + import json from typing import Dict, List - import requests diff --git a/src/casdoor/application.py b/src/casdoor/application.py index 24e8f6a..bafccec 100644 --- a/src/casdoor/application.py +++ b/src/casdoor/application.py @@ -11,11 +11,10 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + import json from typing import Dict, List - import requests - from .organization import Organization, ThemeData from .provider import Provider diff --git a/src/casdoor/cert.py b/src/casdoor/cert.py index 3250728..60fb96c 100644 --- a/src/casdoor/cert.py +++ b/src/casdoor/cert.py @@ -14,7 +14,6 @@ import json from typing import Dict, List - import requests diff --git a/src/casdoor/enforcer.py b/src/casdoor/enforcer.py index c07094d..ea0fba8 100644 --- a/src/casdoor/enforcer.py +++ b/src/casdoor/enforcer.py @@ -11,9 +11,9 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + import json from typing import Dict, List - import requests diff --git a/src/casdoor/group.py b/src/casdoor/group.py index b33810a..2af40e7 100644 --- a/src/casdoor/group.py +++ b/src/casdoor/group.py @@ -11,11 +11,10 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + import json from typing import Dict, List - import requests - from .user import User diff --git a/src/casdoor/main.py b/src/casdoor/main.py index fa2e059..535a845 100644 --- a/src/casdoor/main.py +++ b/src/casdoor/main.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + from typing import Dict, List, Optional import jwt diff --git a/src/casdoor/model.py b/src/casdoor/model.py index 04658c2..9865afd 100644 --- a/src/casdoor/model.py +++ b/src/casdoor/model.py @@ -11,11 +11,10 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + import json from typing import Dict, List - import requests - from .user import User diff --git a/src/casdoor/organization.py b/src/casdoor/organization.py index 99081e9..92cba65 100644 --- a/src/casdoor/organization.py +++ b/src/casdoor/organization.py @@ -11,9 +11,9 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + import json from typing import Dict, List - import requests diff --git a/src/casdoor/payment.py b/src/casdoor/payment.py index 9d4f9b1..ae40a7d 100644 --- a/src/casdoor/payment.py +++ b/src/casdoor/payment.py @@ -11,9 +11,9 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + import json from typing import Dict, List - import requests diff --git a/src/casdoor/permisssion.py b/src/casdoor/permisssion.py index 1834804..0397f67 100644 --- a/src/casdoor/permisssion.py +++ b/src/casdoor/permisssion.py @@ -11,9 +11,9 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + import json from typing import Dict, List - import requests diff --git a/src/casdoor/plan.py b/src/casdoor/plan.py index f0ce00e..3c499f0 100644 --- a/src/casdoor/plan.py +++ b/src/casdoor/plan.py @@ -11,9 +11,9 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + import json from typing import Dict, List - import requests diff --git a/src/casdoor/pricing.py b/src/casdoor/pricing.py index 8dc5fd9..11077d0 100644 --- a/src/casdoor/pricing.py +++ b/src/casdoor/pricing.py @@ -11,9 +11,9 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + import json from typing import Dict, List - import requests diff --git a/src/casdoor/product.py b/src/casdoor/product.py index d815708..1b695c3 100644 --- a/src/casdoor/product.py +++ b/src/casdoor/product.py @@ -11,9 +11,9 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + import json from typing import Dict, List - import requests from .provider import Provider diff --git a/src/casdoor/provider.py b/src/casdoor/provider.py index 3f891b7..2c30140 100644 --- a/src/casdoor/provider.py +++ b/src/casdoor/provider.py @@ -11,9 +11,9 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + import json from typing import Dict, List - import requests diff --git a/src/casdoor/resource.py b/src/casdoor/resource.py index 9435a9e..6fb5e00 100644 --- a/src/casdoor/resource.py +++ b/src/casdoor/resource.py @@ -11,9 +11,9 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + import json from typing import Dict, List - import requests diff --git a/src/casdoor/role.py b/src/casdoor/role.py index 7459404..b4a773d 100644 --- a/src/casdoor/role.py +++ b/src/casdoor/role.py @@ -11,9 +11,9 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + import json from typing import Dict, List - import requests diff --git a/src/casdoor/session.py b/src/casdoor/session.py index 2973547..2b9e885 100644 --- a/src/casdoor/session.py +++ b/src/casdoor/session.py @@ -11,9 +11,9 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + import json from typing import Dict, List - import requests diff --git a/src/casdoor/subscription.py b/src/casdoor/subscription.py index 88f06bf..2b5cd2d 100644 --- a/src/casdoor/subscription.py +++ b/src/casdoor/subscription.py @@ -11,10 +11,10 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + import json from datetime import datetime from typing import Dict, List - import requests diff --git a/src/casdoor/syncer.py b/src/casdoor/syncer.py index 2f4034c..27b0995 100644 --- a/src/casdoor/syncer.py +++ b/src/casdoor/syncer.py @@ -11,9 +11,9 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + import json from typing import Dict, List - import requests diff --git a/src/casdoor/token.py b/src/casdoor/token.py index 0be02dd..daddb12 100644 --- a/src/casdoor/token.py +++ b/src/casdoor/token.py @@ -11,9 +11,9 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + import json from typing import Dict, List - import requests diff --git a/src/casdoor/user.py b/src/casdoor/user.py index 12a2396..b4634d5 100644 --- a/src/casdoor/user.py +++ b/src/casdoor/user.py @@ -11,9 +11,9 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + import json from typing import Dict, List - import requests diff --git a/src/casdoor/webhook.py b/src/casdoor/webhook.py index 709c8c5..b1812e2 100644 --- a/src/casdoor/webhook.py +++ b/src/casdoor/webhook.py @@ -11,11 +11,10 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + import json from typing import Dict, List - import requests - from .syncer import TableColumn diff --git a/src/tests/test_async_oauth.py b/src/tests/test_async_oauth.py index 6110679..54c039d 100644 --- a/src/tests/test_async_oauth.py +++ b/src/tests/test_async_oauth.py @@ -38,7 +38,7 @@ class TestOAuth(IsolatedAsyncioTestCase): @staticmethod def get_sdk(): sdk = AsyncCasdoorSDK( - endpoint="http://test.casbin.com:8000", + endpoint="https://demo.casdoor.com", client_id="3267f876b11e7d1cb217", client_secret="3f0d1f06d28d65309c8f38b505cb9dcfa487754d", certificate="CasdoorSecret", diff --git a/src/tests/test_oauth.py b/src/tests/test_oauth.py index cde5950..e1fcb00 100644 --- a/src/tests/test_oauth.py +++ b/src/tests/test_oauth.py @@ -40,7 +40,7 @@ class TestOAuth(TestCase): @staticmethod def get_sdk(): sdk = CasdoorSDK( - endpoint="http://test.casbin.com:8000", + endpoint="https://demo.casdoor.com", client_id="3267f876b11e7d1cb217", client_secret="3f0d1f06d28d65309c8f38b505cb9dcfa487754d", certificate="CasdoorSecret",