omserv 0.0.0.dev189__tar.gz → 0.0.0.dev191__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {omserv-0.0.0.dev189/omserv.egg-info → omserv-0.0.0.dev191}/PKG-INFO +2 -2
- omserv-0.0.0.dev191/omserv/nginx/configs.py +76 -0
- {omserv-0.0.0.dev189 → omserv-0.0.0.dev191/omserv.egg-info}/PKG-INFO +2 -2
- {omserv-0.0.0.dev189 → omserv-0.0.0.dev191}/omserv.egg-info/requires.txt +1 -1
- {omserv-0.0.0.dev189 → omserv-0.0.0.dev191}/pyproject.toml +2 -2
- omserv-0.0.0.dev189/omserv/nginx/configs.py +0 -69
- {omserv-0.0.0.dev189 → omserv-0.0.0.dev191}/LICENSE +0 -0
- {omserv-0.0.0.dev189 → omserv-0.0.0.dev191}/MANIFEST.in +0 -0
- {omserv-0.0.0.dev189 → omserv-0.0.0.dev191}/README.rst +0 -0
- {omserv-0.0.0.dev189 → omserv-0.0.0.dev191}/omserv/.manifests.json +0 -0
- {omserv-0.0.0.dev189 → omserv-0.0.0.dev191}/omserv/__about__.py +0 -0
- {omserv-0.0.0.dev189 → omserv-0.0.0.dev191}/omserv/__init__.py +0 -0
- {omserv-0.0.0.dev189 → omserv-0.0.0.dev191}/omserv/apps/__init__.py +0 -0
- {omserv-0.0.0.dev189 → omserv-0.0.0.dev191}/omserv/apps/base.py +0 -0
- {omserv-0.0.0.dev189 → omserv-0.0.0.dev191}/omserv/apps/inject.py +0 -0
- {omserv-0.0.0.dev189 → omserv-0.0.0.dev191}/omserv/apps/markers.py +0 -0
- {omserv-0.0.0.dev189 → omserv-0.0.0.dev191}/omserv/apps/routes.py +0 -0
- {omserv-0.0.0.dev189 → omserv-0.0.0.dev191}/omserv/apps/sessions.py +0 -0
- {omserv-0.0.0.dev189 → omserv-0.0.0.dev191}/omserv/apps/templates.py +0 -0
- {omserv-0.0.0.dev189 → omserv-0.0.0.dev191}/omserv/daemon/__init__.py +0 -0
- {omserv-0.0.0.dev189 → omserv-0.0.0.dev191}/omserv/nginx/__init__.py +0 -0
- {omserv-0.0.0.dev189 → omserv-0.0.0.dev191}/omserv/nginx/build.py +0 -0
- {omserv-0.0.0.dev189 → omserv-0.0.0.dev191}/omserv/nginx/logs.py +0 -0
- {omserv-0.0.0.dev189 → omserv-0.0.0.dev191}/omserv/nginx/patches/__init__.py +0 -0
- {omserv-0.0.0.dev189 → omserv-0.0.0.dev191}/omserv/nginx/patches/nginx-1.27.3_http_status.patch +0 -0
- {omserv-0.0.0.dev189 → omserv-0.0.0.dev191}/omserv/nginx/stubstatus.py +0 -0
- {omserv-0.0.0.dev189 → omserv-0.0.0.dev191}/omserv/nodes/__init__.py +0 -0
- {omserv-0.0.0.dev189 → omserv-0.0.0.dev191}/omserv/nodes/models.py +0 -0
- {omserv-0.0.0.dev189 → omserv-0.0.0.dev191}/omserv/nodes/registry.py +0 -0
- {omserv-0.0.0.dev189 → omserv-0.0.0.dev191}/omserv/nodes/sql.py +0 -0
- {omserv-0.0.0.dev189 → omserv-0.0.0.dev191}/omserv/server/LICENSE +0 -0
- {omserv-0.0.0.dev189 → omserv-0.0.0.dev191}/omserv/server/__init__.py +0 -0
- {omserv-0.0.0.dev189 → omserv-0.0.0.dev191}/omserv/server/config.py +0 -0
- {omserv-0.0.0.dev189 → omserv-0.0.0.dev191}/omserv/server/debug.py +0 -0
- {omserv-0.0.0.dev189 → omserv-0.0.0.dev191}/omserv/server/default.py +0 -0
- {omserv-0.0.0.dev189 → omserv-0.0.0.dev191}/omserv/server/events.py +0 -0
- {omserv-0.0.0.dev189 → omserv-0.0.0.dev191}/omserv/server/headers.py +0 -0
- {omserv-0.0.0.dev189 → omserv-0.0.0.dev191}/omserv/server/inject.py +0 -0
- {omserv-0.0.0.dev189 → omserv-0.0.0.dev191}/omserv/server/lifespans.py +0 -0
- {omserv-0.0.0.dev189 → omserv-0.0.0.dev191}/omserv/server/listener.py +0 -0
- {omserv-0.0.0.dev189 → omserv-0.0.0.dev191}/omserv/server/multiprocess.py +0 -0
- {omserv-0.0.0.dev189 → omserv-0.0.0.dev191}/omserv/server/protocols/__init__.py +0 -0
- {omserv-0.0.0.dev189 → omserv-0.0.0.dev191}/omserv/server/protocols/h11.py +0 -0
- {omserv-0.0.0.dev189 → omserv-0.0.0.dev191}/omserv/server/protocols/h2.py +0 -0
- {omserv-0.0.0.dev189 → omserv-0.0.0.dev191}/omserv/server/protocols/protocols.py +0 -0
- {omserv-0.0.0.dev189 → omserv-0.0.0.dev191}/omserv/server/protocols/types.py +0 -0
- {omserv-0.0.0.dev189 → omserv-0.0.0.dev191}/omserv/server/resources/__init__.py +0 -0
- {omserv-0.0.0.dev189 → omserv-0.0.0.dev191}/omserv/server/resources/favicon.ico +0 -0
- {omserv-0.0.0.dev189 → omserv-0.0.0.dev191}/omserv/server/server.py +0 -0
- {omserv-0.0.0.dev189 → omserv-0.0.0.dev191}/omserv/server/sockets.py +0 -0
- {omserv-0.0.0.dev189 → omserv-0.0.0.dev191}/omserv/server/ssl.py +0 -0
- {omserv-0.0.0.dev189 → omserv-0.0.0.dev191}/omserv/server/streams/__init__.py +0 -0
- {omserv-0.0.0.dev189 → omserv-0.0.0.dev191}/omserv/server/streams/httpstream.py +0 -0
- {omserv-0.0.0.dev189 → omserv-0.0.0.dev191}/omserv/server/streams/utils.py +0 -0
- {omserv-0.0.0.dev189 → omserv-0.0.0.dev191}/omserv/server/streams/wsstream.py +0 -0
- {omserv-0.0.0.dev189 → omserv-0.0.0.dev191}/omserv/server/taskspawner.py +0 -0
- {omserv-0.0.0.dev189 → omserv-0.0.0.dev191}/omserv/server/types.py +0 -0
- {omserv-0.0.0.dev189 → omserv-0.0.0.dev191}/omserv/server/workercontext.py +0 -0
- {omserv-0.0.0.dev189 → omserv-0.0.0.dev191}/omserv.egg-info/SOURCES.txt +0 -0
- {omserv-0.0.0.dev189 → omserv-0.0.0.dev191}/omserv.egg-info/dependency_links.txt +0 -0
- {omserv-0.0.0.dev189 → omserv-0.0.0.dev191}/omserv.egg-info/entry_points.txt +0 -0
- {omserv-0.0.0.dev189 → omserv-0.0.0.dev191}/omserv.egg-info/top_level.txt +0 -0
- {omserv-0.0.0.dev189 → omserv-0.0.0.dev191}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: omserv
|
3
|
-
Version: 0.0.0.
|
3
|
+
Version: 0.0.0.dev191
|
4
4
|
Summary: omserv
|
5
5
|
Author: wrmsr
|
6
6
|
License: BSD-3-Clause
|
@@ -12,7 +12,7 @@ Classifier: Operating System :: OS Independent
|
|
12
12
|
Classifier: Operating System :: POSIX
|
13
13
|
Requires-Python: >=3.12
|
14
14
|
License-File: LICENSE
|
15
|
-
Requires-Dist: omlish==0.0.0.
|
15
|
+
Requires-Dist: omlish==0.0.0.dev191
|
16
16
|
Provides-Extra: all
|
17
17
|
Requires-Dist: h11~=0.14; extra == "all"
|
18
18
|
Requires-Dist: h2~=4.1; extra == "all"
|
@@ -0,0 +1,76 @@
|
|
1
|
+
# ruff: noqa: UP006 UP007
|
2
|
+
# @omlish-lite
|
3
|
+
"""
|
4
|
+
TODO:
|
5
|
+
- omnibus/jmespath
|
6
|
+
|
7
|
+
https://nginx.org/en/docs/dev/development_guide.html
|
8
|
+
https://nginx.org/en/docs/dev/development_guide.html#config_directives
|
9
|
+
https://nginx.org/en/docs/example.html
|
10
|
+
|
11
|
+
https://github.com/yandex/gixy
|
12
|
+
"""
|
13
|
+
import collections.abc
|
14
|
+
import dataclasses as dc
|
15
|
+
import typing as ta
|
16
|
+
|
17
|
+
from omlish.lite.check import check
|
18
|
+
from omlish.text.indent import IndentWriter
|
19
|
+
|
20
|
+
|
21
|
+
@dc.dataclass()
|
22
|
+
class NginxConfigItems:
|
23
|
+
lst: ta.List['NginxConfigItem']
|
24
|
+
|
25
|
+
@classmethod
|
26
|
+
def of(cls, obj: ta.Any) -> 'NginxConfigItems':
|
27
|
+
if isinstance(obj, NginxConfigItems):
|
28
|
+
return obj
|
29
|
+
return cls([NginxConfigItem.of(e) for e in check.isinstance(obj, list)])
|
30
|
+
|
31
|
+
|
32
|
+
@dc.dataclass()
|
33
|
+
class NginxConfigItem:
|
34
|
+
name: str
|
35
|
+
args: ta.Optional[ta.List[str]] = None
|
36
|
+
block: ta.Optional[NginxConfigItems] = None
|
37
|
+
|
38
|
+
@classmethod
|
39
|
+
def of(cls, obj: ta.Any) -> 'NginxConfigItem':
|
40
|
+
if isinstance(obj, NginxConfigItem):
|
41
|
+
return obj
|
42
|
+
args = check.isinstance(check.not_isinstance(obj, str), collections.abc.Sequence)
|
43
|
+
name, args = check.isinstance(args[0], str), args[1:]
|
44
|
+
if args and not isinstance(args[-1], str):
|
45
|
+
block, args = NginxConfigItems.of(args[-1]), args[:-1]
|
46
|
+
else:
|
47
|
+
block = None
|
48
|
+
return NginxConfigItem(name, [check.isinstance(e, str) for e in args], block=block)
|
49
|
+
|
50
|
+
|
51
|
+
def render_nginx_config(wr: IndentWriter, obj: ta.Any) -> None:
|
52
|
+
if isinstance(obj, NginxConfigItem):
|
53
|
+
wr.write(obj.name)
|
54
|
+
for e in obj.args or ():
|
55
|
+
wr.write(' ')
|
56
|
+
wr.write(e)
|
57
|
+
if obj.block:
|
58
|
+
wr.write(' {\n')
|
59
|
+
with wr.indent():
|
60
|
+
render_nginx_config(wr, obj.block)
|
61
|
+
wr.write('}\n')
|
62
|
+
else:
|
63
|
+
wr.write(';\n')
|
64
|
+
|
65
|
+
elif isinstance(obj, NginxConfigItems):
|
66
|
+
for e2 in obj.lst:
|
67
|
+
render_nginx_config(wr, e2)
|
68
|
+
|
69
|
+
else:
|
70
|
+
raise TypeError(obj)
|
71
|
+
|
72
|
+
|
73
|
+
def render_nginx_config_str(obj: ta.Any) -> str:
|
74
|
+
iw = IndentWriter()
|
75
|
+
render_nginx_config(iw, obj)
|
76
|
+
return iw.getvalue()
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: omserv
|
3
|
-
Version: 0.0.0.
|
3
|
+
Version: 0.0.0.dev191
|
4
4
|
Summary: omserv
|
5
5
|
Author: wrmsr
|
6
6
|
License: BSD-3-Clause
|
@@ -12,7 +12,7 @@ Classifier: Operating System :: OS Independent
|
|
12
12
|
Classifier: Operating System :: POSIX
|
13
13
|
Requires-Python: >=3.12
|
14
14
|
License-File: LICENSE
|
15
|
-
Requires-Dist: omlish==0.0.0.
|
15
|
+
Requires-Dist: omlish==0.0.0.dev191
|
16
16
|
Provides-Extra: all
|
17
17
|
Requires-Dist: h11~=0.14; extra == "all"
|
18
18
|
Requires-Dist: h2~=4.1; extra == "all"
|
@@ -12,7 +12,7 @@ authors = [
|
|
12
12
|
urls = {source = 'https://github.com/wrmsr/omlish'}
|
13
13
|
license = {text = 'BSD-3-Clause'}
|
14
14
|
requires-python = '>=3.12'
|
15
|
-
version = '0.0.0.
|
15
|
+
version = '0.0.0.dev191'
|
16
16
|
classifiers = [
|
17
17
|
'License :: OSI Approved :: BSD License',
|
18
18
|
'Development Status :: 2 - Pre-Alpha',
|
@@ -22,7 +22,7 @@ classifiers = [
|
|
22
22
|
]
|
23
23
|
description = 'omserv'
|
24
24
|
dependencies = [
|
25
|
-
'omlish == 0.0.0.
|
25
|
+
'omlish == 0.0.0.dev191',
|
26
26
|
]
|
27
27
|
|
28
28
|
[project.optional-dependencies]
|
@@ -1,69 +0,0 @@
|
|
1
|
-
"""
|
2
|
-
TODO:
|
3
|
-
- omnibus/jmespath
|
4
|
-
|
5
|
-
https://nginx.org/en/docs/dev/development_guide.html
|
6
|
-
https://nginx.org/en/docs/dev/development_guide.html#config_directives
|
7
|
-
https://nginx.org/en/docs/example.html
|
8
|
-
|
9
|
-
https://github.com/yandex/gixy
|
10
|
-
"""
|
11
|
-
import collections.abc
|
12
|
-
import dataclasses as dc
|
13
|
-
import typing as ta
|
14
|
-
|
15
|
-
from omlish import check
|
16
|
-
from omlish import lang
|
17
|
-
from omlish.text.indent import IndentWriter
|
18
|
-
|
19
|
-
|
20
|
-
@dc.dataclass()
|
21
|
-
class Items(lang.Final):
|
22
|
-
lst: list['Item']
|
23
|
-
|
24
|
-
@classmethod
|
25
|
-
def of(cls, obj: ta.Any) -> 'Items':
|
26
|
-
if isinstance(obj, Items):
|
27
|
-
return obj
|
28
|
-
return cls([Item.of(e) for e in check.isinstance(obj, list)])
|
29
|
-
|
30
|
-
|
31
|
-
@dc.dataclass()
|
32
|
-
class Item(lang.Final):
|
33
|
-
name: str
|
34
|
-
args: list[str] | None = None
|
35
|
-
block: Items | None = None
|
36
|
-
|
37
|
-
@classmethod
|
38
|
-
def of(cls, obj: ta.Any) -> 'Item':
|
39
|
-
if isinstance(obj, Item):
|
40
|
-
return obj
|
41
|
-
args = check.isinstance(check.not_isinstance(obj, str), collections.abc.Sequence)
|
42
|
-
name, args = check.isinstance(args[0], str), args[1:]
|
43
|
-
if args and not isinstance(args[-1], str):
|
44
|
-
block, args = Items.of(args[-1]), args[:-1]
|
45
|
-
else:
|
46
|
-
block = None
|
47
|
-
return Item(name, [check.isinstance(e, str) for e in args], block=block)
|
48
|
-
|
49
|
-
|
50
|
-
def render(wr: IndentWriter, obj: ta.Any) -> None:
|
51
|
-
if isinstance(obj, Item):
|
52
|
-
wr.write(obj.name)
|
53
|
-
for e in obj.args or ():
|
54
|
-
wr.write(' ')
|
55
|
-
wr.write(e)
|
56
|
-
if obj.block:
|
57
|
-
wr.write(' {\n')
|
58
|
-
with wr.indent():
|
59
|
-
render(wr, obj.block)
|
60
|
-
wr.write('}\n')
|
61
|
-
else:
|
62
|
-
wr.write(';\n')
|
63
|
-
|
64
|
-
elif isinstance(obj, Items):
|
65
|
-
for e2 in obj.lst:
|
66
|
-
render(wr, e2)
|
67
|
-
|
68
|
-
else:
|
69
|
-
raise TypeError(obj)
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{omserv-0.0.0.dev189 → omserv-0.0.0.dev191}/omserv/nginx/patches/nginx-1.27.3_http_status.patch
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|