Skip to content

Commit 4500b4a

Browse files
committed
chore: update docs
1 parent fe9472d commit 4500b4a

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

docs/source/index.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,24 @@ rate_limit = replane.configs["rate-limit"]
6969
await replane.close()
7070
```
7171

72+
### Type-safe with Generated Types
73+
74+
Generate TypedDict types from the Replane dashboard for full type safety:
75+
76+
```python
77+
from replane import Replane
78+
from replane_types import Configs # Generated from dashboard
79+
80+
with Replane[Configs](
81+
base_url="https://replane.example.com",
82+
sdk_key="rp_...",
83+
) as replane:
84+
# Dictionary-style access with full type safety
85+
settings = replane.configs["app-settings"]
86+
print(settings["maxUploadSizeMb"]) # IDE knows the type
87+
print(settings["allowedFileTypes"]) # Autocomplete works
88+
```
89+
7290
```{toctree}
7391
:maxdepth: 2
7492
:hidden:

0 commit comments

Comments
 (0)