Image()
defines your container environment. You can add Python packages, system dependencies, or even custom Dockerfiles.
@endpoint
turns your function into a real, live web API that runs in the
cloud.
app.py
for this example.
app.py
file saved on your computer, you can deploy this to the cloud using this command:
beam deploy
, a cURL command will print in your shell. You can use this command to invoke the API.
Make sure to replace [TOKEN]
with your actual token.