You should checkout the examples on the developer site using requests. https://developer.bigfix.com/rest-api/examples/#python
Here is a quick example for your query:
import json
import requests
search_string = input('Search for: ').lower()
r = requests.get(f'https://bigfixServer:52311/api/query?output=json&relevance=(id of it) of bes baselines whose (name of it as string as lowercase contains "{search_string}"', verify=False, auth=('yourusername', 'yourpassword'))
data = json.loads(r.content)
for id in data['result']:
print(f'ID: {id}')