Skip to content

Commit f966475

Browse files
Merge v5 branch into master – Auth0 Python SDK v5.0.0 (#768)
This pull request merges the `v5` branch into `master`, introducing **version 5.0.0** of the Auth0 Python SDK. This marks a **major, breaking rewrite** of the SDK, fully generated from Auth0's OpenAPI specifications using Fern. The Management API code is now **auto-generated**, featuring a new hierarchical package structure, improved type safety with Pydantic models, and updated usage patterns. The Authentication API remains manually maintained and is **not affected** by these changes. Additionally, documentation, workflows, and contribution guidelines have been updated to align with the new structure. --- ## Major Breaking Changes and Improvements ### SDK Rewrite and Breaking Changes - Complete rewrite of the **Management SDK**, generated from OpenAPI specs using Fern, introducing: - Hierarchical package structure with improved organization - Strongly typed interfaces using Pydantic models - Automatic token management with client credentials - Improved pagination with `SyncPager` and `AsyncPager` - Enhanced error handling with structured exceptions - All Management API usage patterns have changed, including **client initialization** and **method signatures**. Refer to the [v5 Migration Guide](v5_MIGRATION_GUIDE.md) for detailed upgrade steps. - **Package structure** has changed from dictionary-based responses to Pydantic models. All imports and response handling must be updated. - Only the **Authentication API** is manually maintained. Contribution and code generation instructions have been updated accordingly. ### Documentation and Examples - `README.md` and badges updated for v5 - Installation instructions revised; new usage examples provided for both Authentication and Management APIs - Clarified Python version requirement: **Python 3.8+** (Python 3.7 support dropped) - Contribution guidelines updated to reflect the new code generation process and testing instructions ### Build, Linting, and Workflows - CI workflows updated to use the `master` branch (will be finalized in this PR) - v5-specific workflow files (`v5-ci.yml`, `v5-publish.yml`) to be removed or consolidated - Linting configuration adjusted for the new structure - Poetry and dependency management updated ### Changelog - Added detailed changelog entries describing the rewrite, breaking changes, migration steps, and beta release notice --- Please review the [v5 Migration Guide](v5_MIGRATION_GUIDE.md) and updated documentation to transition your codebase to the new SDK structure. --- **Note:** The `v4` branch has been preserved at the pre-v5 state for reference and potential maintenance releases. --------- Signed-off-by: Snehil Kishore <snehil.kishore@okta.com>
1 parent 1233acd commit f966475

2,438 files changed

Lines changed: 223333 additions & 12557 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.fern/metadata.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"cliVersion": "3.24.3",
3+
"generatorName": "fernapi/fern-python-sdk",
4+
"generatorVersion": "4.46.2",
5+
"generatorConfig": {
6+
"client": {
7+
"class_name": "Auth0"
8+
},
9+
"package_path": "management",
10+
"enable_wire_tests": true,
11+
"pydantic_config": {
12+
"use_provided_defaults": true
13+
}
14+
}
15+
}

.fernignore

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Specify files that shouldn't be modified by Fern
2+
3+
# ManagementClient wrapper
4+
src/auth0/management/management_client.py
5+
src/auth0/management/token_provider.py
6+
tests/management/
7+
8+
# Documentation
9+
v5_MIGRATION_GUIDE.md
10+
CHANGELOG.md
11+
12+
# Authentication API (copied from auth0-python, not Fern-generated)
13+
src/auth0/authentication/
14+
tests/authentication/
15+
16+
# Root auth0 __init__.pys
17+
src/auth0/__init__.py
18+
src/auth0/management/__init__.py
19+
20+
# Files edited to incorporate both APIs
21+
pyproject.toml
22+
poetry.lock
23+
requirements.txt
24+
README.md
25+
.gitignore
26+
.github/workflows/ci.yml
27+
.version

.flake8

Lines changed: 0 additions & 3 deletions
This file was deleted.

.github/workflows/v5-ci.yml

Lines changed: 0 additions & 43 deletions
This file was deleted.

.github/workflows/v5-publish.yml

Lines changed: 0 additions & 109 deletions
This file was deleted.

.gitignore

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ bin/
2727
.pypirc
2828
pyvenv.cfg
2929
.python-version
30+
poetry.toml
3031

3132
# Installer logs
3233
pip-log.txt
@@ -42,7 +43,11 @@ nosetests.xml
4243
coverage.xml
4344
*,cover
4445
.hypothesis/
45-
.pytest_cache
46+
.pytest_cache/
47+
.mypy_cache/
48+
49+
# Linting
50+
.ruff_cache/
4651

4752
# Translations
4853
*.mo
@@ -51,12 +56,10 @@ coverage.xml
5156
# Sphinx documentation
5257
docs/build/
5358

54-
# IDEA
59+
# IDEs
5560
.idea/
5661
*.iml
57-
58-
# VSCode
5962
.vscode/
6063

6164
# OS-specific files
62-
.DS_Store
65+
.DS_Store

.pre-commit-config.yaml

Lines changed: 0 additions & 37 deletions
This file was deleted.

.version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4.13.0
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

DEVELOPMENT.rst

Lines changed: 0 additions & 34 deletions
This file was deleted.

0 commit comments

Comments
 (0)