truffile 0.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- truffile-0.0.0/PKG-INFO +125 -0
- truffile-0.0.0/README.md +107 -0
- truffile-0.0.0/pyproject.toml +44 -0
- truffile-0.0.0/setup.cfg +4 -0
- truffile-0.0.0/truffile/__init__.py +19 -0
- truffile-0.0.0/truffile/cli.py +1074 -0
- truffile-0.0.0/truffile/client.py +354 -0
- truffile-0.0.0/truffile/infer/__init__.py +1 -0
- truffile-0.0.0/truffile/infer/common.py +7 -0
- truffile-0.0.0/truffile/infer/prompts.py +91 -0
- truffile-0.0.0/truffile/infer/proxy.py +675 -0
- truffile-0.0.0/truffile/infer/tooling.py +19 -0
- truffile-0.0.0/truffile/schedule.py +215 -0
- truffile-0.0.0/truffile/storage.py +94 -0
- truffile-0.0.0/truffile.egg-info/PKG-INFO +125 -0
- truffile-0.0.0/truffile.egg-info/SOURCES.txt +186 -0
- truffile-0.0.0/truffile.egg-info/dependency_links.txt +1 -0
- truffile-0.0.0/truffile.egg-info/entry_points.txt +3 -0
- truffile-0.0.0/truffile.egg-info/requires.txt +11 -0
- truffile-0.0.0/truffile.egg-info/top_level.txt +2 -0
- truffile-0.0.0/truffle/__init__.py +0 -0
- truffile-0.0.0/truffle/app/__init__.py +0 -0
- truffile-0.0.0/truffle/app/app_build_pb2.py +36 -0
- truffile-0.0.0/truffle/app/app_build_pb2.pyi +19 -0
- truffile-0.0.0/truffle/app/app_build_pb2_grpc.py +24 -0
- truffile-0.0.0/truffle/app/app_install_pb2.py +43 -0
- truffile-0.0.0/truffle/app/app_install_pb2.pyi +23 -0
- truffile-0.0.0/truffle/app/app_install_pb2_grpc.py +142 -0
- truffile-0.0.0/truffle/app/app_type_pb2.py +36 -0
- truffile-0.0.0/truffle/app/app_type_pb2.pyi +16 -0
- truffile-0.0.0/truffle/app/app_type_pb2_grpc.py +24 -0
- truffile-0.0.0/truffle/app/background_feed_pb2.py +45 -0
- truffile-0.0.0/truffle/app/background_feed_pb2.pyi +52 -0
- truffile-0.0.0/truffle/app/background_feed_pb2_grpc.py +24 -0
- truffile-0.0.0/truffle/app/background_pb2.py +91 -0
- truffile-0.0.0/truffle/app/background_pb2.pyi +203 -0
- truffile-0.0.0/truffle/app/background_pb2_grpc.py +237 -0
- truffile-0.0.0/truffle/app/curator_pb2.py +57 -0
- truffile-0.0.0/truffle/app/curator_pb2.pyi +71 -0
- truffile-0.0.0/truffle/app/curator_pb2_grpc.py +183 -0
- truffile-0.0.0/truffle/app/default_app_manifest_pb2.py +41 -0
- truffile-0.0.0/truffle/app/default_app_manifest_pb2.pyi +35 -0
- truffile-0.0.0/truffle/app/default_app_manifest_pb2_grpc.py +24 -0
- truffile-0.0.0/truffle/app/foreground_pb2.py +41 -0
- truffile-0.0.0/truffle/app/foreground_pb2.pyi +30 -0
- truffile-0.0.0/truffle/app/foreground_pb2_grpc.py +24 -0
- truffile-0.0.0/truffle/app/system_pb2.py +38 -0
- truffile-0.0.0/truffle/app/system_pb2.pyi +22 -0
- truffile-0.0.0/truffle/app/system_pb2_grpc.py +24 -0
- truffile-0.0.0/truffle/app/task_runtime_pb2.py +128 -0
- truffile-0.0.0/truffle/app/task_runtime_pb2.pyi +124 -0
- truffile-0.0.0/truffle/app/task_runtime_pb2_grpc.py +274 -0
- truffile-0.0.0/truffle/common/__init__.py +0 -0
- truffile-0.0.0/truffle/common/content_pb2.py +38 -0
- truffile-0.0.0/truffle/common/content_pb2.pyi +21 -0
- truffile-0.0.0/truffle/common/content_pb2_grpc.py +24 -0
- truffile-0.0.0/truffle/common/file_pb2.py +40 -0
- truffile-0.0.0/truffle/common/file_pb2.pyi +30 -0
- truffile-0.0.0/truffle/common/file_pb2_grpc.py +24 -0
- truffile-0.0.0/truffle/common/icon_pb2.py +36 -0
- truffile-0.0.0/truffle/common/icon_pb2.pyi +11 -0
- truffile-0.0.0/truffle/common/icon_pb2_grpc.py +24 -0
- truffile-0.0.0/truffle/common/led_states_pb2.py +40 -0
- truffile-0.0.0/truffle/common/led_states_pb2.pyi +47 -0
- truffile-0.0.0/truffle/common/led_states_pb2_grpc.py +24 -0
- truffile-0.0.0/truffle/common/tool_provider_pb2.py +40 -0
- truffile-0.0.0/truffle/common/tool_provider_pb2.pyi +33 -0
- truffile-0.0.0/truffle/common/tool_provider_pb2_grpc.py +24 -0
- truffile-0.0.0/truffle/infer/__init__.py +0 -0
- truffile-0.0.0/truffle/infer/convo/__init__.py +0 -0
- truffile-0.0.0/truffle/infer/convo/conversation_pb2.py +40 -0
- truffile-0.0.0/truffle/infer/convo/conversation_pb2.pyi +25 -0
- truffile-0.0.0/truffle/infer/convo/conversation_pb2_grpc.py +24 -0
- truffile-0.0.0/truffle/infer/convo/msg_pb2.py +38 -0
- truffile-0.0.0/truffle/infer/convo/msg_pb2.pyi +26 -0
- truffile-0.0.0/truffle/infer/convo/msg_pb2_grpc.py +24 -0
- truffile-0.0.0/truffle/infer/embedding_pb2.py +40 -0
- truffile-0.0.0/truffle/infer/embedding_pb2.pyi +33 -0
- truffile-0.0.0/truffle/infer/embedding_pb2_grpc.py +24 -0
- truffile-0.0.0/truffle/infer/finishreason_pb2.py +36 -0
- truffile-0.0.0/truffle/infer/finishreason_pb2.pyi +24 -0
- truffile-0.0.0/truffle/infer/finishreason_pb2_grpc.py +24 -0
- truffile-0.0.0/truffle/infer/gencfg_pb2.py +48 -0
- truffile-0.0.0/truffle/infer/gencfg_pb2.pyi +88 -0
- truffile-0.0.0/truffle/infer/gencfg_pb2_grpc.py +24 -0
- truffile-0.0.0/truffle/infer/infer_pb2.py +55 -0
- truffile-0.0.0/truffle/infer/infer_pb2.pyi +43 -0
- truffile-0.0.0/truffle/infer/infer_pb2_grpc.py +701 -0
- truffile-0.0.0/truffle/infer/irequest_pb2.py +46 -0
- truffile-0.0.0/truffle/infer/irequest_pb2.pyi +44 -0
- truffile-0.0.0/truffle/infer/irequest_pb2_grpc.py +24 -0
- truffile-0.0.0/truffle/infer/iresponse_pb2.py +40 -0
- truffile-0.0.0/truffle/infer/iresponse_pb2.pyi +27 -0
- truffile-0.0.0/truffle/infer/iresponse_pb2_grpc.py +24 -0
- truffile-0.0.0/truffle/infer/model_pb2.py +66 -0
- truffile-0.0.0/truffle/infer/model_pb2.pyi +171 -0
- truffile-0.0.0/truffle/infer/model_pb2_grpc.py +24 -0
- truffile-0.0.0/truffle/infer/tokenize_pb2.py +38 -0
- truffile-0.0.0/truffle/infer/tokenize_pb2.pyi +21 -0
- truffile-0.0.0/truffle/infer/tokenize_pb2_grpc.py +24 -0
- truffile-0.0.0/truffle/infer/usage_pb2.py +40 -0
- truffile-0.0.0/truffle/infer/usage_pb2.pyi +51 -0
- truffile-0.0.0/truffle/infer/usage_pb2_grpc.py +24 -0
- truffile-0.0.0/truffle/os/__init__.py +0 -0
- truffile-0.0.0/truffle/os/app_queries_pb2.py +52 -0
- truffile-0.0.0/truffle/os/app_queries_pb2.pyi +55 -0
- truffile-0.0.0/truffle/os/app_queries_pb2_grpc.py +24 -0
- truffile-0.0.0/truffle/os/background_feed_queries_pb2.py +52 -0
- truffile-0.0.0/truffle/os/background_feed_queries_pb2.pyi +63 -0
- truffile-0.0.0/truffle/os/background_feed_queries_pb2_grpc.py +24 -0
- truffile-0.0.0/truffle/os/builder_pb2.py +48 -0
- truffile-0.0.0/truffle/os/builder_pb2.pyi +54 -0
- truffile-0.0.0/truffle/os/builder_pb2_grpc.py +24 -0
- truffile-0.0.0/truffle/os/classification_pb2.py +40 -0
- truffile-0.0.0/truffle/os/classification_pb2.pyi +28 -0
- truffile-0.0.0/truffle/os/classification_pb2_grpc.py +24 -0
- truffile-0.0.0/truffle/os/client_metadata_pb2.py +36 -0
- truffile-0.0.0/truffle/os/client_metadata_pb2.pyi +15 -0
- truffile-0.0.0/truffle/os/client_metadata_pb2_grpc.py +24 -0
- truffile-0.0.0/truffle/os/client_session_pb2.py +50 -0
- truffile-0.0.0/truffle/os/client_session_pb2.pyi +72 -0
- truffile-0.0.0/truffle/os/client_session_pb2_grpc.py +24 -0
- truffile-0.0.0/truffle/os/client_state_pb2.py +52 -0
- truffile-0.0.0/truffle/os/client_state_pb2.pyi +54 -0
- truffile-0.0.0/truffle/os/client_state_pb2_grpc.py +24 -0
- truffile-0.0.0/truffle/os/client_user_pb2.py +43 -0
- truffile-0.0.0/truffle/os/client_user_pb2.pyi +35 -0
- truffile-0.0.0/truffle/os/client_user_pb2_grpc.py +24 -0
- truffile-0.0.0/truffle/os/hardware_control_pb2.py +40 -0
- truffile-0.0.0/truffle/os/hardware_control_pb2.pyi +24 -0
- truffile-0.0.0/truffle/os/hardware_control_pb2_grpc.py +24 -0
- truffile-0.0.0/truffle/os/hardware_info_pb2.py +39 -0
- truffile-0.0.0/truffle/os/hardware_info_pb2.pyi +27 -0
- truffile-0.0.0/truffle/os/hardware_info_pb2_grpc.py +24 -0
- truffile-0.0.0/truffle/os/hardware_network_pb2.py +38 -0
- truffile-0.0.0/truffle/os/hardware_network_pb2.pyi +25 -0
- truffile-0.0.0/truffle/os/hardware_network_pb2_grpc.py +24 -0
- truffile-0.0.0/truffle/os/hardware_settings_pb2.py +38 -0
- truffile-0.0.0/truffle/os/hardware_settings_pb2.pyi +21 -0
- truffile-0.0.0/truffle/os/hardware_settings_pb2_grpc.py +24 -0
- truffile-0.0.0/truffle/os/hardware_stats_pb2.py +47 -0
- truffile-0.0.0/truffle/os/hardware_stats_pb2.pyi +85 -0
- truffile-0.0.0/truffle/os/hardware_stats_pb2_grpc.py +24 -0
- truffile-0.0.0/truffle/os/installer_pb2.py +83 -0
- truffile-0.0.0/truffle/os/installer_pb2.pyi +178 -0
- truffile-0.0.0/truffle/os/installer_pb2_grpc.py +24 -0
- truffile-0.0.0/truffle/os/notification_pb2.py +45 -0
- truffile-0.0.0/truffle/os/notification_pb2.pyi +62 -0
- truffile-0.0.0/truffle/os/notification_pb2_grpc.py +24 -0
- truffile-0.0.0/truffle/os/system_info_pb2.py +51 -0
- truffile-0.0.0/truffle/os/system_info_pb2.pyi +52 -0
- truffile-0.0.0/truffle/os/system_info_pb2_grpc.py +24 -0
- truffile-0.0.0/truffle/os/system_settings_pb2.py +40 -0
- truffile-0.0.0/truffle/os/system_settings_pb2.pyi +22 -0
- truffile-0.0.0/truffle/os/system_settings_pb2_grpc.py +24 -0
- truffile-0.0.0/truffle/os/task_actions_pb2.py +77 -0
- truffile-0.0.0/truffle/os/task_actions_pb2.pyi +87 -0
- truffile-0.0.0/truffle/os/task_actions_pb2_grpc.py +24 -0
- truffile-0.0.0/truffle/os/task_error_pb2.py +37 -0
- truffile-0.0.0/truffle/os/task_error_pb2.pyi +17 -0
- truffile-0.0.0/truffle/os/task_error_pb2_grpc.py +24 -0
- truffile-0.0.0/truffle/os/task_info_pb2.py +42 -0
- truffile-0.0.0/truffle/os/task_info_pb2.pyi +51 -0
- truffile-0.0.0/truffle/os/task_info_pb2_grpc.py +24 -0
- truffile-0.0.0/truffle/os/task_options_pb2.py +37 -0
- truffile-0.0.0/truffle/os/task_options_pb2.pyi +10 -0
- truffile-0.0.0/truffle/os/task_options_pb2_grpc.py +24 -0
- truffile-0.0.0/truffle/os/task_pb2.py +55 -0
- truffile-0.0.0/truffle/os/task_pb2.pyi +70 -0
- truffile-0.0.0/truffle/os/task_pb2_grpc.py +24 -0
- truffile-0.0.0/truffle/os/task_queries_pb2.py +62 -0
- truffile-0.0.0/truffle/os/task_queries_pb2.pyi +55 -0
- truffile-0.0.0/truffle/os/task_queries_pb2_grpc.py +24 -0
- truffile-0.0.0/truffle/os/task_search_pb2.py +44 -0
- truffile-0.0.0/truffle/os/task_search_pb2.pyi +46 -0
- truffile-0.0.0/truffle/os/task_search_pb2_grpc.py +24 -0
- truffile-0.0.0/truffle/os/task_step_pb2.py +52 -0
- truffile-0.0.0/truffle/os/task_step_pb2.pyi +82 -0
- truffile-0.0.0/truffle/os/task_step_pb2_grpc.py +24 -0
- truffile-0.0.0/truffle/os/task_target_pb2.py +36 -0
- truffile-0.0.0/truffle/os/task_target_pb2.pyi +13 -0
- truffile-0.0.0/truffle/os/task_target_pb2_grpc.py +24 -0
- truffile-0.0.0/truffle/os/task_user_response_pb2.py +42 -0
- truffile-0.0.0/truffle/os/task_user_response_pb2.pyi +37 -0
- truffile-0.0.0/truffle/os/task_user_response_pb2_grpc.py +24 -0
- truffile-0.0.0/truffle/os/truffleos_pb2.py +201 -0
- truffile-0.0.0/truffle/os/truffleos_pb2.pyi +107 -0
- truffile-0.0.0/truffle/os/truffleos_pb2_grpc.py +1635 -0
truffile-0.0.0/PKG-INFO
ADDED
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: truffile
|
|
3
|
+
Version: 0.0.0
|
|
4
|
+
Summary: truffile the TruffleOS SDK - Connect and deploy apps to Truffle devices
|
|
5
|
+
License: MIT
|
|
6
|
+
Requires-Python: >=3.10
|
|
7
|
+
Description-Content-Type: text/markdown
|
|
8
|
+
Requires-Dist: grpcio>=1.60.0
|
|
9
|
+
Requires-Dist: protobuf>=4.25.0
|
|
10
|
+
Requires-Dist: httpx>=0.27.0
|
|
11
|
+
Requires-Dist: pyyaml>=6.0
|
|
12
|
+
Requires-Dist: platformdirs>=3.10.0
|
|
13
|
+
Requires-Dist: websockets>=12.0
|
|
14
|
+
Requires-Dist: zeroconf>=0.131.0
|
|
15
|
+
Provides-Extra: dev
|
|
16
|
+
Requires-Dist: pytest>=8.0.0; extra == "dev"
|
|
17
|
+
Requires-Dist: grpcio-tools>=1.60.0; extra == "dev"
|
|
18
|
+
|
|
19
|
+
# truffile
|
|
20
|
+
|
|
21
|
+
TruffleOS SDK - deploy apps to Truffle devices
|
|
22
|
+
|
|
23
|
+
## install
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
pip install truffile
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
or from source:
|
|
30
|
+
```bash
|
|
31
|
+
git clone <repo>
|
|
32
|
+
cd truffile
|
|
33
|
+
pip install -e .
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## commands
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
# find truffle devices on your network
|
|
40
|
+
truffile scan
|
|
41
|
+
|
|
42
|
+
# connect to a device (first time requires approval on device)
|
|
43
|
+
truffile connect truffle-6272
|
|
44
|
+
|
|
45
|
+
# deploy an app from current directory
|
|
46
|
+
truffile deploy
|
|
47
|
+
|
|
48
|
+
# deploy an app from a specific path
|
|
49
|
+
truffile deploy ./my-app
|
|
50
|
+
|
|
51
|
+
# deploy with interactive shell (for debugging)
|
|
52
|
+
truffile deploy -i
|
|
53
|
+
|
|
54
|
+
# list installed apps on connected device
|
|
55
|
+
truffile list apps
|
|
56
|
+
|
|
57
|
+
# list connected devices
|
|
58
|
+
truffile list devices
|
|
59
|
+
|
|
60
|
+
# disconnect from a device
|
|
61
|
+
truffile disconnect truffle-6272
|
|
62
|
+
|
|
63
|
+
# disconnect from all devices
|
|
64
|
+
truffile disconnect all
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## truffile.yaml
|
|
68
|
+
|
|
69
|
+
apps need a `truffile.yaml` in their directory:
|
|
70
|
+
|
|
71
|
+
```yaml
|
|
72
|
+
metadata:
|
|
73
|
+
name: My App
|
|
74
|
+
description: does cool stuff
|
|
75
|
+
type: background # or foreground
|
|
76
|
+
icon_file: ./icon.png
|
|
77
|
+
process:
|
|
78
|
+
cmd: [python, app.py]
|
|
79
|
+
working_directory: /
|
|
80
|
+
environment:
|
|
81
|
+
MY_VAR: value
|
|
82
|
+
# schedule for background apps only:
|
|
83
|
+
default_schedule:
|
|
84
|
+
type: interval # interval | times
|
|
85
|
+
interval:
|
|
86
|
+
duration: "1h" # 15m, 2h, 1d, etc.
|
|
87
|
+
schedule:
|
|
88
|
+
daily_window: "09:00-17:30" # optional
|
|
89
|
+
allowed_days: [mon, tue, wed, thu, fri] # optional
|
|
90
|
+
|
|
91
|
+
files:
|
|
92
|
+
- source: ./app.py
|
|
93
|
+
destination: ./app.py
|
|
94
|
+
|
|
95
|
+
run: |
|
|
96
|
+
pip install requests
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### schedule types
|
|
100
|
+
|
|
101
|
+
**interval** - run every N minutes/hours:
|
|
102
|
+
```yaml
|
|
103
|
+
default_schedule:
|
|
104
|
+
type: interval
|
|
105
|
+
interval:
|
|
106
|
+
duration: "30m"
|
|
107
|
+
schedule:
|
|
108
|
+
daily_window: "06:00-22:00"
|
|
109
|
+
allowed_days: [mon, tue, wed, thu, fri]
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
**times** - run at specific times:
|
|
113
|
+
```yaml
|
|
114
|
+
default_schedule:
|
|
115
|
+
type: times
|
|
116
|
+
times:
|
|
117
|
+
run_times: ["08:00", "12:00", "18:00"]
|
|
118
|
+
allowed_days: [mon, tue, wed, thu, fri]
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
## example apps
|
|
122
|
+
|
|
123
|
+
see `example-apps/` for working examples:
|
|
124
|
+
- `example-apps/ambient/hedge` - background app
|
|
125
|
+
- `example-apps/focus/finance` - foreground app
|
truffile-0.0.0/README.md
ADDED
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
# truffile
|
|
2
|
+
|
|
3
|
+
TruffleOS SDK - deploy apps to Truffle devices
|
|
4
|
+
|
|
5
|
+
## install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pip install truffile
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
or from source:
|
|
12
|
+
```bash
|
|
13
|
+
git clone <repo>
|
|
14
|
+
cd truffile
|
|
15
|
+
pip install -e .
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## commands
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
# find truffle devices on your network
|
|
22
|
+
truffile scan
|
|
23
|
+
|
|
24
|
+
# connect to a device (first time requires approval on device)
|
|
25
|
+
truffile connect truffle-6272
|
|
26
|
+
|
|
27
|
+
# deploy an app from current directory
|
|
28
|
+
truffile deploy
|
|
29
|
+
|
|
30
|
+
# deploy an app from a specific path
|
|
31
|
+
truffile deploy ./my-app
|
|
32
|
+
|
|
33
|
+
# deploy with interactive shell (for debugging)
|
|
34
|
+
truffile deploy -i
|
|
35
|
+
|
|
36
|
+
# list installed apps on connected device
|
|
37
|
+
truffile list apps
|
|
38
|
+
|
|
39
|
+
# list connected devices
|
|
40
|
+
truffile list devices
|
|
41
|
+
|
|
42
|
+
# disconnect from a device
|
|
43
|
+
truffile disconnect truffle-6272
|
|
44
|
+
|
|
45
|
+
# disconnect from all devices
|
|
46
|
+
truffile disconnect all
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## truffile.yaml
|
|
50
|
+
|
|
51
|
+
apps need a `truffile.yaml` in their directory:
|
|
52
|
+
|
|
53
|
+
```yaml
|
|
54
|
+
metadata:
|
|
55
|
+
name: My App
|
|
56
|
+
description: does cool stuff
|
|
57
|
+
type: background # or foreground
|
|
58
|
+
icon_file: ./icon.png
|
|
59
|
+
process:
|
|
60
|
+
cmd: [python, app.py]
|
|
61
|
+
working_directory: /
|
|
62
|
+
environment:
|
|
63
|
+
MY_VAR: value
|
|
64
|
+
# schedule for background apps only:
|
|
65
|
+
default_schedule:
|
|
66
|
+
type: interval # interval | times
|
|
67
|
+
interval:
|
|
68
|
+
duration: "1h" # 15m, 2h, 1d, etc.
|
|
69
|
+
schedule:
|
|
70
|
+
daily_window: "09:00-17:30" # optional
|
|
71
|
+
allowed_days: [mon, tue, wed, thu, fri] # optional
|
|
72
|
+
|
|
73
|
+
files:
|
|
74
|
+
- source: ./app.py
|
|
75
|
+
destination: ./app.py
|
|
76
|
+
|
|
77
|
+
run: |
|
|
78
|
+
pip install requests
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### schedule types
|
|
82
|
+
|
|
83
|
+
**interval** - run every N minutes/hours:
|
|
84
|
+
```yaml
|
|
85
|
+
default_schedule:
|
|
86
|
+
type: interval
|
|
87
|
+
interval:
|
|
88
|
+
duration: "30m"
|
|
89
|
+
schedule:
|
|
90
|
+
daily_window: "06:00-22:00"
|
|
91
|
+
allowed_days: [mon, tue, wed, thu, fri]
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
**times** - run at specific times:
|
|
95
|
+
```yaml
|
|
96
|
+
default_schedule:
|
|
97
|
+
type: times
|
|
98
|
+
times:
|
|
99
|
+
run_times: ["08:00", "12:00", "18:00"]
|
|
100
|
+
allowed_days: [mon, tue, wed, thu, fri]
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## example apps
|
|
104
|
+
|
|
105
|
+
see `example-apps/` for working examples:
|
|
106
|
+
- `example-apps/ambient/hedge` - background app
|
|
107
|
+
- `example-apps/focus/finance` - foreground app
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=61.0", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[tool.setuptools_scm]
|
|
6
|
+
version_scheme = "guess-next-dev"
|
|
7
|
+
local_scheme = "no-local-version"
|
|
8
|
+
fallback_version = "0.1.dev0"
|
|
9
|
+
version_file = "truffile/_version.py"
|
|
10
|
+
|
|
11
|
+
[project]
|
|
12
|
+
name = "truffile"
|
|
13
|
+
dynamic = ["version"]
|
|
14
|
+
description = "truffile the TruffleOS SDK - Connect and deploy apps to Truffle devices"
|
|
15
|
+
readme = "README.md"
|
|
16
|
+
requires-python = ">=3.10"
|
|
17
|
+
license = {text = "MIT"}
|
|
18
|
+
|
|
19
|
+
dependencies = [
|
|
20
|
+
"grpcio>=1.60.0",
|
|
21
|
+
"protobuf>=4.25.0",
|
|
22
|
+
"httpx>=0.27.0",
|
|
23
|
+
"pyyaml>=6.0",
|
|
24
|
+
"platformdirs>=3.10.0",
|
|
25
|
+
"websockets>=12.0",
|
|
26
|
+
"zeroconf>=0.131.0",
|
|
27
|
+
]
|
|
28
|
+
|
|
29
|
+
[project.scripts]
|
|
30
|
+
truffile = "truffile.cli:main"
|
|
31
|
+
truffleinferproxy = "truffile.infer.proxy:main"
|
|
32
|
+
|
|
33
|
+
[project.optional-dependencies]
|
|
34
|
+
dev = [
|
|
35
|
+
"pytest>=8.0.0",
|
|
36
|
+
"grpcio-tools>=1.60.0",
|
|
37
|
+
]
|
|
38
|
+
|
|
39
|
+
[tool.setuptools.packages.find]
|
|
40
|
+
where = ["."]
|
|
41
|
+
include = ["truffile*", "truffle*"]
|
|
42
|
+
|
|
43
|
+
[tool.setuptools.package-data]
|
|
44
|
+
"*" = ["*.pyi", "py.typed"]
|
truffile-0.0.0/setup.cfg
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
try:
|
|
2
|
+
from ._version import __version__
|
|
3
|
+
except ImportError:
|
|
4
|
+
__version__ = "0.1.dev0"
|
|
5
|
+
|
|
6
|
+
from .client import TruffleClient, ExecResult, UploadResult, resolve_mdns, NewSessionStatus
|
|
7
|
+
from .schedule import parse_runtime_policy
|
|
8
|
+
from truffle.app.app_type_pb2 import AppType
|
|
9
|
+
|
|
10
|
+
__all__ = [
|
|
11
|
+
"__version__",
|
|
12
|
+
"TruffleClient",
|
|
13
|
+
"ExecResult",
|
|
14
|
+
"UploadResult",
|
|
15
|
+
"resolve_mdns",
|
|
16
|
+
"NewSessionStatus",
|
|
17
|
+
"AppType",
|
|
18
|
+
"parse_runtime_policy",
|
|
19
|
+
]
|