INNER CODE UNIT · Python
_executor_urls
pgalko/BambooAI · web_app/app.py:130
def _executor_urls(base_url: str) -> dict:
return {
'EXECUTOR_API_BASE_URL': base_url,
'EXECUTOR_API_UPLOAD_URL': f"{base_url}/upload_dataset",
'EXECUTOR_API_UPLOAD_AUX_URL': f"{base_url}/file_utils/upload_aux_dataset",
'EXECUTOR_API_REMOVE_AUX_URL': f"{base_url}/file_utils/remove_aux_dataset",
'EXECUTOR_API_DOWNLOAD_GENERATED_URL': f"{base_url}/download_generated_dataset"
}
def executor_base_url(user_id: str):
"""The executor this user's instance talks to: None in local mode (the kernel runs here)."""
urls = get_dynamic_executor_urls(user_id)
return urls['EXECUTOR_API_BASE_URL'] if urls else None
def get_dynamic_executor_urls(user_id: str) -> dict:
"""Get dynamic executor URLs for a specific user"""