Skip to main content

Create a bot template

import botfleet

botfleet.api_key = "YOUR_API_KEY"

botfleet.BotTemplate.create(
name="My Bot Template",
description="My bot template description",
script="def main(request, store):\n return 'Hello, world!'",
requirements="requests==2.31.0\npandas==2.1.4",
env_vars="FOO=bar\nBAZ=qux",
python_version="3.11",
public=True,
)

Returns a BotTemplate object.

requirements and env_vars may include the \n character because they are multiline strings.