janus-api-streaming 0.2.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.
@@ -0,0 +1,15 @@
1
+ .venv/
2
+ __pycache__/
3
+ *.py[cod]
4
+ .pytest_cache/
5
+ .mypy_cache/
6
+ .ruff_cache/
7
+ .coverage
8
+ htmlcov/
9
+ build/
10
+ dist/
11
+ *.egg-info/
12
+ .DS_Store
13
+ .env
14
+ .env.*
15
+ !.env.example
@@ -0,0 +1,57 @@
1
+ Metadata-Version: 2.4
2
+ Name: janus-api-streaming
3
+ Version: 0.2.0
4
+ Summary: Typed Janus Streaming plugin and async toolkit for janus-api-core
5
+ Author: S.A
6
+ License: MIT
7
+ Requires-Python: >=3.14
8
+ Requires-Dist: janus-api-core<4,>=3
9
+ Requires-Dist: pydantic<3,>=2.12
10
+ Provides-Extra: dev
11
+ Requires-Dist: mypy<2,>=1.15; extra == 'dev'
12
+ Requires-Dist: pytest-asyncio<2,>=0.25; extra == 'dev'
13
+ Requires-Dist: pytest<9,>=8.3; extra == 'dev'
14
+ Requires-Dist: ruff<1,>=0.11; extra == 'dev'
15
+ Provides-Extra: test
16
+ Requires-Dist: pytest-asyncio<2,>=0.25; extra == 'test'
17
+ Requires-Dist: pytest<9,>=8.3; extra == 'test'
18
+ Description-Content-Type: text/markdown
19
+
20
+ # janus-api-streaming
21
+
22
+ A standalone, typed named-plugin distribution for `janus.plugin.streaming`. It
23
+ depends on `janus-api-core>=3,<4`, but **not** on the source orchestrator,
24
+ Django, Qt, FFmpeg, GStreamer, or SRS.
25
+
26
+ The package owns:
27
+
28
+ - the concrete `StreamingPlugin` subclass, published as the `streaming`
29
+ `janus_api.plugins` entry point;
30
+ - strict request models for every Streaming command in
31
+ `janus_streaming.requests` and forward-compatible response models in
32
+ `janus_streaming.responses`;
33
+ - typed convenience methods for every Streaming command on `StreamingPlugin`;
34
+ - a reusable administrative handle;
35
+ - stable mountpoint specifications and response models;
36
+ - one-handle-per-viewer negotiation state machines;
37
+ - operation deadlines and normalized errors;
38
+ - optional runtime helpers for applications that want the package to own a
39
+ `janus-api-core` session manager.
40
+
41
+ Core remains named-plugin-free: this package is the sole owner of the Streaming
42
+ implementation and never imports
43
+ `janus_api.models.streaming` or `janus_api.lib.plugins.streaming`, and never
44
+ asks core to provide a registered Streaming implementation. All direct core
45
+ imports are confined to `janus_streaming._compat`.
46
+
47
+ ```python
48
+ from janus_streaming import StreamingPlugin
49
+ from janus_streaming.requests import ListRequest
50
+
51
+ plugin = await StreamingPlugin(session=session).attach()
52
+ response = await plugin.send(ListRequest())
53
+ ```
54
+
55
+ Source lifecycle orchestration lives elsewhere. Install
56
+ `janus-stream-orchestrator` only when you want to expose this package as a
57
+ mountpoint backend to `stream-orchestrator`.
@@ -0,0 +1,38 @@
1
+ # janus-api-streaming
2
+
3
+ A standalone, typed named-plugin distribution for `janus.plugin.streaming`. It
4
+ depends on `janus-api-core>=3,<4`, but **not** on the source orchestrator,
5
+ Django, Qt, FFmpeg, GStreamer, or SRS.
6
+
7
+ The package owns:
8
+
9
+ - the concrete `StreamingPlugin` subclass, published as the `streaming`
10
+ `janus_api.plugins` entry point;
11
+ - strict request models for every Streaming command in
12
+ `janus_streaming.requests` and forward-compatible response models in
13
+ `janus_streaming.responses`;
14
+ - typed convenience methods for every Streaming command on `StreamingPlugin`;
15
+ - a reusable administrative handle;
16
+ - stable mountpoint specifications and response models;
17
+ - one-handle-per-viewer negotiation state machines;
18
+ - operation deadlines and normalized errors;
19
+ - optional runtime helpers for applications that want the package to own a
20
+ `janus-api-core` session manager.
21
+
22
+ Core remains named-plugin-free: this package is the sole owner of the Streaming
23
+ implementation and never imports
24
+ `janus_api.models.streaming` or `janus_api.lib.plugins.streaming`, and never
25
+ asks core to provide a registered Streaming implementation. All direct core
26
+ imports are confined to `janus_streaming._compat`.
27
+
28
+ ```python
29
+ from janus_streaming import StreamingPlugin
30
+ from janus_streaming.requests import ListRequest
31
+
32
+ plugin = await StreamingPlugin(session=session).attach()
33
+ response = await plugin.send(ListRequest())
34
+ ```
35
+
36
+ Source lifecycle orchestration lives elsewhere. Install
37
+ `janus-stream-orchestrator` only when you want to expose this package as a
38
+ mountpoint backend to `stream-orchestrator`.
@@ -0,0 +1,37 @@
1
+ [build-system]
2
+ requires = ["hatchling>=1.27"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "janus-api-streaming"
7
+ version = "0.2.0"
8
+ description = "Typed Janus Streaming plugin and async toolkit for janus-api-core"
9
+ readme = "README.md"
10
+ license = { text = "MIT" }
11
+ requires-python = ">=3.14"
12
+ authors = [{ name = "S.A" }]
13
+ dependencies = [
14
+ "janus-api-core>=3,<4",
15
+ "pydantic>=2.12,<3",
16
+ ]
17
+
18
+ [project.entry-points."janus_api.plugins"]
19
+ streaming = "janus_streaming._compat:StreamingPlugin"
20
+
21
+ [project.optional-dependencies]
22
+ test = ["pytest>=8.3,<9", "pytest-asyncio>=0.25,<2"]
23
+ dev = ["janus-api-streaming[test]", "mypy>=1.15,<2", "ruff>=0.11,<1"]
24
+
25
+ [tool.hatch.build.targets.wheel]
26
+ packages = ["src/janus_streaming"]
27
+
28
+ [tool.pytest.ini_options]
29
+ asyncio_mode = "auto"
30
+ testpaths = ["tests"]
31
+
32
+ [tool.ruff]
33
+ target-version = "py314"
34
+ line-length = 100
35
+
36
+ [tool.ruff.lint]
37
+ select = ["E", "F", "I", "UP", "B", "ASYNC", "RUF"]
@@ -0,0 +1,67 @@
1
+ from ._compat import StreamingPlugin
2
+ from .admin import StreamingAdminClient
3
+ from .errors import (
4
+ InvalidViewerState,
5
+ JanusCommandError,
6
+ StreamingBackendError,
7
+ StreamingError,
8
+ StreamingNotStarted,
9
+ StreamingProtocolError,
10
+ StreamingTimeout,
11
+ )
12
+ from .models import (
13
+ AudioTrackSpec,
14
+ ConfigureStream,
15
+ CreatedMountpoint,
16
+ CreatedPort,
17
+ DataTrackSpec,
18
+ FileMountpointSpec,
19
+ IceCandidate,
20
+ MountpointInfo,
21
+ MountpointSummary,
22
+ MountpointTrack,
23
+ RtpMountpointSpec,
24
+ RtspMountpointSpec,
25
+ SessionDescription,
26
+ VideoTrackSpec,
27
+ ViewerState,
28
+ )
29
+ from .requests import StreamingRequest, StreamingRequestModel
30
+ from .responses import StreamingResponse, StreamingResponseModel
31
+ from .runtime import ManagedStreamingRuntime, StreamingRuntime, StreamingRuntimeSettings
32
+ from .viewer import StreamingViewer
33
+
34
+ __all__ = [
35
+ "AudioTrackSpec",
36
+ "ConfigureStream",
37
+ "CreatedMountpoint",
38
+ "CreatedPort",
39
+ "DataTrackSpec",
40
+ "FileMountpointSpec",
41
+ "IceCandidate",
42
+ "InvalidViewerState",
43
+ "JanusCommandError",
44
+ "ManagedStreamingRuntime",
45
+ "MountpointInfo",
46
+ "MountpointSummary",
47
+ "MountpointTrack",
48
+ "RtpMountpointSpec",
49
+ "RtspMountpointSpec",
50
+ "SessionDescription",
51
+ "StreamingAdminClient",
52
+ "StreamingBackendError",
53
+ "StreamingError",
54
+ "StreamingNotStarted",
55
+ "StreamingPlugin",
56
+ "StreamingProtocolError",
57
+ "StreamingRequest",
58
+ "StreamingRequestModel",
59
+ "StreamingResponse",
60
+ "StreamingResponseModel",
61
+ "StreamingRuntime",
62
+ "StreamingRuntimeSettings",
63
+ "StreamingTimeout",
64
+ "StreamingViewer",
65
+ "VideoTrackSpec",
66
+ "ViewerState",
67
+ ]