"""
Example script demonstrating how to search for obesity drugs in different phases.
Authentication:
This script requires the CORTELLIS_AUTH environment variable to be set with a base64 encoded
token in the format base64(username:password). You can generate this token using:
# Unix/macOS:
echo -n "your_username:your_password" | base64
# Windows PowerShell:
[Convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes("your_username:your_password"))
"""
import os
from cortellis_mcp import search_drugs
def main():
# Verify authentication token is set
if not os.getenv('CORTELLIS_AUTH'):
print("Error: CORTELLIS_AUTH environment variable not set")
print("Please set it with your base64 encoded token (base64(username:password))")
return
# Search for Phase 3 obesity drugs
phase3_results = search_drugs(
indication="obesity",
phase="C3" # Phase 3 Clinical
)
print("\nPhase 3 Obesity Drugs:")
print(phase3_results)
# Search for launched obesity drugs
launched_results = search_drugs(
indication="obesity",
phase="L" # Launched
)
print("\nLaunched Obesity Drugs:")
print(launched_results)
# Search for specific company's obesity drugs
company_results = search_drugs(
company="Novo Nordisk",
indication="obesity"
)
print("\nNovo Nordisk Obesity Drugs:")
print(company_results)
if __name__ == "__main__":
main()