beamlit 0.0.23rc13__tar.gz → 0.0.23rc15__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
Files changed (309) hide show
  1. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/PKG-INFO +1 -1
  2. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/pyproject.toml +1 -1
  3. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/common/settings.py +1 -0
  4. beamlit-0.0.23rc15/src/beamlit/deploy/__init__.py +3 -0
  5. beamlit-0.0.23rc15/src/beamlit/deploy/deploy.py +503 -0
  6. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/.gitignore +0 -0
  7. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/README.md +0 -0
  8. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/beamlit.yaml +0 -0
  9. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/__init__.py +0 -0
  10. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/agents/__init__.py +0 -0
  11. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/agents/chat.py +0 -0
  12. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/agents/decorator.py +0 -0
  13. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/__init__.py +0 -0
  14. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/agents/__init__.py +0 -0
  15. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/agents/create_agent.py +0 -0
  16. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/agents/create_agent_release.py +0 -0
  17. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/agents/delete_agent.py +0 -0
  18. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/agents/delete_agent_deployment.py +0 -0
  19. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/agents/delete_agent_deployment_history.py +0 -0
  20. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/agents/delete_agent_history.py +0 -0
  21. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/agents/get_agent.py +0 -0
  22. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/agents/get_agent_deployment.py +0 -0
  23. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/agents/get_agent_deployment_history.py +0 -0
  24. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/agents/get_agent_deployment_logs.py +0 -0
  25. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/agents/get_agent_deployment_metrics.py +0 -0
  26. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/agents/get_agent_environment_logs.py +0 -0
  27. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/agents/get_agent_history.py +0 -0
  28. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/agents/get_agent_metrics.py +0 -0
  29. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/agents/list_agent_deployment_history.py +0 -0
  30. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/agents/list_agent_deployments.py +0 -0
  31. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/agents/list_agent_history.py +0 -0
  32. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/agents/list_agents.py +0 -0
  33. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/agents/put_agent_deployment.py +0 -0
  34. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/agents/put_agent_deployment_history.py +0 -0
  35. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/agents/put_agent_history.py +0 -0
  36. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/agents/update_agent.py +0 -0
  37. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/configurations/__init__.py +0 -0
  38. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/configurations/get_configuration.py +0 -0
  39. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/environments/__init__.py +0 -0
  40. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/environments/create_environment.py +0 -0
  41. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/environments/delete_environment.py +0 -0
  42. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/environments/get_environment.py +0 -0
  43. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/environments/get_environment_metrics.py +0 -0
  44. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/environments/list_environments.py +0 -0
  45. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/environments/update_environment.py +0 -0
  46. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/functions/__init__.py +0 -0
  47. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/functions/create_function.py +0 -0
  48. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/functions/create_function_release.py +0 -0
  49. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/functions/delete_function.py +0 -0
  50. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/functions/delete_function_deployment.py +0 -0
  51. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/functions/get_function.py +0 -0
  52. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/functions/get_function_deployment.py +0 -0
  53. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/functions/get_function_deployment_logs.py +0 -0
  54. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/functions/get_function_deployment_metrics.py +0 -0
  55. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/functions/get_function_environment_logs.py +0 -0
  56. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/functions/get_function_metrics.py +0 -0
  57. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/functions/list_function_deployments.py +0 -0
  58. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/functions/list_functions.py +0 -0
  59. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/functions/put_function_deployment.py +0 -0
  60. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/functions/update_function.py +0 -0
  61. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/history/__init__.py +0 -0
  62. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/history/get_agents_history.py +0 -0
  63. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/history/list_agents_history.py +0 -0
  64. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/integrations/__init__.py +0 -0
  65. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/integrations/create_integration_connection.py +0 -0
  66. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/integrations/delete_integration_connection.py +0 -0
  67. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/integrations/get_integration.py +0 -0
  68. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/integrations/get_integration_connection.py +0 -0
  69. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/integrations/get_integration_connection_model.py +0 -0
  70. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/integrations/get_integration_model.py +0 -0
  71. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/integrations/list_integration_connection_models.py +0 -0
  72. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/integrations/list_integration_connections.py +0 -0
  73. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/integrations/list_integration_models.py +0 -0
  74. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/integrations/update_integration_connection.py +0 -0
  75. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/invitations/__init__.py +0 -0
  76. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/invitations/list_all_pending_invitations.py +0 -0
  77. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/locations/__init__.py +0 -0
  78. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/locations/list_locations.py +0 -0
  79. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/metrics/__init__.py +0 -0
  80. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/metrics/get_metrics.py +0 -0
  81. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/model_providers/__init__.py +0 -0
  82. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/model_providers/create_model_provider.py +0 -0
  83. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/model_providers/delete_model_provider.py +0 -0
  84. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/model_providers/get_model_provider.py +0 -0
  85. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/model_providers/list_model_providers.py +0 -0
  86. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/model_providers/update_model_provider.py +0 -0
  87. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/models/__init__.py +0 -0
  88. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/models/create_model.py +0 -0
  89. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/models/delete_model.py +0 -0
  90. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/models/delete_model_deployment.py +0 -0
  91. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/models/get_model.py +0 -0
  92. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/models/get_model_deployment.py +0 -0
  93. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/models/get_model_deployment_logs.py +0 -0
  94. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/models/get_model_deployment_metrics.py +0 -0
  95. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/models/get_model_environment_logs.py +0 -0
  96. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/models/get_model_metrics.py +0 -0
  97. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/models/list_model_deployments.py +0 -0
  98. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/models/list_models.py +0 -0
  99. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/models/put_model_deployment.py +0 -0
  100. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/models/release_model.py +0 -0
  101. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/models/update_model.py +0 -0
  102. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/policies/__init__.py +0 -0
  103. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/policies/create_policy.py +0 -0
  104. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/policies/delete_policy.py +0 -0
  105. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/policies/get_policy.py +0 -0
  106. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/policies/list_policies.py +0 -0
  107. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/policies/update_policy.py +0 -0
  108. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/service_accounts/__init__.py +0 -0
  109. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/service_accounts/create_api_key_for_service_account.py +0 -0
  110. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/service_accounts/create_workspace_service_account.py +0 -0
  111. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/service_accounts/delete_api_key_for_service_account.py +0 -0
  112. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/service_accounts/delete_workspace_service_account.py +0 -0
  113. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/service_accounts/get_workspace_service_accounts.py +0 -0
  114. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/service_accounts/list_api_keys_for_service_account.py +0 -0
  115. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/service_accounts/update_workspace_service_account.py +0 -0
  116. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/store/__init__.py +0 -0
  117. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/store/get_store_agent.py +0 -0
  118. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/store/get_store_function.py +0 -0
  119. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/store/list_store_agents.py +0 -0
  120. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/store/list_store_functions.py +0 -0
  121. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/workspaces/__init__.py +0 -0
  122. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/workspaces/accept_workspace_invitation.py +0 -0
  123. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/workspaces/create_worspace.py +0 -0
  124. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/workspaces/decline_workspace_invitation.py +0 -0
  125. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/workspaces/delete_workspace.py +0 -0
  126. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/workspaces/get_workspace.py +0 -0
  127. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/workspaces/invite_workspace_user.py +0 -0
  128. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/workspaces/leave_workspace.py +0 -0
  129. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/workspaces/list_workspace_users.py +0 -0
  130. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/workspaces/list_workspaces.py +0 -0
  131. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/workspaces/remove_workspace_user.py +0 -0
  132. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/workspaces/update_workspace.py +0 -0
  133. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/api/workspaces/update_workspace_user_role.py +0 -0
  134. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/authentication/__init__.py +0 -0
  135. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/authentication/apikey.py +0 -0
  136. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/authentication/authentication.py +0 -0
  137. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/authentication/clientcredentials.py +0 -0
  138. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/authentication/credentials.py +0 -0
  139. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/authentication/device_mode.py +0 -0
  140. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/client.py +0 -0
  141. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/common/__init__.py +0 -0
  142. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/common/generate.py +0 -0
  143. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/common/logger.py +0 -0
  144. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/common/secrets.py +0 -0
  145. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/common/utils.py +0 -0
  146. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/errors.py +0 -0
  147. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/functions/__init__.py +0 -0
  148. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/functions/decorator.py +0 -0
  149. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/functions/github/__init__.py +0 -0
  150. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/functions/github/github.py +0 -0
  151. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/functions/github/kit/__init__.py +0 -0
  152. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/functions/github/kit/pull_request.py +0 -0
  153. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/functions/math/__init__.py +0 -0
  154. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/functions/math/math.py +0 -0
  155. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/functions/search/__init__.py +0 -0
  156. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/functions/search/search.py +0 -0
  157. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/__init__.py +0 -0
  158. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/acl.py +0 -0
  159. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/agent.py +0 -0
  160. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/agent_chain.py +0 -0
  161. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/agent_configuration.py +0 -0
  162. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/agent_deployment.py +0 -0
  163. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/agent_deployment_configuration.py +0 -0
  164. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/agent_deployment_configuration_type_0.py +0 -0
  165. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/agent_deployment_history.py +0 -0
  166. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/agent_deployment_history_event.py +0 -0
  167. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/agent_deployment_pod_template.py +0 -0
  168. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/agent_deployment_pod_template_type_0.py +0 -0
  169. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/agent_history.py +0 -0
  170. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/agent_history_event.py +0 -0
  171. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/agent_metadata.py +0 -0
  172. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/agent_release.py +0 -0
  173. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/agent_spec.py +0 -0
  174. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/agent_with_deployments.py +0 -0
  175. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/api_key.py +0 -0
  176. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/authentication_provider_model.py +0 -0
  177. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/authentication_provider_organization.py +0 -0
  178. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/configuration.py +0 -0
  179. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/continent.py +0 -0
  180. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/core_spec.py +0 -0
  181. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/country.py +0 -0
  182. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/create_api_key_for_service_account_body.py +0 -0
  183. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/create_workspace_service_account_body.py +0 -0
  184. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/create_workspace_service_account_response_200.py +0 -0
  185. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/delete_workspace_service_account_response_200.py +0 -0
  186. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/deployment_configuration.py +0 -0
  187. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/deployment_configurations.py +0 -0
  188. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/deployment_serverless_config.py +0 -0
  189. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/deployment_serverless_config_type_0.py +0 -0
  190. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/environment.py +0 -0
  191. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/environment_metrics.py +0 -0
  192. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/environment_spec.py +0 -0
  193. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/flavor.py +0 -0
  194. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/function.py +0 -0
  195. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/function_configuration.py +0 -0
  196. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/function_deployment.py +0 -0
  197. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/function_deployment_configuration.py +0 -0
  198. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/function_deployment_configuration_type_0.py +0 -0
  199. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/function_deployment_pod_template.py +0 -0
  200. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/function_deployment_pod_template_type_0.py +0 -0
  201. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/function_kit.py +0 -0
  202. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/function_metadata.py +0 -0
  203. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/function_provider_ref.py +0 -0
  204. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/function_release.py +0 -0
  205. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/function_spec.py +0 -0
  206. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/function_with_deployments.py +0 -0
  207. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/get_workspace_service_accounts_response_200_item.py +0 -0
  208. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/increase_and_rate_metric.py +0 -0
  209. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/integration.py +0 -0
  210. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/integration_config.py +0 -0
  211. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/integration_connection.py +0 -0
  212. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/integration_connection_config.py +0 -0
  213. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/integration_connection_secret.py +0 -0
  214. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/integration_connection_spec.py +0 -0
  215. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/integration_model.py +0 -0
  216. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/integration_secret.py +0 -0
  217. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/invite_workspace_user_body.py +0 -0
  218. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/labels_type_0.py +0 -0
  219. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/location.py +0 -0
  220. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/location_response.py +0 -0
  221. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/metadata.py +0 -0
  222. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/metadata_labels.py +0 -0
  223. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/metric.py +0 -0
  224. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/metrics.py +0 -0
  225. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/model.py +0 -0
  226. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/model_deployment.py +0 -0
  227. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/model_deployment_log.py +0 -0
  228. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/model_deployment_metrics.py +0 -0
  229. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/model_deployment_metrics_inference_per_second_per_region.py +0 -0
  230. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/model_deployment_metrics_query_per_second_per_region_per_code.py +0 -0
  231. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/model_deployment_pod_template.py +0 -0
  232. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/model_deployment_pod_template_type_0.py +0 -0
  233. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/model_metadata.py +0 -0
  234. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/model_metrics.py +0 -0
  235. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/model_provider.py +0 -0
  236. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/model_provider_ref.py +0 -0
  237. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/model_release.py +0 -0
  238. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/model_spec.py +0 -0
  239. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/model_with_deployments.py +0 -0
  240. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/owner_fields.py +0 -0
  241. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/pending_invitation.py +0 -0
  242. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/pending_invitation_accept.py +0 -0
  243. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/pending_invitation_render.py +0 -0
  244. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/pending_invitation_render_invited_by.py +0 -0
  245. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/pending_invitation_render_workspace.py +0 -0
  246. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/pending_invitation_workspace_details.py +0 -0
  247. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/pod_template_spec.py +0 -0
  248. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/policy.py +0 -0
  249. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/policy_location.py +0 -0
  250. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/policy_spec.py +0 -0
  251. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/provider_config.py +0 -0
  252. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/qps.py +0 -0
  253. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/resource_deployment_log.py +0 -0
  254. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/resource_deployment_metrics.py +0 -0
  255. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/resource_deployment_metrics_inference_per_region.py +0 -0
  256. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/resource_deployment_metrics_inference_per_region_type_0.py +0 -0
  257. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/resource_deployment_metrics_inference_per_second_per_region.py +0 -0
  258. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/resource_deployment_metrics_inference_per_second_per_region_type_0.py +0 -0
  259. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/resource_deployment_metrics_query_per_region_per_code.py +0 -0
  260. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/resource_deployment_metrics_query_per_region_per_code_type_0.py +0 -0
  261. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/resource_deployment_metrics_query_per_second_per_region_per_code.py +0 -0
  262. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/resource_deployment_metrics_query_per_second_per_region_per_code_type_0.py +0 -0
  263. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/resource_environment_metrics.py +0 -0
  264. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/resource_environment_metrics_inference_per_second_per_region.py +0 -0
  265. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/resource_environment_metrics_query_per_second_per_region_per_code.py +0 -0
  266. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/resource_log.py +0 -0
  267. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/resource_metrics.py +0 -0
  268. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/runtime.py +0 -0
  269. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/runtime_readiness_probe.py +0 -0
  270. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/runtime_readiness_probe_type_0.py +0 -0
  271. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/runtime_resources.py +0 -0
  272. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/runtime_type_0.py +0 -0
  273. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/runtime_type_0_readiness_probe.py +0 -0
  274. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/runtime_type_0_readiness_probe_type_0.py +0 -0
  275. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/runtime_type_0_resources.py +0 -0
  276. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/serverless_config.py +0 -0
  277. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/spec_configuration.py +0 -0
  278. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/standard_fields_dynamo_db.py +0 -0
  279. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/store_agent.py +0 -0
  280. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/store_agent_configuration.py +0 -0
  281. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/store_agent_labels.py +0 -0
  282. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/store_agent_labels_type_0.py +0 -0
  283. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/store_configuration.py +0 -0
  284. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/store_configuration_option.py +0 -0
  285. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/store_function.py +0 -0
  286. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/store_function_configuration.py +0 -0
  287. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/store_function_kit.py +0 -0
  288. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/store_function_labels.py +0 -0
  289. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/store_function_labels_type_0.py +0 -0
  290. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/store_function_parameter.py +0 -0
  291. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/time_fields.py +0 -0
  292. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/update_workspace_service_account_body.py +0 -0
  293. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/update_workspace_service_account_response_200.py +0 -0
  294. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/update_workspace_user_role_body.py +0 -0
  295. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/websocket_channel.py +0 -0
  296. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/workspace.py +0 -0
  297. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/workspace_labels.py +0 -0
  298. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/models/workspace_user.py +0 -0
  299. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/py.typed +0 -0
  300. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/run.py +0 -0
  301. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/serve/app.py +0 -0
  302. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/serve/middlewares/__init__.py +0 -0
  303. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/serve/middlewares/accesslog.py +0 -0
  304. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/serve/middlewares/processtime.py +0 -0
  305. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/beamlit/types.py +0 -0
  306. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/integrationtest/agent.py +0 -0
  307. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/integrationtest/functions/helloworld.py +0 -0
  308. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/src/integrationtest/main.py +0 -0
  309. {beamlit-0.0.23rc13 → beamlit-0.0.23rc15}/uv.lock +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: beamlit
