Skip to content

Commit 16e7aa6

Browse files
Merge pull request #475 from kinde-oss/Fix/Python-links-and-headings
Fix/python links and headings. Small copyedit and cross reference fixes.
2 parents a13e3a3 + 8034002 commit 16e7aa6

File tree

2 files changed

+32
-24
lines changed

2 files changed

+32
-24
lines changed

src/content/docs/developer-tools/sdks/backend/python-sdk-v1.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ relatedArticles:
88
- 02d02820-92da-4721-9a91-222c9b095869
99
---
1010

11+
<Aside type="warning">
12+
13+
This SDK has been superseded by a [new version](/developer-tools/sdks/backend/python-sdk/).
14+
15+
</Aside>
16+
1117
The Kinde Python SDK allows developers to quickly and securely integrate a new or an existing Python application into the Kinde platform.
1218

1319
## Before you begin

src/content/docs/developer-tools/sdks/backend/python-sdk.mdx

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ The Kinde Python SDK allows developers to quickly and securely integrate a new o
1717
- Kinde Python SDK supports Python 3.9+
1818
- If you haven't already got a Kinde account, [register for free here](https://app.kinde.com/register) (no credit card required). Registering gives you a Kinde domain, which you need to get started, e.g. `yourapp.kinde.com`.
1919

