hyperflask 0.4.2__tar.gz → 0.4.3__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.
- {hyperflask-0.4.2 → hyperflask-0.4.3}/PKG-INFO +1 -1
- {hyperflask-0.4.2 → hyperflask-0.4.3}/pyproject.toml +1 -1
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/app.py +3 -2
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/cli/runner.py +27 -24
- {hyperflask-0.4.2 → hyperflask-0.4.3}/README.md +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/__init__.py +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/__main__.py +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/actors.py +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/cli/__init__.py +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/cli/reloader.py +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/cli/worker.py +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/components/__init__.py +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/components/alpine.py +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/components/core.py +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/components/jsx.py +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/components/webcomponent.py +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/factory.py +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/forms/__init__.py +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/forms/fields.py +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/forms/widgets.py +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/layouts/email.mjml +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/layouts/web.html +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/model.py +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/page_helpers.py +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/security.py +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/static/alpine-csp.js +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/static/alpine.js +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/static/app.css +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/static/app.js +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/static/htmx-exts.js +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/static/react.js +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/static/stimulus.js +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/static/translations.js +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/ui/daisyui/Accordion.html +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/ui/daisyui/AccordionPanel.html +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/ui/daisyui/Alert.html +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/ui/daisyui/Avatar.html +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/ui/daisyui/AvatarGroup.html +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/ui/daisyui/Badge.html +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/ui/daisyui/Breadcrumbs.html +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/ui/daisyui/BreadcrumbsItem.html +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/ui/daisyui/Button.html +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/ui/daisyui/Card.html +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/ui/daisyui/CardActions.html +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/ui/daisyui/CardTitle.html +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/ui/daisyui/ChatBubble.html +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/ui/daisyui/Checkbox.html +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/ui/daisyui/CollapsibleSubMenu.html +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/ui/daisyui/Countdown.html +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/ui/daisyui/Divider.html +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/ui/daisyui/Drawer.html +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/ui/daisyui/DrawerContent.html +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/ui/daisyui/DrawerSide.html +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/ui/daisyui/Dropdown.html +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/ui/daisyui/DropdownItem.html +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/ui/daisyui/Fieldset.html +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/ui/daisyui/FieldsetLegend.html +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/ui/daisyui/FileInput.html +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/ui/daisyui/Filter.html +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/ui/daisyui/FilterItem.html +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/ui/daisyui/Footer.html +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/ui/daisyui/FooterLink.html +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/ui/daisyui/FooterNav.html +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/ui/daisyui/Indicator.html +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/ui/daisyui/Input.html +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/ui/daisyui/InputLabel.html +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/ui/daisyui/Join.html +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/ui/daisyui/Kbd.html +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/ui/daisyui/Label.html +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/ui/daisyui/LabeledCheckbox.html +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/ui/daisyui/LabeledToggle.html +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/ui/daisyui/Link.html +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/ui/daisyui/List.html +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/ui/daisyui/ListItem.html +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/ui/daisyui/Loading.html +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/ui/daisyui/Menu.html +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/ui/daisyui/MenuItem.html +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/ui/daisyui/MenuTitle.html +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/ui/daisyui/Modal.html +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/ui/daisyui/ModalAction.html +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/ui/daisyui/ModalTitle.html +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/ui/daisyui/Navbar.html +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/ui/daisyui/Pagination.html +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/ui/daisyui/PaginationNext.html +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/ui/daisyui/PaginationPage.html +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/ui/daisyui/PaginationPrev.html +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/ui/daisyui/Progress.html +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/ui/daisyui/README.md +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/ui/daisyui/Radio.html +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/ui/daisyui/Range.html +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/ui/daisyui/Rating.html +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/ui/daisyui/Select.html +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/ui/daisyui/Stack.html +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/ui/daisyui/Stat.html +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/ui/daisyui/Stats.html +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/ui/daisyui/Step.html +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/ui/daisyui/Steps.html +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/ui/daisyui/SubMenu.html +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/ui/daisyui/Swap.html +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/ui/daisyui/Tab.html +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/ui/daisyui/Table.html +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/ui/daisyui/Tabs.html +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/ui/daisyui/Textarea.html +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/ui/daisyui/Toast.html +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/ui/daisyui/Toggle.html +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/ui/daisyui/Tooltip.html +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/ui/flash.html +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/ui/forms.html +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/ui/icons.html +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/ui/layout.html +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/ui/modal.html +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/ui/skeleton.html +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/ui/sse.html +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/utils/__init__.py +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/utils/html.py +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/utils/htmx.py +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/utils/markdown.py +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/utils/metadata.py +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/utils/page_actions.py +0 -0
- {hyperflask-0.4.2 → hyperflask-0.4.3}/src/hyperflask/utils/tokens.py +0 -0
|
@@ -114,8 +114,9 @@ class Hyperflask(Flask):
|
|
|
114
114
|
})
|
|
115
115
|
self.config.setdefault("HSTS_HEADER", "max-age=31556926; includeSubDomains") # 1 year
|
|
116
116
|
|
|
117
|
-
if
|
|
118
|
-
self.config['
|
|
117
|
+
if not self.debug and not self.testing and not self.config.get('MERCURE_HUB_URL'):
|
|
118
|
+
self.config['MERCURE_HUB_URL'] = "http://localhost:5300/.well-known/mercure"
|
|
119
|
+
self.config.setdefault('MERCURE_PUBLIC_HUB_URL', True)
|
|
119
120
|
|
|
120
121
|
#self.otel = Observability(self)
|
|
121
122
|
|
|
@@ -55,38 +55,41 @@ def run_command(processes, host, port, concurrency, extend_procfile, init_db, de
|
|
|
55
55
|
print("Initializing database...")
|
|
56
56
|
Popen([sys.argv[0], "db", "init"]).wait()
|
|
57
57
|
|
|
58
|
-
_processes =
|
|
58
|
+
_processes = {}
|
|
59
|
+
procfile = None
|
|
59
60
|
config = load_config()
|
|
60
61
|
|
|
61
62
|
for filename in [f"Procfile.{config['ENV']}", "Procfile"]:
|
|
62
63
|
if os.path.exists(filename):
|
|
63
64
|
with open(filename) as f:
|
|
64
|
-
|
|
65
|
+
procfile = parse_procfile(f.read()).processes
|
|
65
66
|
break
|
|
66
67
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
68
|
+
_processes = {
|
|
69
|
+
"web": [sys.argv[0], "serve", "--host", host, "--port", "$PORT"],
|
|
70
|
+
"worker": [sys.argv[0], "worker"],
|
|
71
|
+
"scheduler": [sys.argv[0], "scheduler"]
|
|
72
|
+
}
|
|
73
|
+
if dev:
|
|
74
|
+
_processes["assets"] = [sys.argv[0], "assets", "dev"]
|
|
75
|
+
_processes["worker"].extend(["-p", "1", "-t", "1"])
|
|
76
|
+
else:
|
|
77
|
+
_processes["mercurehub"] = [sys.executable, "-m", "flask_mercure_sse.server", "--port", "$PORT"]
|
|
78
|
+
subscriber_secret_key = config.get("MERCURE_SUBSCRIBER_SECRET_KEY", config.get('SECRET_KEY'))
|
|
79
|
+
if subscriber_secret_key:
|
|
80
|
+
_processes["mercurehub"].extend(["--subscriber-secret", subscriber_secret_key])
|
|
78
81
|
else:
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
82
|
+
print("Warning: No MERCURE_SUBSCRIBER_SECRET_KEY or SECRET_KEY set, Mercure subscriber will not be authenticated.")
|
|
83
|
+
publisher_secret_key = config.get("MERCURE_PUBLISHER_SECRET_KEY", config.get('SECRET_KEY'))
|
|
84
|
+
if publisher_secret_key:
|
|
85
|
+
_processes["mercurehub"].extend(["--publisher-secret", publisher_secret_key])
|
|
86
|
+
else:
|
|
87
|
+
print("Warning: No MERCURE_PUBLISHER_SECRET_KEY or SECRET_KEY set, cannot publish Mercure messages.")
|
|
88
|
+
|
|
89
|
+
if procfile and extend_procfile:
|
|
90
|
+
_processes.update(procfile)
|
|
91
|
+
elif procfile:
|
|
92
|
+
_processes = procfile
|
|
90
93
|
|
|
91
94
|
processes = {name: " ".join(_processes[name]) if isinstance(_processes[name], list) else _processes[name]
|
|
92
95
|
for name in _processes if not processes or name in processes}
|
|
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
|
|
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
|
|
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
|