3
- Version: 0.0.23rc13
3
+ Version: 0.0.23rc15
4
4
  Summary: Add your description here
5
5
  Author-email: cploujoux <ch.ploujoux@gmail.com>
6
6
  Requires-Python: >=3.12
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "beamlit"
3
- version = "0.0.23.pre-13"
3
+ version = "0.0.23.pre-15"
4
4
  description = "Add your description here"
5
5
  readme = "README.md"
6
6
  authors = [
@@ -65,6 +65,7 @@ class Settings(BaseSettings):
65
65
  name: str = Field(default="beamlit-agent")
66
66
  base_url: str = Field(default="https://api.beamlit.dev/v0")
67
67
  run_url: str = Field(default="https://run.beamlit.dev")
68
+ registry_url: str = Field(default="https://serverless-registry-production.beamlit.workers.dev")
68
69
  log_level: str = Field(default="INFO")
69
70
  agent: SettingsAgent = SettingsAgent()
70
71
  server: SettingsServer = SettingsServer()
@@ -0,0 +1,3 @@
1
+ from .deploy import generate_beamlit_deployment
2
+
3
+ __all__ = ["generate_beamlit_deployment"]
@@ -0,0 +1,503 @@
1
+ import ast
2
+ import importlib
3
+ import json
4
+ import os
5
+ import sys
6
+ from dataclasses import dataclass
7
+ from logging import getLogger
8
+ from typing import Callable, Literal
9
+
10
+ from beamlit.common.settings import Settings, get_settings, init
11
+ from beamlit.models import (AgentChain, AgentDeployment, Flavor,
12
+ FunctionDeployment, Runtime,
13
+ StoreFunctionParameter)
14
+
15
+ sys.path.insert(0, os.getcwd())
16
+ sys.path.insert(0, os.path.join(os.getcwd(), "src"))
17
+
18
+
19
+ @dataclass
20
+ class Resource:
21
+ type: Literal["agent", "function"]
22
+ module: Callable
23
+ name: str
24
+ decorator: ast.Call
25
+ func: Callable
26
+
27
+ def get_resources(from_decorator, dir="src") -> list[Resource]:
28
+ """
29
+ Scans through Python files in a directory to find functions decorated with a specific decorator.
30
+
31
+ Args:
32
+ from_decorator (str): The name of the decorator to search for
33
+ dir (str): The directory to scan, defaults to "src"
34
+
35
+ Returns:
36
+ list[Resource]: List of Resource objects containing information about decorated functions
37
+ """
38
+ resources = []
39
+ logger = getLogger(__name__)
40
+
41
+ # Walk through all Python files in resources directory and subdirectories
42
+ for root, _, files in os.walk(dir):
43
+ for file in files:
44
+ if file.endswith(".py"):
45
+ file_path = os.path.join(root, file)
46
+ # Read and compile the file content
47
+ with open(file_path) as f:
48
+ try:
49
+ file_content = f.read()
50
+ # Parse the file content to find decorated resources
51
+ tree = ast.parse(file_content)
52
+
53
+ # Look for function definitions with decorators
54
+ for node in ast.walk(tree):
55
+ if (
56
+ not isinstance(node, ast.FunctionDef) and not isinstance(node, ast.AsyncFunctionDef)
57
+ ) or len(node.decorator_list) == 0:
58
+ continue
59
+ decorator = node.decorator_list[0]
60
+
61
+ decorator_name = ""
62
+ if isinstance(decorator, ast.Call):
63
+ decorator_name = decorator.func.id
64
+ if isinstance(decorator, ast.Name):
65
+ decorator_name = decorator.id
66
+ if decorator_name == from_decorator:
67
+ # Get the function name and decorator name
68
+ func_name = node.name
69
+
70
+ # Import the module to get the actual function
71
+ spec = importlib.util.spec_from_file_location(func_name, file_path)
72
+ module = importlib.util.module_from_spec(spec)
73
+ spec.loader.exec_module(module)
74
+ # Check if kit=True in the decorator arguments
75
+
76
+ # Get the decorated function
77
+ if hasattr(module, func_name) and isinstance(decorator, ast.Call):
78
+
79
+ resources.append(
80
+ Resource(
81
+ type=decorator_name,
82
+ module=module,
83
+ name=func_name,
84
+ func=getattr(module, func_name),
85
+ decorator=decorator,
86
+ )
87
+ )
88
+ except Exception as e:
89
+ logger.warning(f"Error processing {file_path}: {e!s}")
90
+ return resources
91
+
92
+
93
+ def get_parameters(resource: Resource) -> list[StoreFunctionParameter]:
94
+ """
95
+ Extracts parameter information from a function's signature and docstring.
96
+
97
+ Args:
98
+ resource (Resource): The resource object containing the function to analyze
99
+
100
+ Returns:
101
+ list[StoreFunctionParameter]: List of parameter objects with name, type, required status, and description
102
+ """
103
+ parameters = []
104
+ # Get function signature
105
+ import inspect
106
+ sig = inspect.signature(resource.func)
107
+ # Get docstring for parameter descriptions
108
+ docstring = inspect.getdoc(resource.func)
109
+ param_descriptions = {}
110
+ if docstring:
111
+ # Parse docstring for parameter descriptions
112
+ lines = docstring.split('\n')
113
+ for line in lines:
114
+ line = line.strip().lower()
115
+ if line.startswith(':param '):
116
+ # Extract parameter name and description
117
+ param_line = line[7:].split(':', 1)
118
+ if len(param_line) == 2:
119
+ param_name = param_line[0].strip()
120
+ param_desc = param_line[1].strip()
121
+ param_descriptions[param_name] = param_desc
122
+ for name, param in sig.parameters.items():
123
+ # Skip *args and **kwargs parameters
124
+ if param.kind in (inspect.Parameter.VAR_POSITIONAL, inspect.Parameter.VAR_KEYWORD):
125
+
126
+ continue
127
+
128
+ param_type = "string" # Default type
129
+ type_mapping = {
130
+ 'str': 'string',
131
+ 'int': 'integer',
132
+ 'float': 'number',
133
+ 'bool': 'boolean',
134
+ 'list': 'array',
135
+ 'dict': 'object',
136
+ 'none': 'null'
137
+ }
138
+ if param.annotation != inspect.Parameter.empty:
139
+ # Map Python types to OpenAPI types
140
+ if hasattr(param.annotation, "__name__"):
141
+ param_type = param.annotation.__name__.lower()
142
+ else:
143
+ # Handle special types like Union, Optional etc
144
+ param_type = str(param.annotation).lower()
145
+ parameter = StoreFunctionParameter(
146
+ name=name,
147
+ type_=type_mapping.get(param_type, "string"),
148
+ required=param.default == inspect.Parameter.empty,
149
+ description=param_descriptions.get(name, f"Parameter {name}")
150
+ )
151
+ parameters.append(parameter)
152
+
153
+ return parameters
154
+
155
+
156
+ def get_description(description: str | None, resource: Resource) -> str:
157
+ """
158
+ Gets the description of a function from either a provided description or the function's docstring.
159
+
160
+ Args:
161
+ description (str | None): Optional explicit description
162
+ resource (Resource): The resource object containing the function
163
+
164
+ Returns:
165
+ str: The function description
166
+ """
167
+ if description:
168
+ return description
169
+ doc = resource.func.__doc__
170
+ if doc:
171
+ # Split docstring into sections and get only the description part
172
+ doc_lines = doc.split('\n')
173
+ description_lines = []
174
+ for line in doc_lines:
175
+ line = line.strip()
176
+ # Stop when we hit param/return sections
177
+ if line.startswith(':param') or line.startswith(':return'):
178
+ break
179
+ if line:
180
+ description_lines.append(line)
181
+ return ' '.join(description_lines).strip()
182
+ return ""
183
+
184
+ def get_kwargs(arg: ast.Call) -> dict:
185
+ """
186
+ Extracts keyword arguments from an AST Call node.
187
+
188
+ Args:
189
+ arg (ast.Call): The AST Call node to process
190
+
191
+ Returns:
192
+ dict: Dictionary of keyword arguments and their values
193
+ """
194
+ kwargs = {}
195
+ for keyword in arg.keywords:
196
+ if isinstance(keyword.value, ast.Constant):
197
+ kwargs[keyword.arg] = keyword.value.value
198
+ elif isinstance(keyword.value, (ast.List, ast.Tuple)):
199
+ kwargs[keyword.arg] = [
200
+ AgentChain(**get_kwargs(elem)) if isinstance(elem, ast.Call) and isinstance(elem.func, ast.Name) and elem.func.id == "AgentChain"
201
+ else elem.value if isinstance(elem, ast.Constant) else elem
202
+ for elem in keyword.value.elts
203
+ ]
204
+ elif isinstance(keyword.value, ast.Dict):
205
+ kwargs[keyword.arg] = {}
206
+ for k, v in zip(keyword.value.keys, keyword.value.values):
207
+ if isinstance(k, ast.Constant) and isinstance(v, ast.Constant):
208
+ kwargs[keyword.arg][k.value] = v.value
209
+ if isinstance(k, ast.Constant) and isinstance(v, ast.Call):
210
+ kwargs[keyword.arg][k.value] = get_kwargs(v)
211
+ return kwargs
212
+
213
+ def get_runtime(type: str, name: str) -> Runtime:
214
+ settings = get_settings()
215
+ registry_url = settings.registry_url.replace("https://", "").replace("http://", "")
216
+ image = f"{registry_url}/{settings.workspace}/{type}s/{name}"
217
+ return Runtime(image=image)
218
+
219
+ def get_beamlit_deployment_from_resource(resource: Resource) -> AgentDeployment | FunctionDeployment:
220
+ """
221
+ Creates a deployment configuration from a resource.
222
+
223
+ Args:
224
+ resource (Resource): The resource to create a deployment for
225
+
226
+ Returns:
227
+ AgentDeployment | FunctionDeployment: The deployment configuration
228
+ """
229
+ for arg in resource.decorator.args:
230
+ if isinstance(arg, ast.Call):
231
+ if isinstance(arg.func, ast.Name) and arg.func.id == "AgentDeployment":
232
+ kwargs = get_kwargs(arg)
233
+ description = kwargs.pop("description", None)
234
+ return AgentDeployment(
235
+ **kwargs,
236
+ description=get_description(description, resource),
237
+ runtime=get_runtime("agent", kwargs.get("agent", resource.name))
238
+ )
239
+ if isinstance(arg.func, ast.Name) and arg.func.id == "FunctionDeployment":
240
+ kwargs = get_kwargs(arg)
241
+ description = kwargs.pop("description", None)
242
+ return FunctionDeployment(
243
+ **kwargs,
244
+ parameters=get_parameters(resource),
245
+ description=get_description(description, resource),
246
+ runtime=get_runtime("function", kwargs.get("function", resource.name))
247
+ )
248
+ for arg in resource.decorator.keywords:
249
+ if isinstance(arg.value, ast.Call):
250
+ if isinstance(arg.value.func, ast.Name) and arg.value.func.id == "AgentDeployment":
251
+ kwargs = get_kwargs(arg.value)
252
+ description = kwargs.pop("description", None)
253
+ return AgentDeployment(
254
+ **kwargs,
255
+ description=get_description(description, resource),
256
+ runtime=get_runtime("agent", kwargs.get("agent", resource.name))
257
+ )
258
+ if isinstance(arg.value.func, ast.Name) and arg.value.func.id == "FunctionDeployment":
259
+ kwargs = get_kwargs(arg.value)
260
+ description = kwargs.pop("description", None)
261
+ return FunctionDeployment(
262
+ **kwargs,
263
+ parameters=get_parameters(resource),
264
+ description=get_description(description, resource),
265
+ runtime=get_runtime("function", kwargs.get("function", resource.name))
266
+ )
267
+ if resource.type == "agent":
268
+ return AgentDeployment(
269
+ agent=resource.name,
270
+ description=get_description(None,resource),
271
+ runtime=get_runtime("agent", resource.name)
272
+ )
273
+ if resource.type == "function":
274
+ return FunctionDeployment(
275
+ function=resource.name,
276
+ parameters=get_parameters(resource),
277
+ description=get_description(None,resource),
278
+ runtime=get_runtime("function", resource.name)
279
+ )
280
+ return None
281
+
282
+
283
+ def get_flavors(flavors: list[Flavor]) -> str:
284
+ """
285
+ Converts a list of Flavor objects to JSON string.
286
+
287
+ Args:
288
+ flavors (list[Flavor]): List of Flavor objects
289
+
290
+ Returns:
291
+ str: JSON string representation of flavors
292
+ """
293
+ if not flavors:
294
+ return "[]"
295
+ return json.dumps([flavor.to_dict() for flavor in flavors])
296
+
297
+ def format_parameters(parameters: list[StoreFunctionParameter]) -> str:
298
+ """
299
+ Formats function parameters into YAML-compatible string.
300
+
301
+ Args:
302
+ parameters (list[StoreFunctionParameter]): List of parameter objects
303
+
304
+ Returns:
305
+ str: YAML-formatted string of parameters
306
+ """
307
+ if not parameters:
308
+ return "[]"
309
+
310
+ formatted = []
311
+ for param in parameters:
312
+ formatted.append(f"""
313
+ - name: {param.name}
314
+ type: {param.type_}
315
+ required: {str(param.required).lower()}
316
+ description: {param.description}""")
317
+
318
+ return "\n".join(formatted)
319
+
320
+ def format_agent_chain(agent_chain: list[AgentChain]) -> str:
321
+ """
322
+ Formats agent chain configuration into YAML-compatible string.
323
+
324
+ Args:
325
+ agent_chain (list[AgentChain]): List of agent chain configurations
326
+
327
+ Returns:
328
+ str: YAML-formatted string of agent chain
329
+ """
330
+ if not agent_chain:
331
+ return "[]"
332
+ formatted = []
333
+
334
+ for agent in agent_chain:
335
+ formatted.append(f"""
336
+ - agent: {agent.name}
337
+ enabled: {agent.enabled}""")
338
+ if agent.description:
339
+ formatted.append(f" description: {agent.description}")
340
+ return "\n".join(formatted)
341
+
342
+ def get_agent_yaml(agent: AgentDeployment, functions: list[tuple[Resource, FunctionDeployment]], settings: Settings) -> str:
343
+ """
344
+ Generates YAML configuration for an agent deployment.
345
+
346
+ Args:
347
+ agent (AgentDeployment): Agent deployment configuration
348
+ functions (list[tuple[Resource, FunctionDeployment]]): List of associated functions
349
+ settings (Settings): Application settings
350
+
351
+ Returns:
352
+ str: YAML configuration string
353
+ """
354
+ template = f"""
355
+ apiVersion: beamlit.com/v1alpha1
356
+ kind: Agent
357
+ metadata:
358
+ name: {agent.agent}
359
+ spec:
360
+ display_name: {agent.agent}
361
+ deployments:
362
+ - environment: {settings.environment}
363
+ enabled: true
364
+ policies: [{", ".join(agent.policies or [])}]
365
+ functions: [{", ".join([f"{function.function}" for (_, function) in functions])}]
366
+ agent_chain: {format_agent_chain(agent.agent_chain)}
367
+ model: {agent.model}
368
+ runtime:
369
+ image: {agent.runtime.image}
370
+ """
371
+ if agent.description:
372
+ template += f""" description: |
373
+ {agent.description}"""
374
+ return template
375
+
376
+ def get_function_yaml(function: FunctionDeployment, settings: Settings) -> str:
377
+ """
378
+ Generates YAML configuration for a function deployment.
379
+
380
+ Args:
381
+ function (FunctionDeployment): Function deployment configuration
382
+ settings (Settings): Application settings
383
+
384
+ Returns:
385
+ str: YAML configuration string
386
+ """
387
+ return f"""
388
+ apiVersion: beamlit.com/v1alpha1
389
+ kind: Function
390
+ metadata:
391
+ name: {function.function}
392
+ spec:
393
+ display_name: {function.function}
394
+ deployments:
395
+ - environment: {settings.environment}
396
+ enabled: true
397
+ policies: [{", ".join(function.policies or [])}]
398
+ description: |
399
+ {function.description}
400
+ parameters: {format_parameters(function.parameters)}
401
+ runtime:
402
+ image: {function.runtime.image}
403
+ """
404
+
405
+ def dockerfile(type: Literal["agent", "function"], resource: Resource, deployment: AgentDeployment | FunctionDeployment) -> str:
406
+ """
407
+ Generates Dockerfile content for agent or function deployment.
408
+
409
+ Args:
410
+ type (Literal["agent", "function"]): Type of deployment
411
+ resource (Resource): Resource to be deployed
412
+ deployment (AgentDeployment | FunctionDeployment): Deployment configuration
413
+
414
+ Returns:
415
+ str: Dockerfile content
416
+ """
417
+ if type == "agent":
418
+ module = f"{resource.module.__file__.split('/')[-1].replace('.py', '')}.{resource.module.__name__}"
419
+ else:
420
+ module = f"functions.{resource.module.__name__}.{resource.func.__name__}"
421
+ cmd = ["bl", "serve", "--port", "80", "--module", module]
422
+ if type == "agent":
423
+ cmd.append("--remote")
424
+ cmd_str = ','.join([f'"{c}"' for c in cmd])
425
+
426
+ return f"""
427
+ FROM python:3.12-slim
428
+
429
+ ARG UV_VERSION="latest"
430
+ RUN apt update && apt install -y curl
431
+
432
+ # Install uv.
433
+ COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
434
+ RUN curl -fsSL https://raw.githubusercontent.com/beamlit/toolkit/main/install.sh | BINDIR=/bin sh
435
+ WORKDIR /beamlit
436
+
437
+ # Install the application dependencies.
438
+ COPY pyproject.toml /beamlit/pyproject.toml
439
+ COPY uv.lock /beamlit/uv.lock
440
+ RUN uv sync --no-cache
441
+
442
+ COPY README.md /beamlit/README.md
443
+ COPY LICENSE /beamlit/LICENSE
444
+ COPY src /beamlit/src
445
+
446
+ ENV PATH="/beamlit/.venv/bin:$PATH"
447
+
448
+ ENTRYPOINT [{cmd_str}]
449
+ """
450
+
451
+ def generate_beamlit_deployment(directory: str):
452
+ """
453
+ Generates all necessary deployment files for Beamlit agents and functions.
454
+
455
+ Args:
456
+ directory (str): Target directory for generated files
457
+
458
+ Creates:
459
+ - Agent and function YAML configurations
460
+ - Dockerfiles for each deployment
461
+ - Directory structure for agents and functions
462
+ """
463
+ settings = init()
464
+ logger = getLogger(__name__)
465
+ logger.info(f"Importing server module: {settings.server.module}")
466
+ functions: list[tuple[Resource, FunctionDeployment]] = []
467
+ agents: list[tuple[Resource, AgentDeployment]] = []
468
+ for agent in get_resources("agent"):
469
+ agent_deployment = get_beamlit_deployment_from_resource(agent)
470
+ if agent_deployment:
471
+ agents.append((agent, agent_deployment))
472
+ for function in get_resources("function"):
473
+ function_deployment = get_beamlit_deployment_from_resource(function)
474
+ if function_deployment:
475
+ functions.append((function, function_deployment))
476
+
477
+ agents_dir = os.path.join(directory, "agents")
478
+ functions_dir = os.path.join(directory, "functions")
479
+ # Create directory if it doesn't exist
480
+ os.makedirs(agents_dir, exist_ok=True)
481
+ os.makedirs(functions_dir, exist_ok=True)
482
+ for (resource, agent) in agents:
483
+ # write deployment file
484
+ agent_dir = os.path.join(agents_dir, agent.agent)
485
+ os.makedirs(agent_dir, exist_ok=True)
486
+ with open(os.path.join(agent_dir, f"agent.yaml"), "w") as f:
487
+ content = get_agent_yaml(agent, functions, settings)
488
+ f.write(content)
489
+ # write dockerfile for build
490
+ with open(os.path.join(agent_dir, f"Dockerfile"), "w") as f:
491
+ content = dockerfile("agent", resource, agent)
492
+ f.write(content)
493
+ for (resource, function) in functions:
494
+ # write deployment file
495
+ function_dir = os.path.join(functions_dir, function.function)
496
+ os.makedirs(function_dir, exist_ok=True)
497
+ with open(os.path.join(function_dir, f"function.yaml"), "w") as f:
498
+ content = get_function_yaml(function, settings)
499
+ f.write(content)
500
+ # write dockerfile for build
501
+ with open(os.path.join(function_dir, f"Dockerfile"), "w") as f:
502
+ content = dockerfile("function", resource, function)
503
+ f.write(content)
File without changes
File without changes
File without changes