flexdeck 0.1.1__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.
- flexdeck-0.1.1/LICENSE +21 -0
- flexdeck-0.1.1/PKG-INFO +82 -0
- flexdeck-0.1.1/README.md +71 -0
- flexdeck-0.1.1/flexdeck.egg-info/PKG-INFO +82 -0
- flexdeck-0.1.1/flexdeck.egg-info/SOURCES.txt +15 -0
- flexdeck-0.1.1/flexdeck.egg-info/dependency_links.txt +1 -0
- flexdeck-0.1.1/flexdeck.egg-info/entry_points.txt +2 -0
- flexdeck-0.1.1/flexdeck.egg-info/top_level.txt +1 -0
- flexdeck-0.1.1/flexdeck_plugin/__init__.py +599 -0
- flexdeck-0.1.1/flexdeck_plugin/__main__.py +65 -0
- flexdeck-0.1.1/flexdeck_plugin/conformance.py +73 -0
- flexdeck-0.1.1/flexdeck_plugin/pack.py +109 -0
- flexdeck-0.1.1/flexdeck_plugin/template.py +134 -0
- flexdeck-0.1.1/flexdeck_plugin/testing.py +91 -0
- flexdeck-0.1.1/pyproject.toml +19 -0
- flexdeck-0.1.1/setup.cfg +4 -0
- flexdeck-0.1.1/tests/test_sdk.py +160 -0
flexdeck-0.1.1/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Santosh Panna
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
flexdeck-0.1.1/PKG-INFO
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: flexdeck
|
|
3
|
+
Version: 0.1.1
|
|
4
|
+
Summary: Write FlexDeck plugins in Python: declare actions, values, events and feeds; test, pack and verify them against FlexDeck itself.
|
|
5
|
+
License: MIT
|
|
6
|
+
Keywords: flexdeck,plugin,sdk,deck,tablet
|
|
7
|
+
Requires-Python: >=3.10
|
|
8
|
+
Description-Content-Type: text/markdown
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
Dynamic: license-file
|
|
11
|
+
|
|
12
|
+
<p align="center">
|
|
13
|
+
<a href="https://flex-deck.com"><img alt="flexdeck" src="https://raw.githubusercontent.com/santoshpanna/FlexDeck/main/.github/assets/logo.svg" width="72"></a>
|
|
14
|
+
</p>
|
|
15
|
+
|
|
16
|
+
<h1 align="center">flexdeck (Python)</h1>
|
|
17
|
+
|
|
18
|
+
<p align="center">
|
|
19
|
+
Write <a href="https://flex-deck.com">FlexDeck</a> plugins in Python.<br>
|
|
20
|
+
Standard library only. A packed plugin carries the SDK with it, so it runs on any Python 3.10+ with nothing else installed.
|
|
21
|
+
</p>
|
|
22
|
+
|
|
23
|
+
<p align="center">
|
|
24
|
+
<img alt="Python 3.10+" src="https://img.shields.io/badge/python-3.10%2B-ecebe6?style=flat-square&labelColor=111113&logo=python&logoColor=white">
|
|
25
|
+
<img alt="No dependencies" src="https://img.shields.io/badge/dependencies-none-ecebe6?style=flat-square&labelColor=111113">
|
|
26
|
+
<a href="https://github.com/santoshpanna/FlexDeck/blob/main/docs/plugins.md"><img alt="Plugin guide" src="https://img.shields.io/badge/docs-plugin%20guide-ecebe6?style=flat-square&labelColor=111113"></a>
|
|
27
|
+
</p>
|
|
28
|
+
|
|
29
|
+
<br>
|
|
30
|
+
|
|
31
|
+
## Start in a minute
|
|
32
|
+
|
|
33
|
+
```sh
|
|
34
|
+
pip install flexdeck
|
|
35
|
+
flexdeck-plugin new lights "Desk lights"
|
|
36
|
+
cd lights
|
|
37
|
+
python -m unittest # its tests, without FlexDeck
|
|
38
|
+
flexdeck-plugin verify # ask FlexDeck itself whether it will work
|
|
39
|
+
flexdeck-plugin pack # lights-0.1.0.fdpkg, ready to install
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## A whole plugin
|
|
43
|
+
|
|
44
|
+
```python
|
|
45
|
+
from flexdeck_plugin import Plugin, arg
|
|
46
|
+
|
|
47
|
+
plugin = Plugin(id="lights", name="Desk lights", version="0.1.0", permissions=["network"])
|
|
48
|
+
plugin.variable("lights.on", "bool", "Whether the lights are on")
|
|
49
|
+
|
|
50
|
+
@plugin.action("toggle", "Turn the lights on or off", {"room": arg("text", "desk", "Which room")})
|
|
51
|
+
def toggle(args, ctx):
|
|
52
|
+
ctx.vars.set({"lights.on": not ctx.vars.get("lights.on")})
|
|
53
|
+
|
|
54
|
+
if __name__ == "__main__":
|
|
55
|
+
plugin.serve()
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Verify before you publish
|
|
59
|
+
|
|
60
|
+
`verify` packs the plugin and runs it through the FlexDeck on this computer (`flexdeck verify-plugin`), exactly as an install would. It checks:
|
|
61
|
+
|
|
62
|
+
- [x] its catalogue and gallery keys
|
|
63
|
+
- [x] every action's example arguments
|
|
64
|
+
- [x] its values, feeds and settings
|
|
65
|
+
- [x] that it keeps to its own namespace and its declared events
|
|
66
|
+
- [x] that it writes nothing but the protocol to stdout
|
|
67
|
+
- [x] that it stops cleanly
|
|
68
|
+
|
|
69
|
+
> [!WARNING]
|
|
70
|
+
> `--run-actions` also runs every action with its examples, and those actions do real things.
|
|
71
|
+
|
|
72
|
+
If FlexDeck is installed somewhere unusual, set `FLEXDECK_BIN` to its path.
|
|
73
|
+
|
|
74
|
+
## See also
|
|
75
|
+
|
|
76
|
+
- [Plugin guide](https://github.com/santoshpanna/FlexDeck/blob/main/docs/plugins.md): the full reference
|
|
77
|
+
- [Official plugins](https://github.com/Questory-Labs/FlexDeck-Plugins)
|
|
78
|
+
- [`@flexdeck/plugin-sdk`](https://www.npmjs.com/package/@flexdeck/plugin-sdk) for TypeScript · [`flexdeck-plugin-sdk`](https://crates.io/crates/flexdeck-plugin-sdk) for Rust
|
|
79
|
+
|
|
80
|
+
<br>
|
|
81
|
+
|
|
82
|
+
<p align="center"><sub>MIT licensed, so your plugins can use any license.</sub></p>
|
flexdeck-0.1.1/README.md
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<a href="https://flex-deck.com"><img alt="flexdeck" src="https://raw.githubusercontent.com/santoshpanna/FlexDeck/main/.github/assets/logo.svg" width="72"></a>
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
<h1 align="center">flexdeck (Python)</h1>
|
|
6
|
+
|
|
7
|
+
<p align="center">
|
|
8
|
+
Write <a href="https://flex-deck.com">FlexDeck</a> plugins in Python.<br>
|
|
9
|
+
Standard library only. A packed plugin carries the SDK with it, so it runs on any Python 3.10+ with nothing else installed.
|
|
10
|
+
</p>
|
|
11
|
+
|
|
12
|
+
<p align="center">
|
|
13
|
+
<img alt="Python 3.10+" src="https://img.shields.io/badge/python-3.10%2B-ecebe6?style=flat-square&labelColor=111113&logo=python&logoColor=white">
|
|
14
|
+
<img alt="No dependencies" src="https://img.shields.io/badge/dependencies-none-ecebe6?style=flat-square&labelColor=111113">
|
|
15
|
+
<a href="https://github.com/santoshpanna/FlexDeck/blob/main/docs/plugins.md"><img alt="Plugin guide" src="https://img.shields.io/badge/docs-plugin%20guide-ecebe6?style=flat-square&labelColor=111113"></a>
|
|
16
|
+
</p>
|
|
17
|
+
|
|
18
|
+
<br>
|
|
19
|
+
|
|
20
|
+
## Start in a minute
|
|
21
|
+
|
|
22
|
+
```sh
|
|
23
|
+
pip install flexdeck
|
|
24
|
+
flexdeck-plugin new lights "Desk lights"
|
|
25
|
+
cd lights
|
|
26
|
+
python -m unittest # its tests, without FlexDeck
|
|
27
|
+
flexdeck-plugin verify # ask FlexDeck itself whether it will work
|
|
28
|
+
flexdeck-plugin pack # lights-0.1.0.fdpkg, ready to install
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## A whole plugin
|
|
32
|
+
|
|
33
|
+
```python
|
|
34
|
+
from flexdeck_plugin import Plugin, arg
|
|
35
|
+
|
|
36
|
+
plugin = Plugin(id="lights", name="Desk lights", version="0.1.0", permissions=["network"])
|
|
37
|
+
plugin.variable("lights.on", "bool", "Whether the lights are on")
|
|
38
|
+
|
|
39
|
+
@plugin.action("toggle", "Turn the lights on or off", {"room": arg("text", "desk", "Which room")})
|
|
40
|
+
def toggle(args, ctx):
|
|
41
|
+
ctx.vars.set({"lights.on": not ctx.vars.get("lights.on")})
|
|
42
|
+
|
|
43
|
+
if __name__ == "__main__":
|
|
44
|
+
plugin.serve()
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Verify before you publish
|
|
48
|
+
|
|
49
|
+
`verify` packs the plugin and runs it through the FlexDeck on this computer (`flexdeck verify-plugin`), exactly as an install would. It checks:
|
|
50
|
+
|
|
51
|
+
- [x] its catalogue and gallery keys
|
|
52
|
+
- [x] every action's example arguments
|
|
53
|
+
- [x] its values, feeds and settings
|
|
54
|
+
- [x] that it keeps to its own namespace and its declared events
|
|
55
|
+
- [x] that it writes nothing but the protocol to stdout
|
|
56
|
+
- [x] that it stops cleanly
|
|
57
|
+
|
|
58
|
+
> [!WARNING]
|
|
59
|
+
> `--run-actions` also runs every action with its examples, and those actions do real things.
|
|
60
|
+
|
|
61
|
+
If FlexDeck is installed somewhere unusual, set `FLEXDECK_BIN` to its path.
|
|
62
|
+
|
|
63
|
+
## See also
|
|
64
|
+
|
|
65
|
+
- [Plugin guide](https://github.com/santoshpanna/FlexDeck/blob/main/docs/plugins.md): the full reference
|
|
66
|
+
- [Official plugins](https://github.com/Questory-Labs/FlexDeck-Plugins)
|
|
67
|
+
- [`@flexdeck/plugin-sdk`](https://www.npmjs.com/package/@flexdeck/plugin-sdk) for TypeScript · [`flexdeck-plugin-sdk`](https://crates.io/crates/flexdeck-plugin-sdk) for Rust
|
|
68
|
+
|
|
69
|
+
<br>
|
|
70
|
+
|
|
71
|
+
<p align="center"><sub>MIT licensed, so your plugins can use any license.</sub></p>
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: flexdeck
|
|
3
|
+
Version: 0.1.1
|
|
4
|
+
Summary: Write FlexDeck plugins in Python: declare actions, values, events and feeds; test, pack and verify them against FlexDeck itself.
|
|
5
|
+
License: MIT
|
|
6
|
+
Keywords: flexdeck,plugin,sdk,deck,tablet
|
|
7
|
+
Requires-Python: >=3.10
|
|
8
|
+
Description-Content-Type: text/markdown
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
Dynamic: license-file
|
|
11
|
+
|
|
12
|
+
<p align="center">
|
|
13
|
+
<a href="https://flex-deck.com"><img alt="flexdeck" src="https://raw.githubusercontent.com/santoshpanna/FlexDeck/main/.github/assets/logo.svg" width="72"></a>
|
|
14
|
+
</p>
|
|
15
|
+
|
|
16
|
+
<h1 align="center">flexdeck (Python)</h1>
|
|
17
|
+
|
|
18
|
+
<p align="center">
|
|
19
|
+
Write <a href="https://flex-deck.com">FlexDeck</a> plugins in Python.<br>
|
|
20
|
+
Standard library only. A packed plugin carries the SDK with it, so it runs on any Python 3.10+ with nothing else installed.
|
|
21
|
+
</p>
|
|
22
|
+
|
|
23
|
+
<p align="center">
|
|
24
|
+
<img alt="Python 3.10+" src="https://img.shields.io/badge/python-3.10%2B-ecebe6?style=flat-square&labelColor=111113&logo=python&logoColor=white">
|
|
25
|
+
<img alt="No dependencies" src="https://img.shields.io/badge/dependencies-none-ecebe6?style=flat-square&labelColor=111113">
|
|
26
|
+
<a href="https://github.com/santoshpanna/FlexDeck/blob/main/docs/plugins.md"><img alt="Plugin guide" src="https://img.shields.io/badge/docs-plugin%20guide-ecebe6?style=flat-square&labelColor=111113"></a>
|
|
27
|
+
</p>
|
|
28
|
+
|
|
29
|
+
<br>
|
|
30
|
+
|
|
31
|
+
## Start in a minute
|
|
32
|
+
|
|
33
|
+
```sh
|
|
34
|
+
pip install flexdeck
|
|
35
|
+
flexdeck-plugin new lights "Desk lights"
|
|
36
|
+
cd lights
|
|
37
|
+
python -m unittest # its tests, without FlexDeck
|
|
38
|
+
flexdeck-plugin verify # ask FlexDeck itself whether it will work
|
|
39
|
+
flexdeck-plugin pack # lights-0.1.0.fdpkg, ready to install
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## A whole plugin
|
|
43
|
+
|
|
44
|
+
```python
|
|
45
|
+
from flexdeck_plugin import Plugin, arg
|
|
46
|
+
|
|
47
|
+
plugin = Plugin(id="lights", name="Desk lights", version="0.1.0", permissions=["network"])
|
|
48
|
+
plugin.variable("lights.on", "bool", "Whether the lights are on")
|
|
49
|
+
|
|
50
|
+
@plugin.action("toggle", "Turn the lights on or off", {"room": arg("text", "desk", "Which room")})
|
|
51
|
+
def toggle(args, ctx):
|
|
52
|
+
ctx.vars.set({"lights.on": not ctx.vars.get("lights.on")})
|
|
53
|
+
|
|
54
|
+
if __name__ == "__main__":
|
|
55
|
+
plugin.serve()
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Verify before you publish
|
|
59
|
+
|
|
60
|
+
`verify` packs the plugin and runs it through the FlexDeck on this computer (`flexdeck verify-plugin`), exactly as an install would. It checks:
|
|
61
|
+
|
|
62
|
+
- [x] its catalogue and gallery keys
|
|
63
|
+
- [x] every action's example arguments
|
|
64
|
+
- [x] its values, feeds and settings
|
|
65
|
+
- [x] that it keeps to its own namespace and its declared events
|
|
66
|
+
- [x] that it writes nothing but the protocol to stdout
|
|
67
|
+
- [x] that it stops cleanly
|
|
68
|
+
|
|
69
|
+
> [!WARNING]
|
|
70
|
+
> `--run-actions` also runs every action with its examples, and those actions do real things.
|
|
71
|
+
|
|
72
|
+
If FlexDeck is installed somewhere unusual, set `FLEXDECK_BIN` to its path.
|
|
73
|
+
|
|
74
|
+
## See also
|
|
75
|
+
|
|
76
|
+
- [Plugin guide](https://github.com/santoshpanna/FlexDeck/blob/main/docs/plugins.md): the full reference
|
|
77
|
+
- [Official plugins](https://github.com/Questory-Labs/FlexDeck-Plugins)
|
|
78
|
+
- [`@flexdeck/plugin-sdk`](https://www.npmjs.com/package/@flexdeck/plugin-sdk) for TypeScript · [`flexdeck-plugin-sdk`](https://crates.io/crates/flexdeck-plugin-sdk) for Rust
|
|
79
|
+
|
|
80
|
+
<br>
|
|
81
|
+
|
|
82
|
+
<p align="center"><sub>MIT licensed, so your plugins can use any license.</sub></p>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
LICENSE
|
|
2
|
+
README.md
|
|
3
|
+
pyproject.toml
|
|
4
|
+
flexdeck.egg-info/PKG-INFO
|
|
5
|
+
flexdeck.egg-info/SOURCES.txt
|
|
6
|
+
flexdeck.egg-info/dependency_links.txt
|
|
7
|
+
flexdeck.egg-info/entry_points.txt
|
|
8
|
+
flexdeck.egg-info/top_level.txt
|
|
9
|
+
flexdeck_plugin/__init__.py
|
|
10
|
+
flexdeck_plugin/__main__.py
|
|
11
|
+
flexdeck_plugin/conformance.py
|
|
12
|
+
flexdeck_plugin/pack.py
|
|
13
|
+
flexdeck_plugin/template.py
|
|
14
|
+
flexdeck_plugin/testing.py
|
|
15
|
+
tests/test_sdk.py
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
flexdeck_plugin
|