hanafubuki-extension 0.4.16__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.
@@ -0,0 +1,45 @@
1
+ # Logs
2
+ # logs
3
+ !src-tauri/crates/hanafubuki-server-supervisor/src/logs/
4
+ !src-tauri/crates/hanafubuki-server-supervisor/src/logs/tests.rs
5
+ *.log
6
+ npm-debug.log*
7
+ yarn-debug.log*
8
+ yarn-error.log*
9
+ pnpm-debug.log*
10
+ lerna-debug.log*
11
+
12
+ node_modules
13
+ .venv/
14
+ dist
15
+ dist-ssr
16
+ *.local
17
+ *.tsbuildinfo
18
+ __pycache__/
19
+ *.py[cod]
20
+ *.egg-info/
21
+
22
+ # Rust build artifacts
23
+ /launcher/target/
24
+
25
+ # Generated prebuild assets
26
+ src-tauri/generated/python-assets/
27
+ src-tauri/generated/extension-sdk/
28
+ src-tauri/generated/micromamba/
29
+ src-tauri/generated/bin/
30
+ src-tauri/generated/frame-ui/
31
+ .cache/
32
+
33
+ # site
34
+ website/
35
+
36
+ # Editor directories and files
37
+ .vscode/*
38
+ !.vscode/extensions.json
39
+ .idea
40
+ .DS_Store
41
+ *.suo
42
+ *.ntvs*
43
+ *.njsproj
44
+ *.sln
45
+ *.sw?
@@ -0,0 +1,25 @@
1
+ Metadata-Version: 2.5
2
+ Name: hanafubuki-extension
3
+ Version: 0.4.16
4
+ Summary: Python SDK for Hanafubuki extension backends
5
+ Project-URL: Homepage, https://github.com/licyk/Hanafubuki
6
+ Requires-Python: >=3.10
7
+ Requires-Dist: pykardia==0.6.0
8
+ Description-Content-Type: text/markdown
9
+
10
+ # Hanafubuki extension SDK for Python
11
+
12
+ Declare `hanafubuki-extension` in the extension's `requirements.txt` and reference that file from the manifest's `[backend]` table. Hanafubuki installs the SDK and its Kardia process guest dependency before starting the backend.
13
+
14
+ With `useBundledSdk = true` in the manifest’s `[backend]` table, the host puts its bundled SDK and Kardia runtime first on the backend’s `PYTHONPATH`. Omit the SDK from requirements in this mode. The switch defaults to false and applies only to this Python backend.
15
+
16
+ ```python
17
+ from hanafubuki_extension import Handler, run_guest
18
+
19
+ if __name__ == "__main__":
20
+ run_guest(Handler())
21
+ ```
22
+
23
+ The distribution version follows the desktop release. Declare compatible application versions separately in `engines.hanafubuki`.
24
+
25
+ To install the standalone SDK from this source directory, run `python -m pip install .`. The documentation archive includes the guest tests; run `python -m unittest discover -s tests` after installation.
@@ -0,0 +1,16 @@
1
+ # Hanafubuki extension SDK for Python
2
+
3
+ Declare `hanafubuki-extension` in the extension's `requirements.txt` and reference that file from the manifest's `[backend]` table. Hanafubuki installs the SDK and its Kardia process guest dependency before starting the backend.
4
+
5
+ With `useBundledSdk = true` in the manifest’s `[backend]` table, the host puts its bundled SDK and Kardia runtime first on the backend’s `PYTHONPATH`. Omit the SDK from requirements in this mode. The switch defaults to false and applies only to this Python backend.
6
+
7
+ ```python
8
+ from hanafubuki_extension import Handler, run_guest
9
+
10
+ if __name__ == "__main__":
11
+ run_guest(Handler())
12
+ ```
13
+
14
+ The distribution version follows the desktop release. Declare compatible application versions separately in `engines.hanafubuki`.
15
+
16
+ To install the standalone SDK from this source directory, run `python -m pip install .`. The documentation archive includes the guest tests; run `python -m unittest discover -s tests` after installation.
@@ -0,0 +1,36 @@
1
+ """Hanafubuki's extension SDK for Python backends (``docs/extension-protocol.md``).
2
+
3
+ A backend subclasses ``Handler`` and calls ``run_guest(handler)``. Python 3.10 or later.
4
+ """
5
+
6
+ from .backend import HOOKS, Handler, Host
7
+ from .guest import run_guest
8
+ from .protocol import (
9
+ BUSY,
10
+ INTERNAL_ERROR,
11
+ INVALID_PARAMS,
12
+ METHOD_NOT_FOUND,
13
+ PERMISSION_DENIED,
14
+ PROTOCOL_VERSION,
15
+ REQUEST_FAILED,
16
+ TIMED_OUT,
17
+ UNAVAILABLE,
18
+ RpcError,
19
+ )
20
+
21
+ __all__ = [
22
+ "BUSY",
23
+ "HOOKS",
24
+ "INTERNAL_ERROR",
25
+ "INVALID_PARAMS",
26
+ "METHOD_NOT_FOUND",
27
+ "PERMISSION_DENIED",
28
+ "PROTOCOL_VERSION",
29
+ "REQUEST_FAILED",
30
+ "TIMED_OUT",
31
+ "UNAVAILABLE",
32
+ "Handler",
33
+ "Host",
34
+ "RpcError",
35
+ "run_guest",
36
+ ]