mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-21 13:04:18 +02:00
chore: Update SDK documentation (#2932)
Co-authored-by: marvin-context-protocol[bot] <225465937+marvin-context-protocol[bot]@users.noreply.github.com>
This commit is contained in:
parent
4e663593b8
commit
e98e04fb83
16 changed files with 876 additions and 657 deletions
44
docs/python-sdk/fastmcp-utilities-timeout.mdx
Normal file
44
docs/python-sdk/fastmcp-utilities-timeout.mdx
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
---
|
||||
title: timeout
|
||||
sidebarTitle: timeout
|
||||
---
|
||||
|
||||
# `fastmcp.utilities.timeout`
|
||||
|
||||
|
||||
Timeout normalization utilities.
|
||||
|
||||
## Functions
|
||||
|
||||
### `normalize_timeout_to_timedelta` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/utilities/timeout.py#L8" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
|
||||
|
||||
```python
|
||||
normalize_timeout_to_timedelta(value: int | float | datetime.timedelta | None) -> datetime.timedelta | None
|
||||
```
|
||||
|
||||
|
||||
Normalize a timeout value to a timedelta.
|
||||
|
||||
**Args:**
|
||||
- `value`: Timeout value as int/float (seconds), timedelta, or None
|
||||
|
||||
**Returns:**
|
||||
- timedelta if value provided, None otherwise
|
||||
|
||||
|
||||
### `normalize_timeout_to_seconds` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/utilities/timeout.py#L28" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
|
||||
|
||||
```python
|
||||
normalize_timeout_to_seconds(value: int | float | datetime.timedelta | None) -> float | None
|
||||
```
|
||||
|
||||
|
||||
Normalize a timeout value to seconds (float).
|
||||
|
||||
**Args:**
|
||||
- `value`: Timeout value as int/float (seconds), timedelta, or None.
|
||||
Zero values are treated as "disabled" and return None.
|
||||
|
||||
**Returns:**
|
||||
- float seconds if value provided and non-zero, None otherwise
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue