Python client for processing and sending data to Tilt's distributed computing platform
Project description
Tilt Python Client
This is the official Python client for submitting and processing data in the Tilt distributed computing platform.
🚀 Overview
Tilt enables distributed data processing by orchestrating multiple devices connected to a network. This client is responsible for reading input files, batching the content, and sending it to the Tilt API asynchronously.
📦 Installation
pip install tilt-py
🧑💻 Usage
import os
from uuid import UUID
from tilt import Options, Tilt
from tilt.source_handler import TextSourceHandler
from tilt.types import Some
# Load environment variables or set directly
SECRET_KEY = os.getenv("SECRET_KEY") # or "your_secret_key"
PROGRAM_ID = UUID("c6e024e0-ad75-45ca-94b4-bbeadb4eebfa") # Replace with your program ID
INPUT_FILE = "shipping_calculation.jsonl" # Path to your input file
# Configure data source and options
data_src = TextSourceHandler(INPUT_FILE)
options = Options(
data_src=Some(data_src),
program_id=Some(PROGRAM_ID),
secret_key=Some(SECRET_KEY),
)
# Create Tilt instance and run processing
tilt = Tilt(options)
results = tilt.create_and_poll()
# Process results
texts = []
for _, item in results:
if item is not None:
texts.append(item.value.decode())
print(" ".join(texts))
The client reads from the configured data source, batches the input, and sends it to the Tilt API for processing.
✅ Requirements
- Python 3.10+
- A file-based dataset as input (must be a valid UTF-8 text file, e.g., JSONL)
- Valid API key (can be passed via
Optionsor environment variableSECRET_KEY) - Internet connection for API calls
Common Issues & Fixes
SSL Certificate Verification Error on macOS
If you encounter the following error when running the application:
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate
This is a common issue on macOS with Python installations (especially Python 3.10+), as the default Python does not automatically use the system's certificate store.
Solution
Run the official Python certificate installer (recommended):
/Applications/Python\ 3.13/Install\ Certificates.command
This command installs the Mozilla root certificates bundle and updates the Python trust store.
Alternatively, if the command is not available (e.g., Homebrew, pyenv, or custom installation), update the certifi package:
pip install --upgrade certifi
After running either of these, restart your terminal or Python process and try again:
python -m tilt.main
This should resolve the ClientConnectorCertificateError and allow the application to connect to staging.tilt.rest successfully.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tilt_py-0.1.1.tar.gz.
File metadata
- Download URL: tilt_py-0.1.1.tar.gz
- Upload date:
- Size: 20.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
da9d6364cdccf38b8839a867ece47e771471e5557960d63f937f1fc89c980581
|
|
| MD5 |
86cc7b736a8136e44dafc3e6943b245a
|
|
| BLAKE2b-256 |
5724a0a6f6aff443afece91342817ddbdd8192532a824dab522c4b76e97d9c2b
|
File details
Details for the file tilt_py-0.1.1-py3-none-any.whl.
File metadata
- Download URL: tilt_py-0.1.1-py3-none-any.whl
- Upload date:
- Size: 26.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e99f4f5b68f10a25b9c4667c3c7e6f07f2bd68a3fcfe1585a7281f063b02fce3
|
|
| MD5 |
8f014643209c5b3fc7885864b22ef342
|
|
| BLAKE2b-256 |
ab8d40cb87c9a5078d8c7a95569bbecc04e616cb5981c99b455da1c6f573d624
|