Files
plex-sdk-docs/content/pages/01-reference/python/global_parameters/_snippet.mdx

25 lines
967 B
Plaintext

{/* Start Python Global Parameters */}
A parameter is configured globally. This parameter must be set on the SDK client instance itself during initialization. When configured as an option during SDK initialization, This global value will be used as the default on the operations that use it. When such operations are called, there is a place in each to override the global value, if needed.
For example, you can set `X-Plex-Client-Identifier` to `'Postman'` at SDK initialization and then you do not have to pass the same value on calls to operations like `get_pin`. But if you want to do so you may, which will locally override the global setting. See the example code below for a demonstration.
```python
import plex_api
s = plex_api.PlexAPI(
x_plex_client_identifier='Postman',
)
res = s.plex.get_pin(strong=False, x_plex_client_identifier='Postman')
if res.object is not None:
# handle response
pass
```
{/* End Python Global Parameters */}