mirror of
https://github.com/LukeHagar/plex-sdk-docs.git
synced 2025-12-06 04:20:46 +00:00
14 lines
658 B
Plaintext
14 lines
658 B
Plaintext
{/* Start Python Custom HTTP Client */}
|
|
The Python SDK makes API calls using the [requests](https://pypi.org/project/requests/) HTTP library. In order to provide a convenient way to configure timeouts, cookies, proxies, custom headers, and other low-level configuration, you can initialize the SDK client with a custom `requests.Session` object.
|
|
|
|
For example, you could specify a header for every request that this sdk makes as follows:
|
|
```python
|
|
import plex_api
|
|
import requests
|
|
|
|
http_client = requests.Session()
|
|
http_client.headers.update({'x-custom-header': 'someValue'})
|
|
s = plex_api.PlexAPI(client=http_client)
|
|
```
|
|
{/* End Python Custom HTTP Client */}
|