You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for your interest in contributing to this SDK! This document provides guidelines for contributing to the project.
4
+
5
+
## Getting Started
6
+
7
+
### Prerequisites
8
+
9
+
- Python 3.9+
10
+
- pip
11
+
- poetry
12
+
13
+
### Installation
14
+
15
+
Install the project dependencies:
16
+
17
+
```bash
18
+
poetry install
19
+
```
20
+
21
+
### Building
22
+
23
+
Build the project:
24
+
25
+
```bash
26
+
poetry build
27
+
```
28
+
29
+
### Testing
30
+
31
+
Run the test suite:
32
+
33
+
```bash
34
+
poetry run pytest
35
+
```
36
+
37
+
### Linting and Formatting
38
+
39
+
Check code style:
40
+
41
+
```bash
42
+
poetry run ruff check .
43
+
poetry run ruff format .
44
+
```
45
+
46
+
### Type Checking
47
+
48
+
Run the type checker:
49
+
50
+
```bash
51
+
poetry run mypy .
52
+
```
53
+
54
+
## About Generated Code
55
+
56
+
**Important**: Most files in this SDK are automatically generated by [Fern](https://buildwithfern.com) from the API definition. Direct modifications to generated files will be overwritten the next time the SDK is generated.
57
+
58
+
### Generated Files
59
+
60
+
The following directories contain generated code:
61
+
-`src/` - API client classes and types
62
+
- Most Python files in the project
63
+
64
+
### How to Customize
65
+
66
+
If you need to customize the SDK, you have two options:
67
+
68
+
#### Option 1: Use `.fernignore`
69
+
70
+
For custom code that should persist across SDK regenerations:
71
+
72
+
1. Create a `.fernignore` file in the project root
73
+
2. Add file patterns for files you want to preserve (similar to `.gitignore` syntax)
74
+
3. Add your custom code to those files
75
+
76
+
Files listed in `.fernignore` will not be overwritten when the SDK is regenerated.
77
+
78
+
For more information, see the [Fern documentation on custom code](https://buildwithfern.com/learn/sdks/overview/custom-code).
79
+
80
+
#### Option 2: Contribute to the Generator
81
+
82
+
If you want to change how code is generated for all users of this SDK:
83
+
84
+
1. The Python SDK generator lives in the [Fern repository](https://github.com/fern-api/fern)
85
+
2. Generator code is located at `generators/python-v2/`
86
+
3. Follow the [Fern contributing guidelines](https://github.com/fern-api/fern/blob/main/CONTRIBUTING.md)
87
+
4. Submit a pull request with your changes to the generator
88
+
89
+
This approach is best for:
90
+
- Bug fixes in generated code
91
+
- New features that would benefit all users
92
+
- Improvements to code generation patterns
93
+
94
+
## Making Changes
95
+
96
+
### Workflow
97
+
98
+
1. Create a new branch for your changes
99
+
2. Make your modifications
100
+
3. Run tests to ensure nothing breaks: `poetry run pytest`
101
+
4. Run linting and formatting: `poetry run ruff check .` and `poetry run ruff format .`
102
+
5. Run type checking: `poetry run mypy .`
103
+
6. Build the project: `poetry build`
104
+
7. Commit your changes with a clear commit message
105
+
8. Push your branch and create a pull request
106
+
107
+
### Commit Messages
108
+
109
+
Write clear, descriptive commit messages that explain what changed and why.
110
+
111
+
### Code Style
112
+
113
+
This project uses automated code formatting and linting. Run `poetry run ruff format .` and `poetry run ruff check .` before committing to ensure your code meets the project's style guidelines.
114
+
115
+
## Questions or Issues?
116
+
117
+
If you have questions or run into issues:
118
+
119
+
1. Check the [Fern documentation](https://buildwithfern.com)
**audience:** `typing.Optional[str]` — Resource server identifier (audience) to scope the revocation. Must be used with both `user_id` and `client_id`.
**allow_online_access_with_ephemeral_sessions:** `typing.Optional[bool]` — Whether Online Refresh Tokens can be issued even when sessions are configured as ephemeral (true) or not (false).
11434
+
11435
+
</dd>
11436
+
</dl>
11437
+
11438
+
<dl>
11439
+
<dd>
11440
+
11416
11441
**token_lifetime:** `typing.Optional[int]` — Expiration value (in seconds) for access tokens issued for this API from the token endpoint.
**allow_online_access_with_ephemeral_sessions:** `typing.Optional[bool]` — Whether Online Refresh Tokens can be issued even when sessions are configured as ephemeral (true) or not (false).
11806
+
11807
+
</dd>
11808
+
</dl>
11809
+
11810
+
<dl>
11811
+
<dd>
11812
+
11780
11813
**token_lifetime:** `typing.Optional[int]` — Expiration value (in seconds) for access tokens issued for this API from the token endpoint.
**result_url:** `typing.Optional[str]` — URL the user will be redirected to in the classic Universal Login experience once the ticket is used. Cannot be specified when using client_id or organization_id.
14258
+
**result_url:** `typing.Optional[str]` — URL the user will be redirected to in the classic Universal Login experience once the ticket is used. Cannot be specified when using organization_id. May be specified together with client_id when the tenant has a custom password reset page enabled and a password-reset-post-challenge Action bound.
0 commit comments