Quickstart
Give us a star on Github! Beam is completely open source.
Installation
đ Create an Account
Create an account on Beam. Youâll get 15 hours of free credit when you signup!
đ§ Activate a Python Virtual Environment (Recommended)
Activate a Python virtualenv, which is where youâll install the Beam SDK.
đ Register API Token and Install SDK
Retrieve your API token from the dashboard, on the API Keys page.
Paste the token in the command below to install the Beam SDK. Make sure to replace [TOKEN]
with your actual token.
Your API key will be saved to the ~/.beam/config.ini
file on your computer.
Deploy a Simple Web Endpoint
In order to run your code on Beamâs cloud, youâll add special decorators to your code.
Letâs write a simple function that finds the square of 256.
We include numpy in the container image to show how you can easily add Python packages to your containers.
Save this code to a file on your computer. You can name the file whatever you want, but weâll call it app.py
for this example.
Deployment
With the app.py
file saved on your computer, you can deploy this to the cloud using this command:
Call the API
After running 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.
The container will start in a few seconds and spin down automatically after the request!
What Next?
Here are some other things you can try:
Was this page helpful?