Skip to content

Commit 1b96948

Browse files
Release 5.0.0b0 (#766)
# Auth0 Python SDK v5.0.0b0 ⚠️ **BREAKING CHANGES - Major Rewrite** This is a beta release of the upcoming major version. It introduces breaking changes, particularly in the Management API client. Please refer to the [v5 Migration Guide](https://github.com/auth0/auth0-python/blob/v5/v5_MIGRATION_GUIDE.md) for detailed upgrade instructions. --- ## ✍️ What's New - ✨ **OpenAPI-Generated**: Complete rewrite generated from Auth0's OpenAPI specifications using [Fern](https://buildwithfern.com) - 📦 **Better Organization**: Hierarchical package structure with logical sub-clients for improved discoverability - 🔒 **Type Safety**: Strongly typed request/response objects using Pydantic replace generic dictionaries - ✨ **Enhanced Developer Experience**: Better IntelliSense, code completion, and documentation - 🚀 **Future-Proof**: Easier maintenance and updates as Auth0's API evolves - ⚡ **Async Support**: First-class async client with `AsyncAuth0` and `AsyncManagementClient` - 📄 **Automatic Pagination**: Built-in pagination support with `include_totals=True` by default --- ## 💥 Breaking Changes ### Python Version Support - The SDK now requires **Python ≥3.8** - Support for Python 3.7 has been dropped ### Management API Client Redesign - The Management API client has been **fully restructured** using Fern for code generation - Methods are now organized into **modular sub-clients**, improving structure and maintainability - **Method names and signatures have changed**, adopting consistent and predictable naming conventions - **Pagination defaults changed**: `include_totals=True` is now the default for list operations - These changes are **not backward compatible** with the v4.x client ### Import Changes | Change | v4.x | v5.0.0 | |--------|------|--------| | **Management Client** | `from auth0.management import Auth0` | `from auth0.management import Auth0` or `ManagementClient` | | **Async Client** | Not available | `from auth0.management import AsyncAuth0` or `AsyncManagementClient` | | **Error Handling** | `from auth0.exceptions import Auth0Error` | `from auth0.management.core.api_error import ApiError` | | **Authentication** | `from auth0.authentication import GetToken` | `from auth0.authentication import GetToken` (unchanged) | --- ## 📝 Quick Migration Example ### Before (v4.x): ```python from auth0.management import Auth0 # Initialize with full base URL mgmt_api = Auth0( domain='YOUR_DOMAIN.auth0.com', token='YOUR_TOKEN' ) # List users with explicit pagination users = mgmt_api.users.list( page=0, per_page=50, include_totals=True # Must specify explicitly ) # Generic dictionary responses for user in users['users']: print(user['email']) ``` ### After (v5.0.0): ```python from auth0.management import ManagementClient # Simpler initialization - just domain client = ManagementClient( domain='YOUR_DOMAIN.auth0.com', token='YOUR_TOKEN' ) # Or with automatic token management client = ManagementClient( domain='YOUR_DOMAIN.auth0.com', client_id='YOUR_CLIENT_ID', client_secret='YOUR_CLIENT_SECRET' ) # Pagination with include_totals=True by default response = client.users.list( page=0, per_page=50 ) # Strongly-typed Pydantic models for user in response.users: print(user.email) # Type-safe attribute access ``` --- ## 🔧 Migration Steps 1. **Update imports**: Change import paths as shown in the table above 2. **Client initialization**: Use `ManagementClient` with just `domain` instead of full `base_url` 3. **Update method calls**: Review method signatures - many have changed for consistency 4. **Handle responses**: Access response data as attributes (Pydantic models) instead of dictionary keys 5. **Error handling**: Catch `ApiError` instead of `Auth0Error` for Management API errors 6. **Pagination**: `include_totals` now defaults to `True` - adjust if you relied on `False` 7. **Async support**: Use `AsyncManagementClient` or `AsyncAuth0` for async operations --- ## ✅ What's NOT Affected **The `authentication` package remains fully compatible!** All authentication APIs work the same way between v4.x and v5.0.0: - ✅ `GetToken` - Client credentials, authorization code flows - ✅ `Database` - User signup and authentication - ✅ `Passwordless` - Passwordless authentication - ✅ `Users` - User authentication operations - ✅ Token verification and validation --- ## 📚 Resources - **[Migration Guide](https://github.com/auth0/auth0-python/blob/v5/v5_MIGRATION_GUIDE.md)**: Detailed migration instructions - **[API Reference](https://github.com/auth0/auth0-python/blob/v5/reference.md)**: Complete API documentation - **[README](https://github.com/auth0/auth0-python/blob/v5/README.md)**: Updated examples and usage guide --- ## ⚠️ Beta Release This is a beta release. While core functionality is stable, minor API adjustments may occur before the final v5.0.0 release. Please test thoroughly and provide feedback! --- ## 📦 Installation ```bash pip install auth0-python==5.0.0b0 ``` Or add to your [requirements.txt](cci:7://file:///Users/snehil.kishore/Desktop/Python/auth0-python/requirements.txt:0:0-0:0): ``` auth0-python>=5.0.0b0,<6.0.0 ``` ---
1 parent b236da4 commit 1b96948

File tree

4 files changed

+49
-2
lines changed

4 files changed

+49
-2
lines changed

.version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
5.0.0b0

CHANGELOG.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,44 @@
11
# Change Log
22

3+
## [5.0.0b0](https://github.com/auth0/auth0-python/tree/5.0.0b0) (2025-12-18)
4+
[Full Changelog](https://github.com/auth0/auth0-python/compare/4.13.0...5.0.0b0)
5+
6+
⚠️ **BETA RELEASE** - This is a beta release with significant breaking changes. Please test thoroughly before upgrading production systems.
7+
8+
**Breaking Changes**
9+
10+
- **Complete rewrite of Management API client** - Generated from Auth0's OpenAPI specifications using [Fern](https://buildwithfern.com)
11+
- **Python 3.7 support dropped** - Minimum required version is now Python 3.8
12+
- **Management API client restructured** - Methods organized into modular sub-clients for better discoverability
13+
- **Method signatures changed** - Consistent and predictable naming conventions across all endpoints
14+
- **Response types changed** - Strongly-typed Pydantic models replace generic dictionaries
15+
- **Import paths changed** - `from auth0.management.core.api_error import ApiError` instead of `from auth0.exceptions import Auth0Error`
16+
- **Pagination defaults changed** - `include_totals=True` is now the default for list operations
17+
- **Client initialization simplified** - `ManagementClient` takes `domain` instead of full `base_url`
18+
19+
**Added**
20+
21+
- First-class async support with `AsyncAuth0` and `AsyncManagementClient`
22+
- Automatic token management with client credentials in `ManagementClient`
23+
- Built-in pagination support with `include_totals=True` by default
24+
- Type-safe request/response objects using Pydantic models
25+
- Better IntelliSense and code completion support
26+
- Comprehensive API reference documentation
27+
- Migration guide for upgrading from v4.x
28+
29+
**Changed**
30+
31+
- Management API client fully regenerated using Fern
32+
- Package structure reorganized with hierarchical sub-clients
33+
- Error handling updated to use `ApiError` base class
34+
- Documentation updated with v5 examples
35+
36+
**Note**
37+
38+
- Authentication API remains **fully backward compatible** - no changes required
39+
- See [v5_MIGRATION_GUIDE.md](https://github.com/auth0/auth0-python/blob/v5/v5_MIGRATION_GUIDE.md) for detailed upgrade instructions
40+
41+
342
## [4.13.0](https://github.com/auth0/auth0-python/tree/4.13.0) (2025-09-17)
443
[Full Changelog](https://github.com/auth0/auth0-python/compare/4.12.0...4.13.0)
544

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,17 @@ The Auth0 Python library provides convenient access to the Auth0 APIs from Pytho
3030

3131
## Installation
3232

33+
> ⚠️ **This is a beta release (v5.0.0-beta)** of a major rewrite with breaking changes. See the [Migration Guide](v5_MIGRATION_GUIDE.md) for upgrade instructions from v4.x.
34+
35+
**Install the v5 beta:**
36+
3337
```sh
34-
pip install auth0-python
38+
pip install auth0-python==5.0.0b0
3539
```
3640

41+
**Requirements:**
42+
- Python ≥3.8 (Python 3.7 support has been dropped)
43+
3744
## Reference
3845

3946
A full reference for this library is available [here](https://github.com/auth0/auth0-python/blob/HEAD/./reference.md).

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "auth0-python"
33

44
[tool.poetry]
55
name = "auth0-python"
6-
version = "4.13.0"
6+
version = "5.0.0b0"
77
description = "Auth0 Python SDK - Management and Authentication APIs"
88
readme = "README.md"
99
authors = ["Auth0 <support@auth0.com>"]

0 commit comments

Comments
 (0)