Skip to main content

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+

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tilt_py-0.1.2.tar.gz (19.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tilt_py-0.1.2-py3-none-any.whl (26.5 kB view details)

Uploaded Python 3

File details

Details for the file tilt_py-0.1.2.tar.gz.

File metadata

  • Download URL: tilt_py-0.1.2.tar.gz
  • Upload date:
  • Size: 19.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for tilt_py-0.1.2.tar.gz
Algorithm Hash digest
SHA256 693837a04268c21ea78991460c93ed0fc957f262cd4228135f62e2ac66ba870f
MD5 868e4743989f36eb65fbb413d3334635
BLAKE2b-256 b187826326a300fab6b7b35a8aaa56f8599aa7419d9b33ed38bebea85954187a

See more details on using hashes here.

File details

Details for the file tilt_py-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: tilt_py-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 26.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for tilt_py-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6b8650a347b7d5fb637716808ba687f41935f95f9927e4f56e4a269eb8a6b624
MD5 1e62e19d1ecad6dfc5ee0f1ea9107766
BLAKE2b-256 415b2c18cd2854821faf7a86b0fb4650e7bceef9d2a44950b148aa3709c20437

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page