# Python

Python SDK allows to use the Smabbler API in the Python environment.

To add the Python SDK, add the following to the **requirements.txt**:

```
--extra-index-url https://pkgs.dev.azure.com/Smabbler/Smabbler.Sdk/_packaging/smabblersdkfeed/pypi/simple/
smabbler-api-client>=5.3.5
```

Usage example for listing available sources:

```python
from pprint import pprint
import smabbler.api.client
 
def main():
    configuration = smabbler.api.client.Configuration()
    configuration.api_key['ApiKeyAuth'] = '{Your ApiKey}'
    get_source(configuration)
 
def get_source(configuration):
    with smabbler.api.client.ApiClient(configuration) as api_client:
        api_instance = smabbler.api.client.DefaultApi(api_client)
       
        sources_response = api_instance.list_sources(page=0, page_size=5)
        for source in sources_response.sources:
            pprint(source)
 
if __name__ == '__main__':
    main()
```

You can find another usage example [here](https://github.com/Smabbler/Docs/tree/main/Samples/python).
