Skip to content

Python SDK - Onboarding

Download Python SDK v1.1.1

This guide walks you through downloading, configuring, and verifying the Neuramancer Python SDK.

This guide is meant to be followed step-by-step using your terminal/command line.

Full Walkthrough: ~15 - 45 minutes, depending on your experience with APIs and SDKs.

We assume:

  1. You are running Linux, macOS, or WSL2 on Windows.
  2. You have at least basic knowledge of using the command line, installing software, and editing text files.
  3. You have an active Neuramancer tenant with API access (you received a .env file from us).
  4. You can reach the internet from your computer without restrictions (e.g., no firewalls, no proxies).
  5. In case of using custom blob storage (S3, Azure), you have the necessary credentials and permissions to upload/download files to the configured storage.

Before you begin, make sure you have API credentials — Contact Neuramancer support if you lack any of these:

  • API key
  • Tenant name
  • API endpoint URL
  • Optionally, your custom storage endpoint config (S3, Azure) if you have discussed specific requirements with us

We will provide a specific .env file, which you only need to copy into the root folder of the SDK.

See the Environment Variables Guide for full details.

Terminal window
wget https://docs.neuramancer.de/releases/neuramancer-sdk-python-PublicSdk-v1.1.1.zip \
-O neuramancer-sdk-python-PublicSdk-v1.1.1.zip
unzip neuramancer-sdk-python-PublicSdk-v1.1.1.zip -d neuramancer-sdk-python-PublicSdk-v1.1.1
cd neuramancer-sdk-python-PublicSdk-v1.1.1

You are now in the root folder of the extracted SDK package. Copy your provided .env file into this folder, or create a new one based on env-default.

The SDK includes a setup.sh script that automates the installation of dependencies and tools, including azcopy for Azure Blob Storage support.

Terminal window
bash setup.sh

Only if you choose NOT to run the setup.sh script, continue with 4.2 for manual installation instructions.

Should you prefer to install the SDK manually without running the setup.sh script, please ensure you have the following prerequisites installed on your system:

4.2.1 Install azcopy (Azure Blob Storage Support)

Section titled “4.2.1 Install azcopy (Azure Blob Storage Support)”

The SDK uses Microsoft’s azcopy CLI tool for uploading images to Azure Blob Storage. Please install azcopy via Microsoft’s official documentation. Make sure the azcopy folder contains the azcopy executable and that it’s added to your system’s PATH variable.

Set up a virtual environment and install the SDK dependencies:

Terminal window
python3 -m venv venv && \
source venv/bin/activate && \
pip install -r requirements.txt

To enhance your experience with the SDK, you may want to install the following command-line tools:

Terminal window
sudo apt-get update
sudo apt-get install curl jq unzip wget python3 python3-pip python3-venv

For verification, you can check the installed versions:

Terminal window
curl --version
jq --version
unzip -v
wget --version
python3 --version
pip --version

5. Custom Storage and Webhook Configuration and Tenant Update

Section titled “5. Custom Storage and Webhook Configuration and Tenant Update”

In case you’re using custom blob storage (S3, Azure), chances are you will need to update your tenant configuration, so that our API can authenticate against your blob storage.

Depending on whether you use S3 or Azure Blob Storage, you need to set the following environment variables in your .env file:

For S3 Storage:

Terminal window
TENANT_NAME=YOUR_TENANT_NAME
API_KEY=YOUR_API_KEY
API_ENDPOINT=https://api.neuramancer.dev
STORAGE_TYPE=s3
S3_ACCESS_KEY_ID=YOUR_S3_ACCESS_KEY_ID
S3_SECRET_ACCESS_KEY=YOUR_S3_SECRET_ACCESS_KEY
S3_ENDPOINT_URL=YOUR_S3_ENDPOINT_URL_WITHOUT_TRAILING_SLASH
S3_REGION_NAME=YOUR_REGION_NAME
S3_BUCKET_NAME=YOUR_BUCKET_NAME
S3_PORT=443
S3_USE_SSL=true
S3_PRESIGNED_URL_EXPIRY_SECONDS=604800
S3_CORS_ALLOWED_ORIGINS=https://app.neuramancer.dev,https://app.neuramancer.de

Only for reference - these follow the exact patterns of real credentials, but they are random/arbitrarily chosen values:

Terminal window
TENANT_NAME=foo1
# THIS IS A RANDOMLY GENERATED VALUE MATCHING THE PATTERN OF REAL SECRET KEYS:
API_KEY=sk-KGJ6s-9k-LReP073fxyQAUO7GvC8w9Z73GL0VyKh62
API_ENDPOINT=https://api.neuramancer.dev
STORAGE_TYPE=s3
# THIS IS A RANDOMLY GENERATED VALUE MATCHING THE PATTERN OF REAL SECRET KEYS:
S3_ACCESS_KEY_ID=BMGS89HGTV9KL65987FZ
# THIS IS A RANDOMLY GENERATED VALUE MATCHING THE PATTERN OF REAL SECRET KEYS:
S3_SECRET_ACCESS_KEY=AiCNnfsg6WcdcIZpQ0dQcv9BuklalSiQ7H71jZr
S3_ENDPOINT_URL=foo1.your-objectstorage.com
S3_BUCKET_NAME=my-bucket-name
S3_PORT=443
S3_USE_SSL=true
S3_PRESIGNED_URL_EXPIRY_SECONDS=604800
S3_CORS_ALLOWED_ORIGINS=https://app.neuramancer.dev,https://app.neuramancer.de

Now run: python3 update_tenant_e2e.py.

This will read the storage configuration from your .env file and update your tenant configuration in our system accordingly.

🎉 Congratulations! Your tenant is now configured to use your custom blob storage!

See the Python SDK Reference for CLI usage, library integration, the full API surface, E2E tests, and benchmarking.