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
Copy file name to clipboardExpand all lines: fern/products/sdks/overview/python/custom-code.mdx
+10-12Lines changed: 10 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ description: Augment your Python SDK with custom utilities
16
16
17
17
```python title="src/<package>/helper.py"
18
18
defmy_helper() -> None:
19
-
print"Hello World!"
19
+
print("Hello World!")
20
20
```
21
21
22
22
### Add your file to `.fernignore`
@@ -78,17 +78,15 @@ description: Augment your Python SDK with custom utilities
78
78
79
79
First, import the Fern generated base clients from `.base_client.py` and extend them to create your custom clients. Then, add whatever methods you want.
80
80
81
-
```python title="src/<package>/client.py"
82
-
from .base_client import \
83
-
BaseClient
84
-
85
-
class YourClient(BaseClient):
86
-
87
-
def my_helper(self) -> None
88
-
print("Hello World")
89
-
90
-
```
91
-
81
+
```python title="src/<package>/client.py"
82
+
from .base_client import BaseClient // import generated client
83
+
84
+
class YourClient(BaseClient): // extend generated client
85
+
def my_helper(self) -> None:
86
+
print("Hello World!")
87
+
def my_helper(self) -> None:
88
+
print("Hello World")
89
+
```
92
90
<Note>
93
91
See an example [client.py](https://github.com/elevenlabs/elevenlabs-python/blob/main/src/elevenlabs/client.py) from ElevenLabs.
0 commit comments