Skip to content

Commit 9073a88

Browse files
committed
Update README and generate-openapi.sh script for improved documentation links and formatting
1 parent 3440ff1 commit 9073a88

2 files changed

Lines changed: 15 additions & 12 deletions

File tree

README.md

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
# Corbado Python SDK
44

55
[![License](https://img.shields.io/badge/license-MIT-green)](./LICENSE)
6-
[![documentation](https://img.shields.io/badge/documentation-Corbado_Backend_API_Reference-blue.svg)](https://apireference.cloud.corbado.io/backendapi/)
6+
[![documentation](https://img.shields.io/badge/documentation-Corbado_Backend_API_Reference-blue.svg)](https://docs.corbado.com/api-reference/backend-api)
77
[![Slack](https://img.shields.io/badge/slack-join%20chat-brightgreen.svg)](https://join.slack.com/t/corbado/shared_invite/zt-1b7867yz8-V~Xr~ngmSGbt7IA~g16ZsQ)
88

9-
The [Corbado](https://www.corbado.com) Python SDK provides convenient access to the [Corbado Backend API](https://apireference.cloud.corbado.io/backendapi-v2/) from applications written in the Python language.
9+
The [Corbado](https://www.corbado.com) Python SDK provides convenient access to the [Corbado Backend API](https://docs.corbado.com/api-reference/backend-api) from applications written in the Python language.
1010

1111
[![integration-guides](https://github.com/user-attachments/assets/7859201b-a345-4b68-b336-6e2edcc6577b)](https://app.corbado.com/getting-started?search=python)
1212

@@ -56,7 +56,7 @@ To use a specific service, such as `users`, invoke it as shown below:
5656

5757
```Python
5858
user_service: UserService = sdk.users
59-
```
59+
```
6060

6161
## :books: Advanced
6262

@@ -82,7 +82,7 @@ except TokenValidationException:
8282
```
8383

8484
If the Backend API returns a HTTP status code other than 200, the Corbado Python SDK throws a `ServerException`. The `ServerException`class provides convenient methods to access all important data:
85-
sdk.users.get(user_id="usr-123456789")
85+
sdk.users.get(user_id="usr-123456789")
8686

8787
```Python
8888
try:
@@ -109,18 +109,22 @@ If the Backend API returns a HTTP status code other than 200, the Corbado Python
109109
print(f"Full error: {e.error}")
110110

111111
```
112+
112113
## Developer Setup
113114

114115
Create a virtual environment and install packages -
115-
``` console
116+
117+
```console
116118
python3 -m venv venv_name
117119
source venv_name/bin/activate
118120
pip install -r requirements-dev.txt
119121
```
122+
120123
(Add venv_name to "exclude" list in .flake8, otherwise flake8 will lint the generated venv)
121124

122125
Add environment variables for tests (use the test project from secrets repositoty) -
123-
``` console
126+
127+
```console
124128
export CORBADO_API_SECRET=corbado1_123456
125129
export CORBADO_PROJECT_ID=pro-123456
126130
export CORBADO_BACKEND_API="https://backendapi.cloud.corbado.io"
@@ -130,14 +134,15 @@ export CORBADO_BACKEND_API="https://backendapi.cloud.corbado.io"
130134

131135
Run all tests using -
132136

133-
``` console
137+
```console
134138
tox run -e py38
135139
```
136140

137-
The tox tests are configured to run on Python 3.8, 3.9, 3.10, 3.11, 3.12 (you need to remove "-e py38" tox argument)
141+
The tox tests are configured to run on Python 3.8, 3.9, 3.10, 3.11, 3.12 (you need to remove "-e py38" tox argument)
138142

139143
Run linting and mypy:
140-
``` console
144+
145+
```console
141146
mypy -p corbado_python_sdk --exclude generated --strict --disable-error-code attr-defined
142147
flake8 .
143148
```
@@ -150,8 +155,6 @@ Use VSCode with provided project/extentions configuration .vscode/settings.json
150155

151156
Use the recommended extentions from .vscode/extentions.json and explore their functionality to achieve expected code quality by integration tests:
152157

153-
154-
155158
## :speech_balloon: Support & Feedback
156159

157160
### Report an issue

scripts/generate-openapi.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ rm -rf ../../src/$SDK_PACKAGE_NAME/$GENERATED_PACKAGE_NAME
1414
mkdir -p ../../src/$SDK_PACKAGE_NAME/$GENERATED_PACKAGE_NAME
1515

1616

17-
#curl -s -O https://apireference.cloud.corbado.io/backendapi-v2/backend_api.yml use local files until the API specification is uploaded.
17+
#curl -s -O https://backendapi.cloud.corbado.io/v2/openapi.yaml use local files until the API specification is uploaded.
1818
docker pull openapitools/openapi-generator-cli
1919
docker run -v ${PWD}:/local --user $(id -u):$(id -g) openapitools/openapi-generator-cli generate -i /local/backend_api_public_v2.yml -g python -o /local --additional-properties=packageName=$SDK_PACKAGE_NAME.$GENERATED_PACKAGE_NAME,projectName=$GENERATED_PROJECT_NAME
2020

0 commit comments

Comments
 (0)