Python installation
Install and set up the Fused Python SDK on your local machine.
This section is only for local environments outside of Fused. If you're working in Workbench, fused is already installed for you.
The latest version of
fusedis 1.20.1.
Installing fused is required if you're running Fused locally or in a development environment. If you're working in Workbench, fused is already installed for you.
Install
Python Version: 3.10+
pip install "fused[all]"
Installation options
- Set up a Python environment:
python3 -m venv .venv
source .venv/bin/activate
- Install the
fusedpackage:
# Base package only
pip install fused
# For raster data processing
pip install "fused[raster]"
# For vector data processing
pip install "fused[vector]"
# All optional dependencies (recommended)
pip install "fused[all]"
Authenticate
The first time you use Fused locally, you'll need to authenticate. This stores credentials in ~/.fused/credentials.
- Notebook
- Python Script
from fused.api import NotebookCredentials
credentials = NotebookCredentials()
Follow the URL in your browser to authenticate.
from fused.api import NotebookCredentials
credentials = NotebookCredentials()
print(credentials.url)
Follow the URL in your browser to authenticate.
When running code from a Python environment without browser access, you may copy the ~/.fused/credentials file to the same location in the target system.
Log out
Log out the current user. This deletes the credentials saved to disk.
import fused
fused.api.logout()
Get Bearer token
Get your account's Bearer (Access) token for authenticating API requests.
import fused
fused.api.access_token()
Do not share your Bearer token. It allows impersonation of your account.
Quick test
Verify your installation works:
import fused
@fused.udf
def udf():
return "Hello from Fused!"
fused.run(udf)