tigr-asgi-contract 0.1.2.dev15__tar.gz → 0.3.2.dev1__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.
- {tigr_asgi_contract-0.1.2.dev15 → tigr_asgi_contract-0.3.2.dev1}/PKG-INFO +11 -8
- {tigr_asgi_contract-0.1.2.dev15 → tigr_asgi_contract-0.3.2.dev1}/README.md +10 -7
- {tigr_asgi_contract-0.1.2.dev15 → tigr_asgi_contract-0.3.2.dev1}/pyproject.toml +1 -1
- {tigr_asgi_contract-0.1.2.dev15 → tigr_asgi_contract-0.3.2.dev1}/src/tigr_asgi_contract/__init__.py +6 -3
- {tigr_asgi_contract-0.1.2.dev15 → tigr_asgi_contract-0.3.2.dev1}/src/tigr_asgi_contract/events.py +1 -0
- tigr_asgi_contract-0.3.2.dev1/src/tigr_asgi_contract/frames.py +38 -0
- tigr_asgi_contract-0.3.2.dev1/src/tigr_asgi_contract/protocols.py +16 -0
- tigr_asgi_contract-0.3.2.dev1/src/tigr_asgi_contract/registry.py +599 -0
- tigr_asgi_contract-0.3.2.dev1/src/tigr_asgi_contract/validators.py +48 -0
- tigr_asgi_contract-0.3.2.dev1/src/tigr_asgi_contract/version.py +2 -0
- tigr_asgi_contract-0.1.2.dev15/src/tigr_asgi_contract/registry.py +0 -366
- tigr_asgi_contract-0.1.2.dev15/src/tigr_asgi_contract/validators.py +0 -22
- tigr_asgi_contract-0.1.2.dev15/src/tigr_asgi_contract/version.py +0 -2
- {tigr_asgi_contract-0.1.2.dev15 → tigr_asgi_contract-0.3.2.dev1}/.gitignore +0 -0
- {tigr_asgi_contract-0.1.2.dev15 → tigr_asgi_contract-0.3.2.dev1}/LICENSE +0 -0
- {tigr_asgi_contract-0.1.2.dev15 → tigr_asgi_contract-0.3.2.dev1}/src/tigr_asgi_contract/_enum_compat.py +0 -0
- {tigr_asgi_contract-0.1.2.dev15 → tigr_asgi_contract-0.3.2.dev1}/src/tigr_asgi_contract/bindings.py +0 -0
- {tigr_asgi_contract-0.1.2.dev15 → tigr_asgi_contract-0.3.2.dev1}/src/tigr_asgi_contract/capabilities.py +0 -0
- {tigr_asgi_contract-0.1.2.dev15 → tigr_asgi_contract-0.3.2.dev1}/src/tigr_asgi_contract/compatibility.py +0 -0
- {tigr_asgi_contract-0.1.2.dev15 → tigr_asgi_contract-0.3.2.dev1}/src/tigr_asgi_contract/completion.py +0 -0
- {tigr_asgi_contract-0.1.2.dev15 → tigr_asgi_contract-0.3.2.dev1}/src/tigr_asgi_contract/exchanges.py +0 -0
- {tigr_asgi_contract-0.1.2.dev15 → tigr_asgi_contract-0.3.2.dev1}/src/tigr_asgi_contract/families.py +0 -0
- {tigr_asgi_contract-0.1.2.dev15 → tigr_asgi_contract-0.3.2.dev1}/src/tigr_asgi_contract/ids.py +0 -0
- {tigr_asgi_contract-0.1.2.dev15 → tigr_asgi_contract-0.3.2.dev1}/src/tigr_asgi_contract/models.py +0 -0
- {tigr_asgi_contract-0.1.2.dev15 → tigr_asgi_contract-0.3.2.dev1}/src/tigr_asgi_contract/scope.py +0 -0
- {tigr_asgi_contract-0.1.2.dev15 → tigr_asgi_contract-0.3.2.dev1}/src/tigr_asgi_contract/scope_types.py +0 -0
- {tigr_asgi_contract-0.1.2.dev15 → tigr_asgi_contract-0.3.2.dev1}/src/tigr_asgi_contract/subevents.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: tigr-asgi-contract
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.2.dev1
|
|
4
4
|
Summary: Generated Python contract bindings for the Tigr ASGI contract
|
|
5
5
|
License: Apache-2.0
|
|
6
6
|
License-File: LICENSE
|
|
@@ -16,9 +16,9 @@ Generated Python contract package for the Tigr ASGI contract. It is generated fr
|
|
|
16
16
|
|
|
17
17
|
| Ecosystem | Package | Version | Path | Surface files | Notes |
|
|
18
18
|
| --- | --- | --- | --- | --- | --- |
|
|
19
|
-
| python | **`tigr-asgi-contract`** | `0.
|
|
20
|
-
| npm | `@tigrbljs/tigr-asgi-contract` | `0.
|
|
21
|
-
| rust | `tigr_asgi_contract_rs` | `0.
|
|
19
|
+
| python | **`tigr-asgi-contract`** | `0.3.2-dev1` | `packages/contract-py` | 18 | Enums, models, validators |
|
|
20
|
+
| npm | `@tigrbljs/tigr-asgi-contract` | `0.3.2-dev1` | `packages/contract-npm` | 20 | TypeScript and TSX surfaces |
|
|
21
|
+
| rust | `tigr_asgi_contract_rs` | `0.3.2-dev1` | `packages/contract-rs` | 17 | Serde-friendly contract surfaces |
|
|
22
22
|
|
|
23
23
|
## Generated Surface Matrix
|
|
24
24
|
|
|
@@ -32,8 +32,10 @@ Generated Python contract package for the Tigr ASGI contract. It is generated fr
|
|
|
32
32
|
| `events` | `tigr_asgi_contract/events.py` |
|
|
33
33
|
| `exchanges` | `tigr_asgi_contract/exchanges.py` |
|
|
34
34
|
| `families` | `tigr_asgi_contract/families.py` |
|
|
35
|
+
| `frames` | `tigr_asgi_contract/frames.py` |
|
|
35
36
|
| `ids` | `tigr_asgi_contract/ids.py` |
|
|
36
37
|
| `models` | `tigr_asgi_contract/models.py` |
|
|
38
|
+
| `protocols` | `tigr_asgi_contract/protocols.py` |
|
|
37
39
|
| `registry` | `tigr_asgi_contract/registry.py` |
|
|
38
40
|
| `scope` | `tigr_asgi_contract/scope.py` |
|
|
39
41
|
| `scope_types` | `tigr_asgi_contract/scope_types.py` |
|
|
@@ -46,15 +48,15 @@ Generated Python contract package for the Tigr ASGI contract. It is generated fr
|
|
|
46
48
|
| Field | Value |
|
|
47
49
|
| --- | --- |
|
|
48
50
|
| Contract name | `tigr-asgi-contract` |
|
|
49
|
-
| Contract version | `0.
|
|
50
|
-
| Artifact version | `0.
|
|
51
|
+
| Contract version | `0.3.2-dev1` |
|
|
52
|
+
| Artifact version | `0.3.2-dev1` |
|
|
51
53
|
| Serde version | `1` |
|
|
52
54
|
| Schema draft | `2020-12` |
|
|
53
55
|
| Bindings | 6 |
|
|
54
56
|
| Families | 5 |
|
|
55
57
|
| Subevents | 42 |
|
|
56
58
|
| Scope types | 4 |
|
|
57
|
-
| Event types |
|
|
59
|
+
| Event types | 26 |
|
|
58
60
|
|
|
59
61
|
## Scope Type Matrix
|
|
60
62
|
|
|
@@ -81,7 +83,7 @@ Generated Python contract package for the Tigr ASGI contract. It is generated fr
|
|
|
81
83
|
| Compatibility field | Value | Meaning | Source |
|
|
82
84
|
| --- | --- | --- | --- |
|
|
83
85
|
| `contract_name` | `tigr-asgi-contract` | Canonical contract identifier | `contract/compatibility.yaml` |
|
|
84
|
-
| `contract_version` | `0.1.
|
|
86
|
+
| `contract_version` | `0.1.2` | Published contract version | `contract/compatibility.yaml` |
|
|
85
87
|
| `serde_version` | `1` | Serialization surface version | `contract/compatibility.yaml` |
|
|
86
88
|
| `schema_draft` | `2020-12` | JSON Schema draft level | `contract/compatibility.yaml` |
|
|
87
89
|
|
|
@@ -100,6 +102,7 @@ Generated Python contract package for the Tigr ASGI contract. It is generated fr
|
|
|
100
102
|
| `http.disconnect` | `http` | `http.stream`, `jsonrpc`, `rest`, `sse` | `request.disconnect`, `stream.abort` | HTTP connection closed by peer or server |
|
|
101
103
|
| `http.response.start` | `http` | `http.stream`, `jsonrpc`, `rest`, `sse` | `response.open`, `stream.open` | HTTP response metadata start |
|
|
102
104
|
| `http.response.body` | `http` | `http.stream`, `jsonrpc`, `rest`, `sse` | `message.out`, `message.replay`, `message.snapshot`, `response.body_out`, `response.chunk_out`, `response.close`, `stream.chunk_out`, `stream.close`, `stream.finalize`, `stream.flush` | HTTP response body frame |
|
|
105
|
+
| `http.response.pathsend` | `http` | `http.stream`, `jsonrpc`, `rest`, `sse` | - | |
|
|
103
106
|
| `websocket.connect` | `websocket` | `websocket` | `session.open` | WebSocket connection open event |
|
|
104
107
|
| `websocket.receive` | `websocket` | `websocket` | `message.decode`, `message.handle`, `message.in` | Inbound WebSocket frame |
|
|
105
108
|
| `websocket.disconnect` | `websocket` | `websocket` | `session.disconnect` | WebSocket disconnect signal |
|
|
@@ -6,9 +6,9 @@ Generated Python contract package for the Tigr ASGI contract. It is generated fr
|
|
|
6
6
|
|
|
7
7
|
| Ecosystem | Package | Version | Path | Surface files | Notes |
|
|
8
8
|
| --- | --- | --- | --- | --- | --- |
|
|
9
|
-
| python | **`tigr-asgi-contract`** | `0.
|
|
10
|
-
| npm | `@tigrbljs/tigr-asgi-contract` | `0.
|
|
11
|
-
| rust | `tigr_asgi_contract_rs` | `0.
|
|
9
|
+
| python | **`tigr-asgi-contract`** | `0.3.2-dev1` | `packages/contract-py` | 18 | Enums, models, validators |
|
|
10
|
+
| npm | `@tigrbljs/tigr-asgi-contract` | `0.3.2-dev1` | `packages/contract-npm` | 20 | TypeScript and TSX surfaces |
|
|
11
|
+
| rust | `tigr_asgi_contract_rs` | `0.3.2-dev1` | `packages/contract-rs` | 17 | Serde-friendly contract surfaces |
|
|
12
12
|
|
|
13
13
|
## Generated Surface Matrix
|
|
14
14
|
|
|
@@ -22,8 +22,10 @@ Generated Python contract package for the Tigr ASGI contract. It is generated fr
|
|
|
22
22
|
| `events` | `tigr_asgi_contract/events.py` |
|
|
23
23
|
| `exchanges` | `tigr_asgi_contract/exchanges.py` |
|
|
24
24
|
| `families` | `tigr_asgi_contract/families.py` |
|
|
25
|
+
| `frames` | `tigr_asgi_contract/frames.py` |
|
|
25
26
|
| `ids` | `tigr_asgi_contract/ids.py` |
|
|
26
27
|
| `models` | `tigr_asgi_contract/models.py` |
|
|
28
|
+
| `protocols` | `tigr_asgi_contract/protocols.py` |
|
|
27
29
|
| `registry` | `tigr_asgi_contract/registry.py` |
|
|
28
30
|
| `scope` | `tigr_asgi_contract/scope.py` |
|
|
29
31
|
| `scope_types` | `tigr_asgi_contract/scope_types.py` |
|
|
@@ -36,15 +38,15 @@ Generated Python contract package for the Tigr ASGI contract. It is generated fr
|
|
|
36
38
|
| Field | Value |
|
|
37
39
|
| --- | --- |
|
|
38
40
|
| Contract name | `tigr-asgi-contract` |
|
|
39
|
-
| Contract version | `0.
|
|
40
|
-
| Artifact version | `0.
|
|
41
|
+
| Contract version | `0.3.2-dev1` |
|
|
42
|
+
| Artifact version | `0.3.2-dev1` |
|
|
41
43
|
| Serde version | `1` |
|
|
42
44
|
| Schema draft | `2020-12` |
|
|
43
45
|
| Bindings | 6 |
|
|
44
46
|
| Families | 5 |
|
|
45
47
|
| Subevents | 42 |
|
|
46
48
|
| Scope types | 4 |
|
|
47
|
-
| Event types |
|
|
49
|
+
| Event types | 26 |
|
|
48
50
|
|
|
49
51
|
## Scope Type Matrix
|
|
50
52
|
|
|
@@ -71,7 +73,7 @@ Generated Python contract package for the Tigr ASGI contract. It is generated fr
|
|
|
71
73
|
| Compatibility field | Value | Meaning | Source |
|
|
72
74
|
| --- | --- | --- | --- |
|
|
73
75
|
| `contract_name` | `tigr-asgi-contract` | Canonical contract identifier | `contract/compatibility.yaml` |
|
|
74
|
-
| `contract_version` | `0.1.
|
|
76
|
+
| `contract_version` | `0.1.2` | Published contract version | `contract/compatibility.yaml` |
|
|
75
77
|
| `serde_version` | `1` | Serialization surface version | `contract/compatibility.yaml` |
|
|
76
78
|
| `schema_draft` | `2020-12` | JSON Schema draft level | `contract/compatibility.yaml` |
|
|
77
79
|
|
|
@@ -90,6 +92,7 @@ Generated Python contract package for the Tigr ASGI contract. It is generated fr
|
|
|
90
92
|
| `http.disconnect` | `http` | `http.stream`, `jsonrpc`, `rest`, `sse` | `request.disconnect`, `stream.abort` | HTTP connection closed by peer or server |
|
|
91
93
|
| `http.response.start` | `http` | `http.stream`, `jsonrpc`, `rest`, `sse` | `response.open`, `stream.open` | HTTP response metadata start |
|
|
92
94
|
| `http.response.body` | `http` | `http.stream`, `jsonrpc`, `rest`, `sse` | `message.out`, `message.replay`, `message.snapshot`, `response.body_out`, `response.chunk_out`, `response.close`, `stream.chunk_out`, `stream.close`, `stream.finalize`, `stream.flush` | HTTP response body frame |
|
|
95
|
+
| `http.response.pathsend` | `http` | `http.stream`, `jsonrpc`, `rest`, `sse` | - | |
|
|
93
96
|
| `websocket.connect` | `websocket` | `websocket` | `session.open` | WebSocket connection open event |
|
|
94
97
|
| `websocket.receive` | `websocket` | `websocket` | `message.decode`, `message.handle`, `message.in` | Inbound WebSocket frame |
|
|
95
98
|
| `websocket.disconnect` | `websocket` | `websocket` | `session.disconnect` | WebSocket disconnect signal |
|
{tigr_asgi_contract-0.1.2.dev15 → tigr_asgi_contract-0.3.2.dev1}/src/tigr_asgi_contract/__init__.py
RENAMED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
from .version import CONTRACT_VERSION, CONTRACT_SERDE_VERSION
|
|
2
2
|
from .scope_types import ScopeType
|
|
3
3
|
from .bindings import Binding
|
|
4
|
+
from .protocols import Protocol
|
|
4
5
|
from .exchanges import Exchange
|
|
5
6
|
from .families import Family
|
|
6
7
|
from .subevents import Subevent
|
|
8
|
+
from .frames import Frame
|
|
7
9
|
from .completion import EmitCompletionLevel
|
|
8
10
|
from .capabilities import FamilyCapabilities
|
|
9
11
|
from .compatibility import Compatibility
|
|
@@ -11,12 +13,13 @@ from .ids import UnitIds
|
|
|
11
13
|
from .models import TlsMetadata, TransportMetadata, WebSocketScopeExt, SseScopeExt, WebTransportScopeExt, ScopeExt, DerivedEvent
|
|
12
14
|
from .scope import ContractScope
|
|
13
15
|
from .events import TransportEventType, ContractEvent
|
|
14
|
-
from .validators import binding_supports_family, family_supports_subevent, binding_supports_subevent, binding_family_legality, binding_subevent_legality
|
|
16
|
+
from .validators import binding_supports_family, family_supports_subevent, binding_supports_subevent, binding_family_legality, binding_subevent_legality, protocol_binding, validate_automata_sequence, validate_event_payload
|
|
15
17
|
|
|
16
18
|
__all__ = [
|
|
17
|
-
"CONTRACT_VERSION", "CONTRACT_SERDE_VERSION", "ScopeType", "Binding", "Exchange", "Family", "Subevent",
|
|
19
|
+
"CONTRACT_VERSION", "CONTRACT_SERDE_VERSION", "ScopeType", "Binding", "Protocol", "Exchange", "Family", "Subevent", "Frame",
|
|
18
20
|
"EmitCompletionLevel", "FamilyCapabilities", "Compatibility", "UnitIds", "TlsMetadata", "TransportMetadata",
|
|
19
21
|
"WebSocketScopeExt", "SseScopeExt", "WebTransportScopeExt", "ScopeExt", "DerivedEvent", "ContractScope",
|
|
20
22
|
"TransportEventType", "ContractEvent", "binding_supports_family", "family_supports_subevent",
|
|
21
|
-
"binding_supports_subevent", "binding_family_legality", "binding_subevent_legality",
|
|
23
|
+
"binding_supports_subevent", "binding_family_legality", "binding_subevent_legality", "protocol_binding",
|
|
24
|
+
"validate_automata_sequence", "validate_event_payload",
|
|
22
25
|
]
|
{tigr_asgi_contract-0.1.2.dev15 → tigr_asgi_contract-0.3.2.dev1}/src/tigr_asgi_contract/events.py
RENAMED
|
@@ -7,6 +7,7 @@ class TransportEventType(StrEnum):
|
|
|
7
7
|
HTTP_DISCONNECT = 'http.disconnect'
|
|
8
8
|
HTTP_RESPONSE_START = 'http.response.start'
|
|
9
9
|
HTTP_RESPONSE_BODY = 'http.response.body'
|
|
10
|
+
HTTP_RESPONSE_PATHSEND = 'http.response.pathsend'
|
|
10
11
|
WEBSOCKET_CONNECT = 'websocket.connect'
|
|
11
12
|
WEBSOCKET_RECEIVE = 'websocket.receive'
|
|
12
13
|
WEBSOCKET_DISCONNECT = 'websocket.disconnect'
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
from ._enum_compat import StrEnum
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class Frame(StrEnum):
|
|
5
|
+
APP = 'app'
|
|
6
|
+
ASGI_TLS_EXTENSION = 'asgi-tls-extension'
|
|
7
|
+
ASGI_PATHSEND_EXTENSION = 'asgi-pathsend-extension'
|
|
8
|
+
BYTES = 'bytes'
|
|
9
|
+
GRPC = 'grpc'
|
|
10
|
+
HTTP_1_1_MESSAGE = 'http-1-1-message'
|
|
11
|
+
HTTP_REQUEST_BODY_CHUNK = 'http-request-body-chunk'
|
|
12
|
+
HTTP_RESPONSE_BODY_CHUNK = 'http-response-body-chunk'
|
|
13
|
+
HTTP_RESPONSE_START_FRAME = 'http-response-start-frame'
|
|
14
|
+
JSON = 'json'
|
|
15
|
+
JSONRPC = 'jsonrpc'
|
|
16
|
+
JSON_RPC_REQUEST_OBJECT = 'json-rpc-request-object'
|
|
17
|
+
JSON_RPC_RESPONSE_OBJECT = 'json-rpc-response-object'
|
|
18
|
+
JSON_RPC_NOTIFICATION_OBJECT = 'json-rpc-notification-object'
|
|
19
|
+
JSON_RPC_ERROR_OBJECT = 'json-rpc-error-object'
|
|
20
|
+
RAW = 'raw'
|
|
21
|
+
SSE = 'sse'
|
|
22
|
+
SSE_DATA_FIELD = 'sse-data-field'
|
|
23
|
+
SSE_EVENT_FIELD = 'sse-event-field'
|
|
24
|
+
SSE_ID_FIELD = 'sse-id-field'
|
|
25
|
+
SSE_RETRY_FIELD = 'sse-retry-field'
|
|
26
|
+
WEBSOCKET_FRAME = 'websocket-frame'
|
|
27
|
+
WEBSOCKET_ACCEPT_FRAME = 'websocket-accept-frame'
|
|
28
|
+
WEBSOCKET_CLOSE_FRAME = 'websocket-close-frame'
|
|
29
|
+
WEBSOCKET_CONTINUATION_FRAME = 'websocket-continuation-frame'
|
|
30
|
+
WEBSOCKET_DISCONNECT_FRAME = 'websocket-disconnect-frame'
|
|
31
|
+
WEBSOCKET_PING_FRAME = 'websocket-ping-frame'
|
|
32
|
+
WEBSOCKET_PONG_FRAME = 'websocket-pong-frame'
|
|
33
|
+
WEBSOCKET_RECEIVE_BYTES = 'websocket-receive-bytes'
|
|
34
|
+
WEBSOCKET_RECEIVE_TEXT = 'websocket-receive-text'
|
|
35
|
+
WEBSOCKET_SEND_BYTES = 'websocket-send-bytes'
|
|
36
|
+
WEBSOCKET_SEND_TEXT = 'websocket-send-text'
|
|
37
|
+
WEBTRANSPORT_DATAGRAM_FRAME = 'webtransport-datagram-frame'
|
|
38
|
+
WEBTRANSPORT_STREAM_FRAME = 'webtransport-stream-frame'
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
from ._enum_compat import StrEnum
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class Protocol(StrEnum):
|
|
5
|
+
HTTP_REST = 'http.rest'
|
|
6
|
+
HTTPS_REST = 'https.rest'
|
|
7
|
+
HTTP_JSONRPC = 'http.jsonrpc'
|
|
8
|
+
HTTPS_JSONRPC = 'https.jsonrpc'
|
|
9
|
+
HTTP_STREAM = 'http.stream'
|
|
10
|
+
HTTPS_STREAM = 'https.stream'
|
|
11
|
+
HTTP_SSE = 'http.sse'
|
|
12
|
+
HTTPS_SSE = 'https.sse'
|
|
13
|
+
WS = 'ws'
|
|
14
|
+
WSS = 'wss'
|
|
15
|
+
WEBTRANSPORT = 'webtransport'
|
|
16
|
+
ASGI_PATHSEND = 'asgi.pathsend'
|