-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(flask): adding flask decorators as a package extra (#291)
* feat(flask): adding flask decorators as a package extra * readme and omit coverage
- Loading branch information
Showing
14 changed files
with
252 additions
and
169 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"recommendations": [ | ||
"ms-python.python", | ||
"ms-python.black-formatter", | ||
"ms-python.flake8", | ||
"ms-python.isort", | ||
"ms-python.vscode-pylance", | ||
"ms-python.mypy-type-checker", | ||
"bodil.prettier-toml", | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,12 @@ Install the package with: | |
pip install descope | ||
``` | ||
|
||
#### If you would like to use the Flask decorators, make sure to install the Flask extras: | ||
|
||
```bash | ||
pip install descope[Flask] | ||
``` | ||
|
||
## Setup | ||
|
||
A Descope `Project ID` is required to initialize the SDK. Find it on the | ||
|
@@ -795,10 +801,13 @@ updated_jwt = descope_client.mgmt.jwt.update_jwt( | |
``` | ||
|
||
# Note 1: The generate code/link functions, work only for test users, will not work for regular users. | ||
|
||
# Note 2: In case of testing sign-in / sign-up operations with test users, need to make sure to generate the code prior calling the sign-in / sign-up operations. | ||
|
||
# Embedded links can be created to directly receive a verifiable token without sending it. | ||
|
||
# This token can then be verified using the magic link 'verify' function, either directly or through a flow. | ||
|
||
token = descope_client.mgmt.user.generate_embedded_link("[email protected]", {"key1":"value1"}) | ||
|
||
### Search Audit | ||
|
@@ -885,8 +894,9 @@ You can find various usage samples in the [samples folder](https://github.com/de | |
## Run Locally | ||
|
||
### Prerequisites | ||
- Python 3.7 or higher | ||
- [Poetry](https://python-poetry.org) installed | ||
|
||
- Python 3.7 or higher | ||
- [Poetry](https://python-poetry.org) installed | ||
|
||
### Install dependencies | ||
|
||
|
@@ -897,11 +907,13 @@ poetry install | |
### Run tests | ||
|
||
Running all tests: | ||
|
||
```bash | ||
poetry run pytest tests | ||
``` | ||
|
||
Running all tests with coverage: | ||
|
||
```bash | ||
poetry run pytest --junitxml=/tmp/pytest.xml --cov-report=term-missing:skip-covered --cov=descope tests/ --cov-report=xml:/tmp/cov.xml | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.