20-
For new projects, you can also find our [Starter Kit on GitHub](https://github.com/kinde-starter-kits/python-starter-kit).
20+
If you are using a previous version of Python, you may need to refer to the [previous v1 SDK](/developer-tools/sdks/backend/python-sdk-v1/).
21+
22+
For new projects, you can find our [Starter Kit on GitHub](https://github.com/kinde-starter-kits/python-starter-kit).
2123

2224
## Install
2325

@@ -27,19 +29,19 @@ Install [PIP](https://pip.pypa.io/en/stable/installation/) and then execute the
2729
pip install kinde-python-sdk
2830
```
2931

30-
### Environment Variables
32+
### Environment variables
3133

32-
The Kinde Python SDK v2 uses environment variables for configuration. Here are all the supported variables:
34+
The Kinde Python SDK uses environment variables for configuration. Here are all the supported variables:
3335

34-
#### Required Variables
36+
#### Required variables
3537
- `KINDE_CLIENT_ID` - Your application's client ID from Kinde
3638
- `KINDE_CLIENT_SECRET` - Your application's client secret from Kinde
3739
- `KINDE_REDIRECT_URI` - The callback URL where Kinde will redirect after authentication
3840
- `KINDE_HOST` - Your Kinde domain (e.g., `https://yourdomain.kinde.com`)
3941
- `KINDE_ISSUER_URL` - Your Kinde issuer URL (typically same as KINDE_HOST)
4042
- `GRANT_TYPE` - The OAuth grant type to use (e.g., `AUTHORIZATION_CODE_WITH_PKCE`)
4143

42-
#### Optional Variables
44+
#### Optional variables
4345
- `KINDE_AUDIENCE` - The intended recipient of the access token (for API access)
4446
- `KINDE_CALLBACK_URL` - Alternative name for KINDE_REDIRECT_URI
4547
- `LOGOUT_REDIRECT_URL` - Where users are redirected after logout
@@ -149,7 +151,7 @@ oauth = OAuth(
149151
)
150152
```
151153

152-
### Manual Route Implementation
154+
### Manual route implementation
153155

154156
If you prefer to implement the routes manually, here's how you can do it:
155157

@@ -277,7 +279,7 @@ The Kinde Python SDK provides a simple way to check user permissions in your app
277279
from kinde_sdk.auth import permissions
278280
```
279281

280-
### Checking Permissions
282+
### Checking permissions
281283

282284
To check if a user has a specific permission:
283285

@@ -298,7 +300,7 @@ print(f"User belongs to organization: {all_permissions['orgCode']}")
298300
print("User permissions:", all_permissions["permissions"])
299301
```
300302

301-
### Practical Examples
303+
### Practical examples
302304

303305
Here's how to use permissions in your application:
304306

@@ -319,7 +321,7 @@ async def create_todo(todo_data: dict):
319321
# Create todo logic here...
320322
```
321323

322-
### Common Permission Patterns
324+
### Common permission patterns
323325

324326
Here are some common permission patterns you might use:
325327

@@ -343,15 +345,15 @@ Here are some common permission patterns you might use:
343345

344346
For more information about setting up permissions in Kinde, see [User permissions](/manage-users/roles-and-permissions/user-permissions/).
345347

346-
## Feature Flags
348+
## Feature flags
347349

348350
The Kinde Python SDK provides a simple way to access feature flags from your application. First, import the feature flags module:
349351

350352
```python
351353
from kinde_sdk.auth import feature_flags
352354
```
353355

354-
### Getting Feature Flags
356+
### Getting feature flags
355357

356358
To get a specific feature flag value:
357359

@@ -379,7 +381,7 @@ for code, flag in all_flags.items():
379381
print(f"- {code}: {flag.value} ({flag.type})")
380382
```
381383

382-
### Practical Examples
384+
### Practical examples
383385

384386
Here's how to use feature flags in your application:
385387

@@ -414,7 +416,7 @@ async def create_competition(competition_data: dict):
414416
# Create competition logic here...
415417
```
416418

417-
### Feature Flag Types
419+
### Feature flag types
418420

419421
The SDK supports the following feature flag types:
420422

@@ -438,7 +440,7 @@ The SDK supports the following feature flag types:
438440
}
439441
```
440442

441-
### Common Use Cases
443+
### Common use cases
442444

443445
```python
444446
# Feature Toggles
@@ -463,7 +465,7 @@ The Kinde Python SDK provides a simple way to access user claims from your appli
463465
from kinde_sdk.auth import claims
464466
```
465467

466-
### Getting Claims
468+
### Getting claims
467469

468470
To get a specific claim from the user's tokens:
469471

@@ -489,7 +491,7 @@ for claim_name, claim_value in all_claims.items():
489491
id_token_claims = await claims.get_all_claims(token_type="id_token")
490492
```
491493

492-
### Practical Examples
494+
### Practical examples
493495

494496
Here's how to use claims in your application:
495497

@@ -515,7 +517,7 @@ async def protected_endpoint():
515517
return {"message": "Access granted"}
516518
```
517519

518-
### Common Claims
520+
### Common claims
519521

520522
Here are some common claims you might want to access:
521523

@@ -538,7 +540,7 @@ Here are some common claims you might want to access:
538540
"org_id"
539541
```
540542

541-
### Token Types
543+
### Token types
542544

543545
The SDK supports two types of tokens:
544546

@@ -632,7 +634,7 @@ Once the user has successfully authenticated, you'll get a JWT and possibly a re
632634

633635
The Kinde Python SDK provides a Management API client for interacting with Kinde's management endpoints. This allows you to programmatically manage users, organizations, and other resources.
634636

635-
### Getting Started
637+
### Getting started
636638

637639
To use the Management API, you'll need to initialize the client with your Kinde credentials:
638640

@@ -648,7 +650,7 @@ oauth = OAuth(
648650
management = oauth.get_management()
649651
```
650652

651-
### Available Endpoints
653+
### Available endpoints
652654

653655
The Management API provides methods for common operations on resources. Here are some examples:
654656

@@ -676,7 +678,7 @@ updated_user = await management.update_user(
676678
await management.delete_user(user_id="user_123")
677679
```
678680

679-
### Organization Management
681+
### Organization management
680682

681683
```python
682684
# List organizations
@@ -700,7 +702,7 @@ updated_org = await management.update_organization(
700702
await management.delete_organization(org_id="org_123")
701703
```
702704

703-
### Error Handling
705+
### Error handling
704706

705707
The Management API methods will raise exceptions for API errors. It's recommended to handle these appropriately:
706708

@@ -712,7 +714,7 @@ except Exception as e:
712714
print(f"Error: {e}")
713715
```
714716

715-
### Token Management
717+
### Token management
716718

717719
The Management API client automatically handles token management, including:
718720
- Token acquisition
@@ -722,7 +724,7 @@ The Management API client automatically handles token management, including:
722724

723725
You don't need to manage tokens manually - the client handles this for you.
724726

725-
### Best Practices
727+
### Best practices
726728

727729
1. Always use async/await when calling Management API methods
728730
2. Handle API errors appropriately

0 commit comments

Comments
 (0)