Skip to main content

truffile the TruffleOS SDK - Connect and deploy apps to Truffle devices

Project description

truffile

TruffleOS SDK - deploy apps to Truffle devices

install

pip install truffile

or from source:

git clone <repo>
cd truffile
pip install -e .

commands

# find truffle devices on your network
truffile scan

# connect to a device (first time requires approval on device)
truffile connect truffle-6272

# deploy an app from current directory
truffile deploy

# deploy an app from a specific path
truffile deploy ./my-app

# deploy with interactive shell (for debugging)
truffile deploy -i

# list installed apps on connected device
truffile list apps

# list connected devices
truffile list devices

# disconnect from a device
truffile disconnect truffle-6272

# disconnect from all devices
truffile disconnect all

truffile.yaml

apps need a truffile.yaml in their directory:

metadata:
  name: My App
  description: does cool stuff
  type: background  # or foreground
  icon_file: ./icon.png
  process:
    cmd: [python, app.py]
    working_directory: /
    environment:
      MY_VAR: value
  # schedule for background apps only:
  default_schedule:
    type: interval  # interval | times
    interval:
      duration: "1h"  # 15m, 2h, 1d, etc.
      schedule:
        daily_window: "09:00-17:30"  # optional
        allowed_days: [mon, tue, wed, thu, fri]  # optional

files:
  - source: ./app.py
    destination: ./app.py

run: |
  pip install requests

schedule types

interval - run every N minutes/hours:

default_schedule:
  type: interval
  interval:
    duration: "30m"
    schedule:
      daily_window: "06:00-22:00"
      allowed_days: [mon, tue, wed, thu, fri]

times - run at specific times:

default_schedule:
  type: times
  times:
    run_times: ["08:00", "12:00", "18:00"]
    allowed_days: [mon, tue, wed, thu, fri]

example apps

see example-apps/ for working examples:

  • example-apps/ambient/hedge - background app
  • example-apps/focus/finance - foreground app

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

truffile-0.1.12.tar.gz (643.9 kB view details)

Uploaded Source

Built Distribution

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

truffile-0.1.12-py3-none-any.whl (183.9 kB view details)

Uploaded Python 3

File details

Details for the file truffile-0.1.12.tar.gz.

File metadata

  • Download URL: truffile-0.1.12.tar.gz
  • Upload date:
  • Size: 643.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for truffile-0.1.12.tar.gz
Algorithm Hash digest
SHA256 f20e99345befe03f625d8b4c0fd60e3fbcba84dd7cfafd36da5f9784726a16a0
MD5 5f91a47fb9deb2ceb4a2811ba305db6b
BLAKE2b-256 cc98b0c22bd9bf7c7acfe3d4a66b15f0c62f8de7b3ef5cf0aadb4fd077b7076f

See more details on using hashes here.

Provenance

The following attestation bundles were made for truffile-0.1.12.tar.gz:

Publisher: publish_pip.yml on deepshard/truffile

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file truffile-0.1.12-py3-none-any.whl.

File metadata

  • Download URL: truffile-0.1.12-py3-none-any.whl
  • Upload date:
  • Size: 183.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for truffile-0.1.12-py3-none-any.whl
Algorithm Hash digest
SHA256 9285dfe8123a60d5a2d6a32f9f7be879c6ab568ba89852499533d405dc5ac7e7
MD5 a8b77b9e2fc64a0159684c3dc1d04f3b
BLAKE2b-256 38cc0310ad3f276a3f2f655dc098b0f3130afb5ab044f1cc10a0aa7159bcb939

See more details on using hashes here.

Provenance

The following attestation bundles were made for truffile-0.1.12-py3-none-any.whl:

Publisher: publish_pip.yml on deepshard/truffile

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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