Create a bot from template
import botfleet
botfleet.api_key = "YOUR_API_KEY"
botfleet.Bot.create_from_template(
template_id="15d19ca3-26f1-4adb-9cea-3955b73d9b4e",
store_id="b553e996-6556-42dd-8990-ddb7ef2142f6",
)
Returns a Bot
object.
The following fields can be overridden: : name
, script
, requirements
, env_vars
, python_version
.
botfleet.Bot.create_from_template(
template_id="15d19ca3-26f1-4adb-9cea-3955b73d9b4e",
store_id="b553e996-6556-42dd-8990-ddb7ef2142f6",
name="My Bot",
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",
)