Skip to content

Commit

Permalink
Merge pull request #15 from gri-gus/feature/1.2.0
Browse files Browse the repository at this point in the history
Feature/1.2.0
  • Loading branch information
gri-gus authored Sep 22, 2024
2 parents ef7294e + c09275c commit 83a161a
Show file tree
Hide file tree
Showing 127 changed files with 88 additions and 5,648 deletions.
1 change: 0 additions & 1 deletion MANIFEST.in

This file was deleted.

16 changes: 3 additions & 13 deletions README-PYPI.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,12 @@ Library for creating Stream Deck plugins in Python.

## Installation

> ⚠️ To work correctly on Windows, you need to enable `LongPaths` support in
> ⚠️ For correct operation on Windows, it is recommended to enable `LongPaths` support in
> the system: [manual](https://www.backupery.com/how-to-enable-ntfs-long-paths-in-windows/).
> Without this setting, installation problems may occur!
> Without this setting, problems with installation and use may occur!
```shell
pip install streamdeck-sdk
```

or

```shell
pip install streamdeck_sdk
pip install streamdeck-sdk[dev]
```

## Features
Expand All @@ -75,10 +69,6 @@ pip install streamdeck_sdk
1. Plugin requirements should take no longer than 30 seconds to install. This is a feature of Stream Deck on Windows,
since the program restarts the plugin if a websocket connection has not been established within 30 seconds.
Therefore, you need a good Internet connection when installing and updating the plugin.
2. You need to enable `LongPaths` support in the system
registry: [manual](https://www.backupery.com/how-to-enable-ntfs-long-paths-in-windows/).

Without this setting, the created plugins will not work!

## Examples

Expand Down
24 changes: 8 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,12 @@ Library for creating Stream Deck plugins in Python.

## Installation

> ⚠️ To work correctly on Windows, you need to enable `LongPaths` support in
> ⚠️ For correct operation on Windows, it is recommended to enable `LongPaths` support in
> the system: [manual](https://www.backupery.com/how-to-enable-ntfs-long-paths-in-windows/).
> Without this setting, installation problems may occur!
> Without this setting, problems with installation and use may occur!
```shell
pip install streamdeck-sdk
```

or

```shell
pip install streamdeck_sdk
pip install streamdeck-sdk[dev]
```

## Features
Expand All @@ -82,10 +76,6 @@ pip install streamdeck_sdk
1. Plugin requirements should take no longer than 30 seconds to install. This is a feature of Stream Deck on Windows,
since the program restarts the plugin if a websocket connection has not been established within 30 seconds.
Therefore, you need a good Internet connection when installing and updating the plugin.
2. You need to enable `LongPaths` support in the system
registry: [manual](https://www.backupery.com/how-to-enable-ntfs-long-paths-in-windows/).

Without this setting, the created plugins will not work!

## Quick Start

Expand All @@ -94,7 +84,7 @@ pip install streamdeck_sdk
3. Go to the project folder, activate `venv` and install the `streamdeck-sdk` library:

```shell
pip install streamdeck-sdk
pip install streamdeck-sdk[dev]
```

4. Run the command to start the project:
Expand All @@ -107,6 +97,8 @@ After completing this step, the folder `com.bestdeveloper.mytestplugin.sdPlugin`

5. Build the plugin using the command:

> ⚠️ The `requirements.txt` file should not contain the `streamdeck-sdk-*` libraries. If there are any, remove them.
```shell
streamdeck_sdk build -i com.bestdeveloper.mytestplugin.sdPlugin
```
Expand Down Expand Up @@ -245,7 +237,7 @@ Here are the elements available for generation in Python:
```python
from pathlib import Path

from streamdeck_sdk.property_inspector import *
from streamdeck_sdk_pi import *

OUTPUT_DIR = Path(__file__).parent
TEMPLATE = Path(__file__).parent / "pi_template.html"
Expand Down Expand Up @@ -544,7 +536,7 @@ For example, you made a Property Inspector like this and generated it:
```python
from pathlib import Path

from streamdeck_sdk.property_inspector import *
from streamdeck_sdk_pi import *

OUTPUT_DIR = Path(__file__).parent
TEMPLATE = Path(__file__).parent / "pi_template.html"
Expand Down
24 changes: 8 additions & 16 deletions README.ru.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,12 @@

## Установка

> ⚠️ Для корректной работы на Windows нужно включить поддержку `LongPaths` в
> ⚠️ Для корректной работы на Windows рекомендуется включить поддержку `LongPaths` в
> системе: [manual](https://www.backupery.com/how-to-enable-ntfs-long-paths-in-windows/).
> Без этой настройки возможны проблемы с установкой!
> Без этой настройки возможны проблемы с установкой и использованием!
```shell
pip install streamdeck-sdk
```

or

```shell
pip install streamdeck_sdk
pip install streamdeck-sdk[dev]
```

## Возможности
Expand All @@ -82,10 +76,6 @@ pip install streamdeck_sdk
1. Зависимости плагина должны устанавливаться не дольше 30 секунд. Это особенность Stream Deck на Windows, так как
программа перезапускает плагин, если в течение 30 секунд не было установлено websocket соединение. Поэтому нужен
хороший интернет при установке и обновлении плагина.
2. Нужно включить поддержку `LongPaths` в реестре
системы: [manual](https://www.backupery.com/how-to-enable-ntfs-long-paths-in-windows/).

Без этой настройки созданные плагины не будут работать!

## Быстрый старт

Expand All @@ -94,7 +84,7 @@ pip install streamdeck_sdk
3. Перейдите в папку проекта, активируйте `venv` и установите библиотеку `streamdeck-sdk`:

```shell
pip install streamdeck-sdk
pip install streamdeck-sdk[dev]
```

4. Выполните команду для старта проекта:
Expand All @@ -107,6 +97,8 @@ streamdeck_sdk startproject

5. Соберите плагин с помощью команды:

> ⚠️ В файле `requirements.txt` не должно быть библиотек `streamdeck-sdk-*`. Если они есть - удалите их.
```shell
streamdeck_sdk build -i com.bestdeveloper.mytestplugin.sdPlugin
```
Expand Down Expand Up @@ -245,7 +237,7 @@ $PI.onSendToPropertyInspector("com.ggusev.keyboard.write", jsn => {
```python
from pathlib import Path

from streamdeck_sdk.property_inspector import *
from streamdeck_sdk_pi import *

OUTPUT_DIR = Path(__file__).parent
TEMPLATE = Path(__file__).parent / "pi_template.html"
Expand Down Expand Up @@ -544,7 +536,7 @@ if __name__ == '__main__':
```python
from pathlib import Path

from streamdeck_sdk.property_inspector import *
from streamdeck_sdk_pi import *

OUTPUT_DIR = Path(__file__).parent
TEMPLATE = Path(__file__).parent / "pi_template.html"
Expand Down
59 changes: 59 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
[build-system]
requires = ["setuptools >= 60.0"]
build-backend = "setuptools.build_meta"

[project]
name = "streamdeck_sdk"
version = "1.2.0.dev8"
authors = [
{ name = "Grigoriy Gusev", email = "[email protected]" },
]
description = "Library for creating Stream Deck plugins in Python."
readme = "README-PYPI.md"
dependencies = [
"annotated-types==0.7.0",
"decohints==1.0.9",
"pydantic==2.8.2",
"pydantic_core==2.20.1",
"typing_extensions==4.12.2",
"websockets==13.0.1",
]
requires-python = ">=3.8"
keywords = [
"property inspector",
"property inspector generator",
"streamdeck property inspector generator",
"streamdeck property inspector",
"streamdeck pi",
"python",
"sdk",
"streamdeck",
"streamdeck-sdk",
"streamdeck_sdk",
"stream deck sdk",
"stream deck",
"elgato",
"elgato sdk",
"elgato stream deck",
"streamdeck-python-sdk",
"streamdeck_python_sdk",
"streamdeck python sdk",
]
classifiers = [
"Programming Language :: Python :: 3.10",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
]

[project.optional-dependencies]
dev = [
"streamdeck-sdk-cli>=0.0.1.dev6,<0.0.2",
"streamdeck-sdk-pi>=0.0.1.dev1,<0.0.2",
]

[project.urls]
Homepage = "https://github.com/gri-gus/streamdeck-python-sdk"
Source = "https://github.com/gri-gus/streamdeck-python-sdk"

[tool.setuptools.packages.find]
where = ["src"]
6 changes: 0 additions & 6 deletions requirements.txt

This file was deleted.

61 changes: 0 additions & 61 deletions setup.py

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from . import mixins, property_inspector
from . import mixins
from .logger import logger, log_errors
from .sd_objs import events_received_objs, events_sent_objs, registration_objs
from .sdk import StreamDeck, Action
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
serve,
)

from streamdeck_sdk.mixins import SendMixin
from streamdeck_sdk.simple_ws.client import WebSocketClientApp
from streamdeck_sdk.utils.in_separate_thread import in_separate_thread
from .send_event_mixins import SendMixin
from ..simple_ws.client import WebSocketClientApp
from ..utils.in_separate_thread import in_separate_thread

logger = logging.getLogger(__name__)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@

import pydantic

from streamdeck_sdk import event_routings
from streamdeck_sdk.logger import (
from .. import event_routings
from ..logger import (
log_errors,
)
from streamdeck_sdk.mixins import EventsSendMixin
from streamdeck_sdk.simple_ws.client import WebSocketClientApp
from ..mixins.send_event_mixins import EventsSendMixin
from ..simple_ws.client import WebSocketClientApp

logger = logging.getLogger(__name__)

Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class LogMessagePayload(BaseModel):


class LogMessage(BaseModel):
"""
r"""
The plugin and Property Inspector can use the logMessage event to write a debug message to the logs file.
* Logs are saved to disk per plugin in the folder ~/Library/Logs/ElgatoStreamDeck/ on macOS
and %appdata%\Elgato\StreamDeck\logs\ on Windows. Note that the log files are rotated each time
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion streamdeck_sdk/sdk.py → src/streamdeck_sdk/sdk.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
rename_plugin_logger,
)
from .mixins import Base
from .mixins.event_routing_mixin import EventRoutingMixin
from .mixins.debug_server_mixin import DebugServerMixin
from .mixins.event_routing_mixin import EventRoutingMixin
from .sd_objs import registration_objs
from .simple_ws.client import WebSocketClientApp

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file removed streamdeck_sdk/executable/assets/DistributionTool
Binary file not shown.
Binary file not shown.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 83a161a

Please sign in to comment.