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.

📁 Project Structure

.
├── README.md
├── init.py
├── connection.py
├── options.py
├── pyproject.toml
├── requirements.txt
├── tilt.py
└── utils.py
  • tilt.py: Main interface class (Tilt) used to run jobs.
  • connection.py: Handles file reading and async communication with the API.
  • options.py: Manages client configuration and local validation logic.
  • utils.py: Utility functions such as logging.
  • __init__.py: Exposes the public API (Tilt, Options).

📦 Installation

You can install the library directly from Git using SSH:

pip install "git+ssh://git@github.com:tilt-network/tilt_py.git@dev"

⚠️ Make sure your SSH key is added to your GitHub account.

🧑‍💻 Usage

from tilt import Tilt, Options

program_id = ''
data_src = ''
options = Options('your_api_key')
"""
Instantiate Tilt object and run it
"""
tilt = Tilt(data_src, program_id, options)
tilt.run()

"""
Poll API to check task status
"""
poll = TaskStatusPolling(program_id, interval=15)
poll.start()
while poll.is_running:
    poll_status = poll.check_status()  # will keep checking the API every <interval> seconds (default is 15 seconds)
    print(poll_status)

poll.stop()

"""
Check status via data streaming
"""
stream = TaskStatusStreaming(program_id)
result = stream.start()  # will keep a connection open and await a response

"""
Fetch processed data after process
"""
data = ProcessedData(program_id, "/tmp/output.bin")
data.download()  # Automatically writes to file

data = ProcessedData(program_id)
content = data.download()  # Returns bytes

The client will read from the configured data source, batch the input, and send it to the configured Tilt API endpoint.

✅ Requirements

  • Python 3.8+
  • A file-based dataset as input (must be a valid UTF-8 text file)
  • Valid API key (can be passed via Options or via TILT_API_KEY environment variable)
  • SQLite database at ~/tilt/tilt.db with a programs(name TEXT, program_id TEXT) table for validation

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.0.tar.gz (6.6 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.0-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: tilt_py-0.1.0.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.4

File hashes

Hashes for tilt_py-0.1.0.tar.gz
Algorithm Hash digest
SHA256 67c64698a2a748d193f86afebd27dcdc8cd4974ad1314aa0dce12ab49232f9f2
MD5 0c7089322f4c311ae81111cc561a7b66
BLAKE2b-256 01cdd49ebac9b49c9a72f999abe040d36a26d7039118bf50225abac39f536e23

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tilt_py-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.4

File hashes

Hashes for tilt_py-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8d2ee2f2dc1661a63139d35701a3505ce136de783e0176fb79ebd1a14b963d10
MD5 a6ead56d6dfe98e865d99a7a90e754c8
BLAKE2b-256 8185281dbf7b07c0a0524434c2e4d91330f6e7d3e43ae55fe1ad450c8600a071

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