tigrcorn-http 0.3.16.dev5__py3-none-any.whl

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,358 @@
1
+ from __future__ import annotations
2
+
3
+ import base64
4
+ from dataclasses import dataclass, field
5
+ from decimal import Decimal
6
+ from typing import Any
7
+
8
+ from tigrcorn_config.governance_surface import STRUCTURED_FIELD_REGISTRY
9
+
10
+
11
+ @dataclass(frozen=True, slots=True)
12
+ class Token:
13
+ value: str
14
+
15
+
16
+ @dataclass(frozen=True, slots=True)
17
+ class ByteSequence:
18
+ value: bytes
19
+
20
+
21
+ @dataclass(frozen=True, slots=True)
22
+ class Date:
23
+ value: int
24
+
25
+
26
+ BareItem = bool | int | Decimal | str | Token | ByteSequence | Date
27
+
28
+
29
+ @dataclass(frozen=True, slots=True)
30
+ class Item:
31
+ value: BareItem
32
+ params: dict[str, BareItem] = field(default_factory=dict)
33
+
34
+
35
+ @dataclass(frozen=True, slots=True)
36
+ class InnerList:
37
+ items: list[Item]
38
+ params: dict[str, BareItem] = field(default_factory=dict)
39
+
40
+
41
+ ListMember = Item | InnerList
42
+ StructuredValue = Item | list[ListMember] | dict[str, ListMember]
43
+
44
+
45
+ class StructuredFieldError(ValueError):
46
+ pass
47
+
48
+
49
+ class _Parser:
50
+ def __init__(self, text: str):
51
+ self.text = text
52
+ self.length = len(text)
53
+ self.index = 0
54
+
55
+ def parse_dictionary(self) -> dict[str, ListMember]:
56
+ result: dict[str, ListMember] = {}
57
+ while True:
58
+ self._skip_ows()
59
+ if self.index >= self.length:
60
+ return result
61
+ key = self._parse_key()
62
+ self._skip_ows()
63
+ if self._peek('='):
64
+ self.index += 1
65
+ member = self.parse_list_member()
66
+ else:
67
+ params = self._parse_parameters()
68
+ member = Item(True, params)
69
+ result[key] = member
70
+ self._skip_ows()
71
+ if self.index >= self.length:
72
+ return result
73
+ self._expect(',')
74
+
75
+ def parse_list(self) -> list[ListMember]:
76
+ result: list[ListMember] = []
77
+ while True:
78
+ self._skip_ows()
79
+ if self.index >= self.length:
80
+ return result
81
+ result.append(self.parse_list_member())
82
+ self._skip_ows()
83
+ if self.index >= self.length:
84
+ return result
85
+ self._expect(',')
86
+
87
+ def parse_item_only(self) -> Item:
88
+ item = self._parse_item()
89
+ self._skip_ows()
90
+ if self.index != self.length:
91
+ raise StructuredFieldError('unexpected trailing data in structured item')
92
+ return item
93
+
94
+ def parse_list_member(self) -> ListMember:
95
+ self._skip_ows()
96
+ if self._peek('('):
97
+ self.index += 1
98
+ items: list[Item] = []
99
+ while True:
100
+ self._skip_sp()
101
+ if self._peek(')'):
102
+ self.index += 1
103
+ break
104
+ items.append(self._parse_item())
105
+ self._skip_sp()
106
+ if self._peek(')'):
107
+ self.index += 1
108
+ break
109
+ return InnerList(items, self._parse_parameters())
110
+ return self._parse_item()
111
+
112
+ def _parse_item(self) -> Item:
113
+ bare = self._parse_bare_item()
114
+ return Item(bare, self._parse_parameters())
115
+
116
+ def _parse_parameters(self) -> dict[str, BareItem]:
117
+ params: dict[str, BareItem] = {}
118
+ while self._peek(';'):
119
+ self.index += 1
120
+ key = self._parse_key()
121
+ value: BareItem = True
122
+ if self._peek('='):
123
+ self.index += 1
124
+ value = self._parse_bare_item()
125
+ params[key] = value
126
+ return params
127
+
128
+ def _parse_bare_item(self) -> BareItem:
129
+ if self.index >= self.length:
130
+ raise StructuredFieldError('unexpected end of structured field')
131
+ char = self.text[self.index]
132
+ if char == '"':
133
+ return self._parse_string()
134
+ if char == '?':
135
+ return self._parse_boolean()
136
+ if char == ':':
137
+ return self._parse_bytes()
138
+ if char == '@':
139
+ return self._parse_date()
140
+ if char == '-' or char.isdigit():
141
+ return self._parse_number()
142
+ return Token(self._parse_token())
143
+
144
+ def _parse_string(self) -> str:
145
+ self._expect('"')
146
+ chunks: list[str] = []
147
+ while self.index < self.length:
148
+ char = self.text[self.index]
149
+ self.index += 1
150
+ if char == '"':
151
+ return ''.join(chunks)
152
+ if char == '\\':
153
+ if self.index >= self.length:
154
+ raise StructuredFieldError('unterminated escape in structured string')
155
+ chunks.append(self.text[self.index])
156
+ self.index += 1
157
+ continue
158
+ chunks.append(char)
159
+ raise StructuredFieldError('unterminated structured string')
160
+
161
+ def _parse_boolean(self) -> bool:
162
+ self._expect('?')
163
+ if self.index >= self.length or self.text[self.index] not in '01':
164
+ raise StructuredFieldError('invalid structured boolean')
165
+ value = self.text[self.index] == '1'
166
+ self.index += 1
167
+ return value
168
+
169
+ def _parse_bytes(self) -> ByteSequence:
170
+ self._expect(':')
171
+ start = self.index
172
+ while self.index < self.length and self.text[self.index] != ':':
173
+ self.index += 1
174
+ if self.index >= self.length:
175
+ raise StructuredFieldError('unterminated byte sequence')
176
+ encoded = self.text[start:self.index]
177
+ self.index += 1
178
+ try:
179
+ decoded = base64.b64decode(encoded.encode('ascii'), validate=True)
180
+ except Exception as exc:
181
+ raise StructuredFieldError('invalid byte sequence') from exc
182
+ return ByteSequence(decoded)
183
+
184
+ def _parse_date(self) -> Date:
185
+ self._expect('@')
186
+ digits = self._parse_digits(allow_sign=True)
187
+ return Date(int(digits))
188
+
189
+ def _parse_number(self) -> int | Decimal:
190
+ number = self._parse_digits(allow_sign=True)
191
+ if self._peek('.'):
192
+ self.index += 1
193
+ fraction = self._parse_digits(allow_sign=False)
194
+ return Decimal(f'{number}.{fraction}')
195
+ return int(number)
196
+
197
+ def _parse_token(self) -> str:
198
+ start = self.index
199
+ while self.index < self.length and self.text[self.index] not in '()<>@,;:\\"/[]?={} \t':
200
+ self.index += 1
201
+ token = self.text[start:self.index]
202
+ if not token:
203
+ raise StructuredFieldError('expected token')
204
+ return token
205
+
206
+ def _parse_key(self) -> str:
207
+ key = self._parse_token()
208
+ if not key[0].islower() and key[0] != '*':
209
+ raise StructuredFieldError(f'invalid structured key {key!r}')
210
+ return key
211
+
212
+ def _parse_digits(self, *, allow_sign: bool) -> str:
213
+ start = self.index
214
+ if allow_sign and self._peek('-'):
215
+ self.index += 1
216
+ while self.index < self.length and self.text[self.index].isdigit():
217
+ self.index += 1
218
+ digits = self.text[start:self.index]
219
+ if digits in {'', '-'}:
220
+ raise StructuredFieldError('expected digits')
221
+ return digits
222
+
223
+ def _skip_ows(self) -> None:
224
+ while self.index < self.length and self.text[self.index] in ' \t':
225
+ self.index += 1
226
+
227
+ def _skip_sp(self) -> None:
228
+ while self.index < self.length and self.text[self.index] == ' ':
229
+ self.index += 1
230
+
231
+ def _expect(self, char: str) -> None:
232
+ if not self._peek(char):
233
+ raise StructuredFieldError(f'expected {char!r}')
234
+ self.index += 1
235
+
236
+ def _peek(self, char: str) -> bool:
237
+ return self.index < self.length and self.text[self.index] == char
238
+
239
+
240
+ def parse_item(value: str) -> Item:
241
+ return _Parser(value).parse_item_only()
242
+
243
+
244
+ def parse_list(value: str) -> list[ListMember]:
245
+ return _Parser(value).parse_list()
246
+
247
+
248
+ def parse_dictionary(value: str) -> dict[str, ListMember]:
249
+ return _Parser(value).parse_dictionary()
250
+
251
+
252
+ def parse_structured_field(field_name: str, value: str) -> StructuredValue:
253
+ field_type = STRUCTURED_FIELD_REGISTRY.get(field_name.lower())
254
+ if field_type == 'dictionary':
255
+ return parse_dictionary(value)
256
+ if field_type == 'list':
257
+ return parse_list(value)
258
+ if field_type == 'item':
259
+ return parse_item(value)
260
+ raise StructuredFieldError(f'unknown structured field registry type for {field_name!r}')
261
+
262
+
263
+ def serialize_bare_item(value: BareItem) -> str:
264
+ if isinstance(value, bool):
265
+ return '?1' if value else '?0'
266
+ if isinstance(value, Token):
267
+ return value.value
268
+ if isinstance(value, ByteSequence):
269
+ return ':' + base64.b64encode(value.value).decode('ascii') + ':'
270
+ if isinstance(value, Date):
271
+ return '@' + str(value.value)
272
+ if isinstance(value, Decimal):
273
+ text = format(value, 'f')
274
+ text = text.rstrip('0').rstrip('.') if '.' in text else text
275
+ return text
276
+ if isinstance(value, int):
277
+ return str(value)
278
+ escaped = str(value).replace('\\', '\\\\').replace('"', '\\"')
279
+ return f'"{escaped}"'
280
+
281
+
282
+ def serialize_item(item: Item) -> str:
283
+ return serialize_bare_item(item.value) + _serialize_params(item.params)
284
+
285
+
286
+ def serialize_list_member(member: ListMember) -> str:
287
+ if isinstance(member, InnerList):
288
+ inner = ' '.join(serialize_item(item) for item in member.items)
289
+ return f'({inner})' + _serialize_params(member.params)
290
+ return serialize_item(member)
291
+
292
+
293
+ def serialize_dictionary(value: dict[str, ListMember]) -> str:
294
+ parts: list[str] = []
295
+ for key, member in value.items():
296
+ if isinstance(member, Item) and member.value is True:
297
+ parts.append(key + _serialize_params(member.params))
298
+ else:
299
+ parts.append(f'{key}={serialize_list_member(member)}')
300
+ return ', '.join(parts)
301
+
302
+
303
+ def serialize_list(value: list[ListMember]) -> str:
304
+ return ', '.join(serialize_list_member(member) for member in value)
305
+
306
+
307
+ def serialize_structured_value(value: StructuredValue) -> str:
308
+ if isinstance(value, dict):
309
+ return serialize_dictionary(value)
310
+ if isinstance(value, list):
311
+ return serialize_list(value)
312
+ return serialize_item(value)
313
+
314
+
315
+ def _serialize_params(params: dict[str, BareItem]) -> str:
316
+ return ''.join(
317
+ f';{key}' if raw is True else f';{key}={serialize_bare_item(raw)}'
318
+ for key, raw in params.items()
319
+ )
320
+
321
+
322
+ def normalize_for_json(value: Any) -> Any:
323
+ if isinstance(value, Token):
324
+ return {'type': 'token', 'value': value.value}
325
+ if isinstance(value, ByteSequence):
326
+ return {'type': 'bytes', 'value': base64.b64encode(value.value).decode('ascii')}
327
+ if isinstance(value, Date):
328
+ return {'type': 'date', 'value': value.value}
329
+ if isinstance(value, Decimal):
330
+ return {'type': 'decimal', 'value': str(value)}
331
+ if isinstance(value, Item):
332
+ return {'type': 'item', 'value': normalize_for_json(value.value), 'params': {k: normalize_for_json(v) for k, v in value.params.items()}}
333
+ if isinstance(value, InnerList):
334
+ return {'type': 'inner_list', 'items': [normalize_for_json(item) for item in value.items], 'params': {k: normalize_for_json(v) for k, v in value.params.items()}}
335
+ if isinstance(value, dict):
336
+ return {key: normalize_for_json(item) for key, item in value.items()}
337
+ if isinstance(value, list):
338
+ return [normalize_for_json(item) for item in value]
339
+ return value
340
+
341
+
342
+ __all__ = [
343
+ 'ByteSequence',
344
+ 'Date',
345
+ 'InnerList',
346
+ 'Item',
347
+ 'StructuredFieldError',
348
+ 'Token',
349
+ 'normalize_for_json',
350
+ 'parse_dictionary',
351
+ 'parse_item',
352
+ 'parse_list',
353
+ 'parse_structured_field',
354
+ 'serialize_dictionary',
355
+ 'serialize_item',
356
+ 'serialize_list',
357
+ 'serialize_structured_value',
358
+ ]
@@ -0,0 +1,237 @@
1
+ Metadata-Version: 2.4
2
+ Name: tigrcorn-http
3
+ Version: 0.3.16.dev5
4
+ Summary: HTTP utilities for Tigrcorn headers, entity tags, content coding, range requests, and Python web server responses.
5
+ Author-email: Jacob Stewart <jacob@swarmauri.com>
6
+ License: Apache License
7
+ Version 2.0, January 2004
8
+ http://www.apache.org/licenses/
9
+
10
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
11
+
12
+ 1. Definitions.
13
+
14
+ "License" shall mean the terms and conditions for use, reproduction, and
15
+ distribution as defined by Sections 1 through 9 of this document.
16
+
17
+ "Licensor" shall mean the copyright owner or entity authorized by the
18
+ copyright owner that is granting the License.
19
+
20
+ "Legal Entity" shall mean the union of the acting entity and all other
21
+ entities that control, are controlled by, or are under common control with
22
+ that entity. For the purposes of this definition, "control" means (i) the
23
+ power, direct or indirect, to cause the direction or management of such
24
+ entity, whether by contract or otherwise, or (ii) ownership of fifty percent
25
+ (50%) or more of the outstanding shares, or (iii) beneficial ownership of
26
+ such entity.
27
+
28
+ "You" (or "Your") shall mean an individual or Legal Entity exercising
29
+ permissions granted by this License.
30
+
31
+ "Source" form shall mean the preferred form for making modifications,
32
+ including but not limited to software source code, documentation source, and
33
+ configuration files.
34
+
35
+ "Object" form shall mean any form resulting from mechanical transformation
36
+ or translation of a Source form, including but not limited to compiled object
37
+ code, generated documentation, and conversions to other media types.
38
+
39
+ "Work" shall mean the work of authorship, whether in Source or Object form,
40
+ made available under the License, as indicated by a copyright notice that is
41
+ included in or attached to the work (an example is provided in the Appendix
42
+ below).
43
+
44
+ "Derivative Works" shall mean any work, whether in Source or Object form,
45
+ that is based on (or derived from) the Work and for which the editorial
46
+ revisions, annotations, elaborations, or other modifications represent, as a
47
+ whole, an original work of authorship. For the purposes of this License,
48
+ Derivative Works shall not include works that remain separable from, or
49
+ merely link (or bind by name) to the interfaces of, the Work and Derivative
50
+ Works thereof.
51
+
52
+ "Contribution" shall mean any work of authorship, including the original
53
+ version of the Work and any modifications or additions to that Work or
54
+ Derivative Works thereof, that is intentionally submitted to Licensor for
55
+ inclusion in the Work by the copyright owner or by an individual or Legal
56
+ Entity authorized to submit on behalf of the copyright owner. For the
57
+ purposes of this definition, "submitted" means any form of electronic,
58
+ verbal, or written communication sent to the Licensor or its representatives,
59
+ including but not limited to communication on electronic mailing lists,
60
+ source code control systems, and issue tracking systems that are managed by,
61
+ or on behalf of, the Licensor for the purpose of discussing and improving the
62
+ Work, but excluding communication that is conspicuously marked or otherwise
63
+ designated in writing by the copyright owner as "Not a Contribution."
64
+
65
+ "Contributor" shall mean Licensor and any individual or Legal Entity on
66
+ behalf of whom a Contribution has been received by Licensor and subsequently
67
+ incorporated within the Work.
68
+
69
+ 2. Grant of Copyright License. Subject to the terms and conditions of this
70
+ License, each Contributor hereby grants to You a perpetual, worldwide,
71
+ non-exclusive, no-charge, royalty-free, irrevocable copyright license to
72
+ reproduce, prepare Derivative Works of, publicly display, publicly perform,
73
+ sublicense, and distribute the Work and such Derivative Works in Source or
74
+ Object form.
75
+
76
+ 3. Grant of Patent License. Subject to the terms and conditions of this
77
+ License, each Contributor hereby grants to You a perpetual, worldwide,
78
+ non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this
79
+ section) patent license to make, have made, use, offer to sell, sell, import,
80
+ and otherwise transfer the Work, where such license applies only to those
81
+ patent claims licensable by such Contributor that are necessarily infringed by
82
+ their Contribution(s) alone or by combination of their Contribution(s) with
83
+ the Work to which such Contribution(s) was submitted. If You institute patent
84
+ litigation against any entity (including a cross-claim or counterclaim in a
85
+ lawsuit) alleging that the Work or a Contribution incorporated within the Work
86
+ constitutes direct or contributory patent infringement, then any patent
87
+ licenses granted to You under this License for that Work shall terminate as of
88
+ the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the Work or
91
+ Derivative Works thereof in any medium, with or without modifications, and in
92
+ Source or Object form, provided that You meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or Derivative Works a copy
95
+ of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices stating that
98
+ You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works that You
101
+ distribute, all copyright, patent, trademark, and attribution notices
102
+ from the Source form of the Work, excluding those notices that do not
103
+ pertain to any part of the Derivative Works; and
104
+
105
+ (d) If the Work includes a "NOTICE" text file as part of its distribution,
106
+ then any Derivative Works that You distribute must include a readable copy
107
+ of the attribution notices contained within such NOTICE file, excluding
108
+ those notices that do not pertain to any part of the Derivative Works, in
109
+ at least one of the following places: within a NOTICE text file distributed
110
+ as part of the Derivative Works; within the Source form or documentation,
111
+ if provided along with the Derivative Works; or, within a display generated
112
+ by the Derivative Works, if and wherever such third-party notices normally
113
+ appear. The contents of the NOTICE file are for informational purposes only
114
+ and do not modify the License. You may add Your own attribution notices
115
+ within Derivative Works that You distribute, alongside or as an addendum to
116
+ the NOTICE text from the Work, provided that such additional attribution
117
+ notices cannot be construed as modifying the License.
118
+
119
+ You may add Your own copyright statement to Your modifications and may provide
120
+ additional or different license terms and conditions for use, reproduction, or
121
+ distribution of Your modifications, or for any such Derivative Works as a
122
+ whole, provided Your use, reproduction, and distribution of the Work otherwise
123
+ complies with the conditions stated in this License.
124
+
125
+ 5. Submission of Contributions. Unless You explicitly state otherwise, any
126
+ Contribution intentionally submitted for inclusion in the Work by You to the
127
+ Licensor shall be under the terms and conditions of this License, without any
128
+ additional terms or conditions. Notwithstanding the above, nothing herein
129
+ shall supersede or modify the terms of any separate license agreement you may
130
+ have executed with Licensor regarding such Contributions.
131
+
132
+ 6. Trademarks. This License does not grant permission to use the trade names,
133
+ trademarks, service marks, or product names of the Licensor, except as
134
+ required for reasonable and customary use in describing the origin of the Work
135
+ and reproducing the content of the NOTICE file.
136
+
137
+ 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in
138
+ writing, Licensor provides the Work (and each Contributor provides its
139
+ Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
140
+ KIND, either express or implied, including, without limitation, any warranties
141
+ or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
142
+ PARTICULAR PURPOSE. You are solely responsible for determining the
143
+ appropriateness of using or redistributing the Work and assume any risks
144
+ associated with Your exercise of permissions under this License.
145
+
146
+ 8. Limitation of Liability. In no event and under no legal theory, whether in
147
+ tort (including negligence), contract, or otherwise, unless required by
148
+ applicable law (such as deliberate and grossly negligent acts) or agreed to in
149
+ writing, shall any Contributor be liable to You for damages, including any
150
+ direct, indirect, special, incidental, or consequential damages of any
151
+ character arising as a result of this License or out of the use or inability
152
+ to use the Work (including but not limited to damages for loss of goodwill,
153
+ work stoppage, computer failure or malfunction, or any and all other
154
+ commercial damages or losses), even if such Contributor has been advised of
155
+ the possibility of such damages.
156
+
157
+ 9. Accepting Warranty or Additional Liability. While redistributing the Work or
158
+ Derivative Works thereof, You may choose to offer, and charge a fee for,
159
+ acceptance of support, warranty, indemnity, or other liability obligations
160
+ and/or rights consistent with this License. However, in accepting such
161
+ obligations, You may act only on Your own behalf and on Your sole
162
+ responsibility, not on behalf of any other Contributor, and only if You agree
163
+ to indemnify, defend, and hold each Contributor harmless for any liability
164
+ incurred by, or claims asserted against, such Contributor by reason of your
165
+ accepting any such warranty or additional liability.
166
+
167
+ END OF TERMS AND CONDITIONS
168
+
169
+
170
+ Keywords: tigrcorn,http,headers,etag,content-coding,range-requests,http-utilities
171
+ Classifier: Development Status :: 3 - Alpha
172
+ Classifier: Framework :: AsyncIO
173
+ Classifier: Intended Audience :: Developers
174
+ Classifier: License :: OSI Approved :: Apache Software License
175
+ Classifier: Operating System :: OS Independent
176
+ Classifier: Programming Language :: Python :: 3
177
+ Classifier: Programming Language :: Python :: 3 :: Only
178
+ Classifier: Programming Language :: Python :: 3.11
179
+ Classifier: Programming Language :: Python :: 3.12
180
+ Classifier: Programming Language :: Python :: 3.13
181
+ Classifier: Topic :: Internet :: WWW/HTTP
182
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
183
+ Classifier: Typing :: Typed
184
+ Requires-Python: >=3.11
185
+ Description-Content-Type: text/markdown
186
+ License-File: LICENSE
187
+ Requires-Dist: tigrcorn-core==0.3.16.dev5
188
+ Provides-Extra: compression
189
+ Requires-Dist: brotli>=1.1.0; extra == "compression"
190
+ Dynamic: license-file
191
+
192
+ <div align="center">
193
+ <h1>tigrcorn-http</h1>
194
+
195
+ <p><strong>HTTP utilities for Tigrcorn headers, entity tags, content coding, range requests, and Python web server responses.</strong></p>
196
+
197
+ <a href="https://pypi.org/project/tigrcorn-http/"><img alt="PyPI version for tigrcorn-http" src="https://img.shields.io/pypi/v/tigrcorn-http?label=PyPI"></a>
198
+ <a href="https://pypi.org/project/tigrcorn-http/"><img alt="tigrcorn-http package on PyPI" src="https://img.shields.io/badge/package-PyPI-blue"></a>
199
+ <a href="LICENSE"><img alt="Apache 2.0 license" src="https://img.shields.io/badge/license-Apache%202.0-525252"></a>
200
+ <a href="pyproject.toml"><img alt="Python 3.11 supported" src="https://img.shields.io/badge/python-3.11-3776ab"></a>
201
+ <a href="pyproject.toml"><img alt="Python 3.12 supported" src="https://img.shields.io/badge/python-3.12-3776ab"></a>
202
+ <a href="pyproject.toml"><img alt="Python 3.13 supported" src="https://img.shields.io/badge/python-3.13-3776ab"></a>
203
+ <a href="src/tigrcorn_http/py.typed"><img alt="typed package" src="https://img.shields.io/badge/typed-py.typed-2f7ed8"></a>
204
+ <a href="https://pypi.org/project/tigrcorn-http/"><img alt="http role package" src="https://img.shields.io/badge/role-http-0a7f5a"></a>
205
+ </div>
206
+
207
+ ## Install
208
+
209
+ ~~~bash
210
+ pip install tigrcorn-http
211
+ ~~~
212
+
213
+ Use the aggregate [tigrcorn](https://pypi.org/project/tigrcorn/) distribution when you want the full ASGI3 Python web server stack. Install <code>tigrcorn-http</code> directly when you want only this package boundary and its declared dependencies.
214
+
215
+ ## What It Owns
216
+
217
+ <code>tigrcorn-http</code> owns structured fields, range requests, entity validators, Alt-Svc, Early Hints, headers, and HTTP response utilities. Its import package is <code>tigrcorn_http</code>, and its declared package dependencies are: tigrcorn-core.
218
+
219
+ This package page is written for developers searching for Tigrcorn ASGI3 server components, Python web server packages, HTTP/3 and QUIC support, WebSocket and WebTransport runtime surfaces, typed package boundaries, and Apache 2.0 licensed infrastructure.
220
+
221
+ ## Use It When
222
+
223
+ Use <code>tigrcorn-http</code> when you need reusable HTTP utility logic for Tigrcorn packages without importing protocol handlers or the server runtime. It is part of Tigrcorn's split-package architecture, so it can be installed independently while remaining linked to the rest of the Tigrcorn package family on PyPI.
224
+
225
+ ## Import Surface
226
+
227
+ ~~~python
228
+ import tigrcorn_http
229
+
230
+ print(tigrcorn_http.__name__)
231
+ ~~~
232
+
233
+ The package exposes its supported public surface through the <code>tigrcorn_http</code> namespace. The root [tigrcorn](https://pypi.org/project/tigrcorn/) package keeps compatibility shims for users who install the full server distribution.
234
+
235
+ ## Package Graph
236
+
237
+ [tigrcorn](https://pypi.org/project/tigrcorn/) | [tigrcorn-core](https://pypi.org/project/tigrcorn-core/) | [tigrcorn-config](https://pypi.org/project/tigrcorn-config/) | [tigrcorn-asgi](https://pypi.org/project/tigrcorn-asgi/) | [tigrcorn-contract](https://pypi.org/project/tigrcorn-contract/) | [tigrcorn-transports](https://pypi.org/project/tigrcorn-transports/) | [tigrcorn-protocols](https://pypi.org/project/tigrcorn-protocols/) | [tigrcorn-http](https://pypi.org/project/tigrcorn-http/) | [tigrcorn-security](https://pypi.org/project/tigrcorn-security/) | [tigrcorn-runtime](https://pypi.org/project/tigrcorn-runtime/) | [tigrcorn-static](https://pypi.org/project/tigrcorn-static/) | [tigrcorn-observability](https://pypi.org/project/tigrcorn-observability/) | [tigrcorn-compat](https://pypi.org/project/tigrcorn-compat/) | [tigrcorn-certification](https://pypi.org/project/tigrcorn-certification/)
@@ -0,0 +1,14 @@
1
+ tigrcorn_http/__init__.py,sha256=47YHmQGk2dfL--fXnRHd9hQYriL3S2_xwAgGXT8ygQM,1505
2
+ tigrcorn_http/alt_svc.py,sha256=0R_oHsfJ42j_5BV4qUtu32RtSZZX6ml4eplWfO8yxMA,2412
3
+ tigrcorn_http/conditional.py,sha256=WzMiu1NQ1VfGfn9Q_pI646zf-WhcEZo7salb9gC0fP4,5191
4
+ tigrcorn_http/early_hints.py,sha256=lrzHb_sfve498A5G4wcoaerxzOEBYc0o2UP4qIesZDw,1657
5
+ tigrcorn_http/entity.py,sha256=vhfvdS-qXoU_6-ibOS904vNuI4kbYQataMckivBpe8E,11926
6
+ tigrcorn_http/etag.py,sha256=RTNko6inxZRhuX5h5ybdQQgyEGEd5EmOVmhKwYPI6nw,3530
7
+ tigrcorn_http/py.typed,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
8
+ tigrcorn_http/range.py,sha256=6lqVAnmgX9KoQP2-nl8EvPy4Y_S9xKGrC5wMRrrReiA,12294
9
+ tigrcorn_http/structured_fields.py,sha256=ijBRcJldsmlEbMexP9_Jn8aFjRXyYS23OP52TgFU-pg,11631
10
+ tigrcorn_http-0.3.16.dev5.dist-info/licenses/LICENSE,sha256=xhBSirl227aDQNeQ8tk2v_yiU9nbQpJ4EZp6OtATX-s,9591
11
+ tigrcorn_http-0.3.16.dev5.dist-info/METADATA,sha256=EDhJDlsSlXWHr7S-B28W_gJV9rR1w-ocQz8_Qh5V_J4,15731
12
+ tigrcorn_http-0.3.16.dev5.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
13
+ tigrcorn_http-0.3.16.dev5.dist-info/top_level.txt,sha256=3wazlC0vOiz-9nNNhlkj2s8epJ9m52CLbqqDf5Xhd6g,14
14
+ tigrcorn_http-0.3.16.dev5.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (82.0.1)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+