vapp 1.0.0__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.
- vapp/__init__.py +3 -0
- vapp/app.py +36 -0
- vapp-1.0.0.dist-info/METADATA +22 -0
- vapp-1.0.0.dist-info/RECORD +7 -0
- vapp-1.0.0.dist-info/WHEEL +5 -0
- vapp-1.0.0.dist-info/licenses/LICENSE +21 -0
- vapp-1.0.0.dist-info/top_level.txt +1 -0
vapp/__init__.py
ADDED
vapp/app.py
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"""
|
|
2
|
+
VAPP: Virtual web app broker
|
|
3
|
+
Initialize: pip install uvia vapp <module_name>
|
|
4
|
+
Run daemon: uvia -a vapp -m <module_name>
|
|
5
|
+
Globals attr of <module_name> (eg. "cryptobin"):
|
|
6
|
+
homepage(): function->function with no arguments
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
import uvicorn
|
|
10
|
+
import importlib
|
|
11
|
+
from starlette.routing import Route
|
|
12
|
+
from starlette.applications import Starlette
|
|
13
|
+
|
|
14
|
+
APP_DESC = 'Virtual Web App Broker'
|
|
15
|
+
APP_PORT = 8081
|
|
16
|
+
|
|
17
|
+
def app_init():
|
|
18
|
+
import argparse
|
|
19
|
+
parser = argparse.ArgumentParser(description=APP_DESC)
|
|
20
|
+
parser.add_argument('-a', '--app', type=str, default='vapp', help=f'virtual app name placeholder')
|
|
21
|
+
parser.add_argument('-m', '--mod', type=str, default='module', help=f'actual module to be imported')
|
|
22
|
+
parser.add_argument('-p', '--port', type=int, default=APP_PORT, help=f'apply server http port, default {APP_PORT}')
|
|
23
|
+
parser.add_argument('-c', '--cert', type=str, default='module.pem', help=f'SSL certificate file path')
|
|
24
|
+
parser.add_argument('-k', '--key', type=str, default='module-key.pem', help=f'SSL key file path')
|
|
25
|
+
args = parser.parse_args()
|
|
26
|
+
module = importlib.import_module(args.mod)
|
|
27
|
+
module_attrs = {
|
|
28
|
+
attr: getattr(module, attr) for attr in dir(module) if not attr.startswith('_')
|
|
29
|
+
}
|
|
30
|
+
globals().update(module_attrs)
|
|
31
|
+
routes = [
|
|
32
|
+
## cryptobin.homepage() not for <cometchart>
|
|
33
|
+
Route('/', homepage(), methods=['GET', 'POST'])
|
|
34
|
+
]
|
|
35
|
+
app = Starlette(debug=False, routes=routes)
|
|
36
|
+
return app, '0.0.0.0', args.port, args.cert, args.key
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: vapp
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Compact Web App Broker
|
|
5
|
+
Home-page: https://github.com/asinerum/vapp
|
|
6
|
+
Author: Asinerum Conlang Project
|
|
7
|
+
Author-email: asinerum.com@gmail.com
|
|
8
|
+
License: MIT
|
|
9
|
+
Classifier: Programming Language :: Python :: 3
|
|
10
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
11
|
+
Classifier: Operating System :: OS Independent
|
|
12
|
+
Requires-Python: >=3.7
|
|
13
|
+
Description-Content-Type: text/markdown
|
|
14
|
+
License-File: LICENSE
|
|
15
|
+
Requires-Dist: starlette>=0.50.0
|
|
16
|
+
Requires-Dist: uvicorn>=0.38.0
|
|
17
|
+
Dynamic: license-file
|
|
18
|
+
|
|
19
|
+
Detailed tips, tricks, and examples, can be found at project's repository
|
|
20
|
+
https://github.com/asinerum/vapp
|
|
21
|
+
|
|
22
|
+
(C) 2026 Asinerum Conlang Project
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
vapp/__init__.py,sha256=W9RvAMUyxK-ofzHnNslCfdwllcjygas-sUS-SMViq8U,45
|
|
2
|
+
vapp/app.py,sha256=fX8QOL2SQWlxUmQM4Ip3WFDX3db8mep8tVQEeYUumLA,1445
|
|
3
|
+
vapp-1.0.0.dist-info/licenses/LICENSE,sha256=4npUbkrpgB6lqMiYYeUxZAP4SOkjVSwK8-7jW60mxvw,1081
|
|
4
|
+
vapp-1.0.0.dist-info/METADATA,sha256=nDdr5Knl5Q3v77zNcS7HPYmdVJXV0VfxDwtuThcNj3c,689
|
|
5
|
+
vapp-1.0.0.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
|
|
6
|
+
vapp-1.0.0.dist-info/top_level.txt,sha256=lU3OzaXM4LUpJcZvew8K4SXghmhBbI_qDCiSaAYibl8,5
|
|
7
|
+
vapp-1.0.0.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Asinerum Conlang Project
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
vapp
|