lazyprox 0.9.1__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.
- lazyprox-0.9.1/LICENSE +21 -0
- lazyprox-0.9.1/PKG-INFO +108 -0
- lazyprox-0.9.1/README.md +87 -0
- lazyprox-0.9.1/pyproject.toml +69 -0
- lazyprox-0.9.1/pyproject.toml.orig +64 -0
- lazyprox-0.9.1/src/lazyprox/__init__.py +30 -0
- lazyprox-0.9.1/src/lazyprox/app/__init__.py +3 -0
- lazyprox-0.9.1/src/lazyprox/app/app.py +389 -0
- lazyprox-0.9.1/src/lazyprox/app/styles.tcss +177 -0
- lazyprox-0.9.1/src/lazyprox/common/__init__.py +5 -0
- lazyprox-0.9.1/src/lazyprox/common/config.py +83 -0
- lazyprox-0.9.1/src/lazyprox/common/singleton.py +32 -0
- lazyprox-0.9.1/src/lazyprox/common/utils.py +63 -0
- lazyprox-0.9.1/src/lazyprox/core/__init__.py +1 -0
- lazyprox-0.9.1/src/lazyprox/core/bulk.py +241 -0
- lazyprox-0.9.1/src/lazyprox/core/cluster_state.py +19 -0
- lazyprox-0.9.1/src/lazyprox/core/guest_operations.py +43 -0
- lazyprox-0.9.1/src/lazyprox/core/resource_actions.py +120 -0
- lazyprox-0.9.1/src/lazyprox/data/__init__.py +3 -0
- lazyprox-0.9.1/src/lazyprox/data/proxmox.py +126 -0
- lazyprox-0.9.1/src/lazyprox/screens/__init__.py +19 -0
- lazyprox-0.9.1/src/lazyprox/screens/bulk.py +252 -0
- lazyprox-0.9.1/src/lazyprox/screens/confirmation_screen.py +31 -0
- lazyprox-0.9.1/src/lazyprox/screens/dashboard.py +60 -0
- lazyprox-0.9.1/src/lazyprox/screens/filter.py +20 -0
- lazyprox-0.9.1/src/lazyprox/screens/select_action.py +22 -0
- lazyprox-0.9.1/src/lazyprox/screens/select_destination.py +33 -0
- lazyprox-0.9.1/src/lazyprox/screens/select_server.py +23 -0
- lazyprox-0.9.1/src/lazyprox/screens/waiting.py +8 -0
- lazyprox-0.9.1/src/lazyprox/widgets/__init__.py +13 -0
- lazyprox-0.9.1/src/lazyprox/widgets/base_datatable_widget.py +213 -0
- lazyprox-0.9.1/src/lazyprox/widgets/details_views/__init__.py +23 -0
- lazyprox-0.9.1/src/lazyprox/widgets/details_views/graph_base.py +9 -0
- lazyprox-0.9.1/src/lazyprox/widgets/details_views/graph_widget.py +89 -0
- lazyprox-0.9.1/src/lazyprox/widgets/details_views/lxc_graph.py +136 -0
- lazyprox-0.9.1/src/lazyprox/widgets/details_views/lxc_summary.py +94 -0
- lazyprox-0.9.1/src/lazyprox/widgets/details_views/node_graph.py +137 -0
- lazyprox-0.9.1/src/lazyprox/widgets/details_views/node_summary.py +97 -0
- lazyprox-0.9.1/src/lazyprox/widgets/details_views/node_tasks.py +154 -0
- lazyprox-0.9.1/src/lazyprox/widgets/details_views/qemu_graph.py +135 -0
- lazyprox-0.9.1/src/lazyprox/widgets/details_views/qemu_summary.py +72 -0
- lazyprox-0.9.1/src/lazyprox/widgets/details_views/summary_base.py +24 -0
- lazyprox-0.9.1/src/lazyprox/widgets/details_widget.py +65 -0
- lazyprox-0.9.1/src/lazyprox/widgets/lxc_widget.py +95 -0
- lazyprox-0.9.1/src/lazyprox/widgets/node_widget.py +73 -0
- lazyprox-0.9.1/src/lazyprox/widgets/qemu_widget.py +94 -0
lazyprox-0.9.1/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 benzino77
|
|
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.
|
lazyprox-0.9.1/PKG-INFO
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: lazyprox
|
|
3
|
+
Version: 0.9.1
|
|
4
|
+
Summary: Proxmox TUI
|
|
5
|
+
Keywords: proxmox,terminal,TUI,client,console
|
|
6
|
+
Author: Piotr Antczak
|
|
7
|
+
Author-email: Piotr Antczak <antczak.piotr@gmail.com>
|
|
8
|
+
License-Expression: MIT
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
Requires-Dist: proxmoxer>=2.3.0
|
|
11
|
+
Requires-Dist: pydantic>=2.13.4
|
|
12
|
+
Requires-Dist: requests>=2.34.2
|
|
13
|
+
Requires-Dist: rich>=15.0.0
|
|
14
|
+
Requires-Dist: textual>=8.2.6
|
|
15
|
+
Requires-Dist: textual-plotext>=1.0.1
|
|
16
|
+
Requires-Python: >=3.13
|
|
17
|
+
Project-URL: homepage, https://github.com/benzino77/lazyprox
|
|
18
|
+
Project-URL: repository, https://github.com/benzino77/lazyprox
|
|
19
|
+
Project-URL: issues, https://github.com/benzino77/lazyprox/issues
|
|
20
|
+
Description-Content-Type: text/markdown
|
|
21
|
+
|
|
22
|
+
<div align="center">
|
|
23
|
+
<img src="https://raw.githubusercontent.com/benzino77/lazyprox/master/docs/images/lazyprox-logo.svg" width="60%">
|
|
24
|
+
</div>
|
|
25
|
+
|
|
26
|
+
# LazyProx
|
|
27
|
+
|
|
28
|
+
LazyProx is a lightweight Proxmox management helper that makes it easy to view and act on nodes, containers, and virtual machines. It provides a clean UI for exploring your Proxmox infrastructure and quickly selecting actions.
|
|
29
|
+
|
|
30
|
+

|
|
31
|
+

|
|
32
|
+

|
|
33
|
+
|
|
34
|
+
See the included asciinema animation for a short demo of how the tool works.
|
|
35
|
+
|
|
36
|
+
[](https://asciinema.org/a/SsAswPbstoAz1H0y)
|
|
37
|
+
|
|
38
|
+
## Installation
|
|
39
|
+
|
|
40
|
+
You have to have Python 3.13 or higher installed on your system to run the tool. LazyProx is developed and tested on Linux, it is tested also on Windows WSL2, but it should work on any platform that supports Python.
|
|
41
|
+
|
|
42
|
+
LazyProx is published on [PyPI](https://pypi.org/project/lazyprox/), so you can install it with any Python package manager. The instructions below use `uv` and `pipx`.
|
|
43
|
+
|
|
44
|
+
> [!NOTE]
|
|
45
|
+
> LazyProx is using HTTP API of Proxmox, so you need to have access to it from the machine you want to run the tool on.
|
|
46
|
+
|
|
47
|
+
### Using UV
|
|
48
|
+
|
|
49
|
+
to install run `uv tool install lazyprox`
|
|
50
|
+
|
|
51
|
+
to upgrade run `uv tool upgrade lazyprox`
|
|
52
|
+
|
|
53
|
+
to uninstall run `uv tool uninstall lazyprox`
|
|
54
|
+
|
|
55
|
+
> [!NOTE]
|
|
56
|
+
> UV can be installed following instructions on [uv Installation page](https://docs.astral.sh/uv/getting-started/installation/)
|
|
57
|
+
|
|
58
|
+
### Using pipx
|
|
59
|
+
|
|
60
|
+
to install run `pipx install lazyprox`
|
|
61
|
+
|
|
62
|
+
to upgrade run `pipx upgrade lazyprox`
|
|
63
|
+
|
|
64
|
+
to uninstall run `pipx uninstall lazyprox`
|
|
65
|
+
|
|
66
|
+
### From source
|
|
67
|
+
|
|
68
|
+
If you want the latest development version, you can install directly from GitHub:
|
|
69
|
+
|
|
70
|
+
to install run `uv tool install git+https://github.com/benzino77/lazyprox.git`
|
|
71
|
+
|
|
72
|
+
or with pipx `pipx install git+https://github.com/benzino77/lazyprox.git`
|
|
73
|
+
|
|
74
|
+
## Running
|
|
75
|
+
|
|
76
|
+
To run the tool, simply run `lazyprox` in your terminal. To get best experience you should use `Nerd Font` family fonts in your terminal.
|
|
77
|
+
|
|
78
|
+
Although it is rather easy to get information about the structure of the configuration file from the code, and what needs to be configured on the proxmox server side, you can also get it in a more user-friendly format by buying me a coffee. If you want to support the project and get the instructions on how to create the configuration file with all the necessary details and examples in PDF format, you can do so via [Ko-fi](https://ko-fi.com/s/353196d42e).
|
|
79
|
+
|
|
80
|
+
The look of the TUI can be customized with a color palette in the configuration file. Popular schemes such as Catppuccin, Tokyo Night, Nord, Dracula, or Gruvbox can be used by adding their color entries to the config; LazyProx applies them on startup.
|
|
81
|
+
|
|
82
|
+
## Running in Docker
|
|
83
|
+
|
|
84
|
+
You can also run LazyProx in a Docker container - you do not have to install it via `uv` or `pipx` directly on your system. You can build the Docker image using the provided `Dockerfile` and then run the container or you can pull the prebuilt image from github container registry.
|
|
85
|
+
|
|
86
|
+
```
|
|
87
|
+
docker run --name lazyprox -it --rm -v /path/to/config.toml:/config.toml ghcr.io/benzino77/lazyprox:latest -c /config.toml
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## Bulk operations notes
|
|
91
|
+
|
|
92
|
+
Bulk operations are fire-and-forget: LazyProx sends one request per checked guest and does not wait for the requests to finish or check their result. When the notification says an operation was requested, it means Proxmox accepted the request, not that the guest has already started, stopped, or migrated. Check the Proxmox task list for the outcome. A request that fails does not cancel the remaining ones; the notification reports how many were requested and how many failed.
|
|
93
|
+
|
|
94
|
+
> [!WARNING]
|
|
95
|
+
> Shutdown is only an attempt at a graceful shutdown. If the guest does not react, LazyProx does not retry, wait, force a stop, or perform any other action. Use the single-guest Stop action for that.
|
|
96
|
+
|
|
97
|
+
> [!IMPORTANT]
|
|
98
|
+
> Migrate is experimental. It has been tested on a Proxmox cluster with native ZFS storage, where Proxmox uses ZFS mechanisms to move guests between nodes, and it may not work with other storage setups such as Ceph or NFS. Migrating a running QEMU virtual machine transfers its local disks and can take a long time. Running LXC containers are migrated in restart mode: the container is stopped, migrated, and started on the target node.
|
|
99
|
+
>
|
|
100
|
+
> The single-guest Enter menu offers the same Migrate action for running and stopped LXC containers and QEMU VMs when at least two nodes are online and the guest's node is online, with the same destination choices and caveats as the bulk dialog. Single-guest migrations are fire-and-forget too: the notification means Proxmox accepted the request, not that the migration has finished.
|
|
101
|
+
|
|
102
|
+
## Disclaimer
|
|
103
|
+
|
|
104
|
+
Everything you do, you do on your own responsibility. I do not take any responsibility for damages or problems, that may arise as a result of using this solution or its products. It is provided "as is" without any warranties or guarantees. Use it at your own risk.
|
|
105
|
+
|
|
106
|
+
## License
|
|
107
|
+
|
|
108
|
+
LazyProx is licensed under the [MIT license](LICENSE).
|
lazyprox-0.9.1/README.md
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
<img src="https://raw.githubusercontent.com/benzino77/lazyprox/master/docs/images/lazyprox-logo.svg" width="60%">
|
|
3
|
+
</div>
|
|
4
|
+
|
|
5
|
+
# LazyProx
|
|
6
|
+
|
|
7
|
+
LazyProx is a lightweight Proxmox management helper that makes it easy to view and act on nodes, containers, and virtual machines. It provides a clean UI for exploring your Proxmox infrastructure and quickly selecting actions.
|
|
8
|
+
|
|
9
|
+

|
|
10
|
+

|
|
11
|
+

|
|
12
|
+
|
|
13
|
+
See the included asciinema animation for a short demo of how the tool works.
|
|
14
|
+
|
|
15
|
+
[](https://asciinema.org/a/SsAswPbstoAz1H0y)
|
|
16
|
+
|
|
17
|
+
## Installation
|
|
18
|
+
|
|
19
|
+
You have to have Python 3.13 or higher installed on your system to run the tool. LazyProx is developed and tested on Linux, it is tested also on Windows WSL2, but it should work on any platform that supports Python.
|
|
20
|
+
|
|
21
|
+
LazyProx is published on [PyPI](https://pypi.org/project/lazyprox/), so you can install it with any Python package manager. The instructions below use `uv` and `pipx`.
|
|
22
|
+
|
|
23
|
+
> [!NOTE]
|
|
24
|
+
> LazyProx is using HTTP API of Proxmox, so you need to have access to it from the machine you want to run the tool on.
|
|
25
|
+
|
|
26
|
+
### Using UV
|
|
27
|
+
|
|
28
|
+
to install run `uv tool install lazyprox`
|
|
29
|
+
|
|
30
|
+
to upgrade run `uv tool upgrade lazyprox`
|
|
31
|
+
|
|
32
|
+
to uninstall run `uv tool uninstall lazyprox`
|
|
33
|
+
|
|
34
|
+
> [!NOTE]
|
|
35
|
+
> UV can be installed following instructions on [uv Installation page](https://docs.astral.sh/uv/getting-started/installation/)
|
|
36
|
+
|
|
37
|
+
### Using pipx
|
|
38
|
+
|
|
39
|
+
to install run `pipx install lazyprox`
|
|
40
|
+
|
|
41
|
+
to upgrade run `pipx upgrade lazyprox`
|
|
42
|
+
|
|
43
|
+
to uninstall run `pipx uninstall lazyprox`
|
|
44
|
+
|
|
45
|
+
### From source
|
|
46
|
+
|
|
47
|
+
If you want the latest development version, you can install directly from GitHub:
|
|
48
|
+
|
|
49
|
+
to install run `uv tool install git+https://github.com/benzino77/lazyprox.git`
|
|
50
|
+
|
|
51
|
+
or with pipx `pipx install git+https://github.com/benzino77/lazyprox.git`
|
|
52
|
+
|
|
53
|
+
## Running
|
|
54
|
+
|
|
55
|
+
To run the tool, simply run `lazyprox` in your terminal. To get best experience you should use `Nerd Font` family fonts in your terminal.
|
|
56
|
+
|
|
57
|
+
Although it is rather easy to get information about the structure of the configuration file from the code, and what needs to be configured on the proxmox server side, you can also get it in a more user-friendly format by buying me a coffee. If you want to support the project and get the instructions on how to create the configuration file with all the necessary details and examples in PDF format, you can do so via [Ko-fi](https://ko-fi.com/s/353196d42e).
|
|
58
|
+
|
|
59
|
+
The look of the TUI can be customized with a color palette in the configuration file. Popular schemes such as Catppuccin, Tokyo Night, Nord, Dracula, or Gruvbox can be used by adding their color entries to the config; LazyProx applies them on startup.
|
|
60
|
+
|
|
61
|
+
## Running in Docker
|
|
62
|
+
|
|
63
|
+
You can also run LazyProx in a Docker container - you do not have to install it via `uv` or `pipx` directly on your system. You can build the Docker image using the provided `Dockerfile` and then run the container or you can pull the prebuilt image from github container registry.
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
docker run --name lazyprox -it --rm -v /path/to/config.toml:/config.toml ghcr.io/benzino77/lazyprox:latest -c /config.toml
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
## Bulk operations notes
|
|
70
|
+
|
|
71
|
+
Bulk operations are fire-and-forget: LazyProx sends one request per checked guest and does not wait for the requests to finish or check their result. When the notification says an operation was requested, it means Proxmox accepted the request, not that the guest has already started, stopped, or migrated. Check the Proxmox task list for the outcome. A request that fails does not cancel the remaining ones; the notification reports how many were requested and how many failed.
|
|
72
|
+
|
|
73
|
+
> [!WARNING]
|
|
74
|
+
> Shutdown is only an attempt at a graceful shutdown. If the guest does not react, LazyProx does not retry, wait, force a stop, or perform any other action. Use the single-guest Stop action for that.
|
|
75
|
+
|
|
76
|
+
> [!IMPORTANT]
|
|
77
|
+
> Migrate is experimental. It has been tested on a Proxmox cluster with native ZFS storage, where Proxmox uses ZFS mechanisms to move guests between nodes, and it may not work with other storage setups such as Ceph or NFS. Migrating a running QEMU virtual machine transfers its local disks and can take a long time. Running LXC containers are migrated in restart mode: the container is stopped, migrated, and started on the target node.
|
|
78
|
+
>
|
|
79
|
+
> The single-guest Enter menu offers the same Migrate action for running and stopped LXC containers and QEMU VMs when at least two nodes are online and the guest's node is online, with the same destination choices and caveats as the bulk dialog. Single-guest migrations are fire-and-forget too: the notification means Proxmox accepted the request, not that the migration has finished.
|
|
80
|
+
|
|
81
|
+
## Disclaimer
|
|
82
|
+
|
|
83
|
+
Everything you do, you do on your own responsibility. I do not take any responsibility for damages or problems, that may arise as a result of using this solution or its products. It is provided "as is" without any warranties or guarantees. Use it at your own risk.
|
|
84
|
+
|
|
85
|
+
## License
|
|
86
|
+
|
|
87
|
+
LazyProx is licensed under the [MIT license](LICENSE).
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "lazyprox"
|
|
3
|
+
license = "MIT"
|
|
4
|
+
license-files = ["LICENSE"]
|
|
5
|
+
version = "0.9.1"
|
|
6
|
+
description = "Proxmox TUI"
|
|
7
|
+
keywords = [
|
|
8
|
+
"proxmox",
|
|
9
|
+
"terminal",
|
|
10
|
+
"TUI",
|
|
11
|
+
"client",
|
|
12
|
+
"console",
|
|
13
|
+
]
|
|
14
|
+
readme = "README.md"
|
|
15
|
+
requires-python = ">=3.13"
|
|
16
|
+
dependencies = [
|
|
17
|
+
"proxmoxer>=2.3.0",
|
|
18
|
+
"pydantic>=2.13.4",
|
|
19
|
+
"requests>=2.34.2",
|
|
20
|
+
"rich>=15.0.0",
|
|
21
|
+
"textual>=8.2.6",
|
|
22
|
+
"textual-plotext>=1.0.1",
|
|
23
|
+
]
|
|
24
|
+
|
|
25
|
+
[[project.authors]]
|
|
26
|
+
name = "Piotr Antczak"
|
|
27
|
+
email = "antczak.piotr@gmail.com"
|
|
28
|
+
|
|
29
|
+
[project.scripts]
|
|
30
|
+
lazyprox = "lazyprox:main"
|
|
31
|
+
|
|
32
|
+
[project.urls]
|
|
33
|
+
homepage = "https://github.com/benzino77/lazyprox"
|
|
34
|
+
repository = "https://github.com/benzino77/lazyprox"
|
|
35
|
+
issues = "https://github.com/benzino77/lazyprox/issues"
|
|
36
|
+
|
|
37
|
+
[build-system]
|
|
38
|
+
requires = ["uv_build>=0.13.0,<0.14"]
|
|
39
|
+
build-backend = "uv_build"
|
|
40
|
+
|
|
41
|
+
[[tool.uv.index]]
|
|
42
|
+
name = "testpypi"
|
|
43
|
+
url = "https://test.pypi.org/simple/"
|
|
44
|
+
publish-url = "https://test.pypi.org/legacy/"
|
|
45
|
+
explicit = true
|
|
46
|
+
|
|
47
|
+
[tool.ruff]
|
|
48
|
+
line-length = 120
|
|
49
|
+
|
|
50
|
+
[tool.pytest.ini_options]
|
|
51
|
+
testpaths = ["tests"]
|
|
52
|
+
pythonpath = ["src"]
|
|
53
|
+
asyncio_mode = "auto"
|
|
54
|
+
asyncio_default_fixture_loop_scope = "function"
|
|
55
|
+
asyncio_default_test_loop_scope = "function"
|
|
56
|
+
markers = ["e2e: end-to-end Textual Pilot and snapshot tests"]
|
|
57
|
+
|
|
58
|
+
[tool.coverage.run]
|
|
59
|
+
source = ["src"]
|
|
60
|
+
|
|
61
|
+
[dependency-groups]
|
|
62
|
+
dev = [
|
|
63
|
+
"pytest>=9.0.3",
|
|
64
|
+
"pytest-asyncio>=1.4.0",
|
|
65
|
+
"pytest-cov>=7.1.0",
|
|
66
|
+
"pytest-textual-snapshot>=1.0.0",
|
|
67
|
+
"ruff>=0.16.3",
|
|
68
|
+
"textual-dev>=1.8.0",
|
|
69
|
+
]
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "lazyprox"
|
|
3
|
+
license = "MIT"
|
|
4
|
+
license-files = [ "LICENSE" ]
|
|
5
|
+
version = "0.9.1"
|
|
6
|
+
description = "Proxmox TUI"
|
|
7
|
+
keywords = [ "proxmox", "terminal", "TUI", "client", "console" ]
|
|
8
|
+
readme = "README.md"
|
|
9
|
+
authors = [
|
|
10
|
+
{ name = "Piotr Antczak", email = "antczak.piotr@gmail.com" }
|
|
11
|
+
]
|
|
12
|
+
requires-python = ">=3.13"
|
|
13
|
+
dependencies = [
|
|
14
|
+
"proxmoxer>=2.3.0",
|
|
15
|
+
"pydantic>=2.13.4",
|
|
16
|
+
"requests>=2.34.2",
|
|
17
|
+
"rich>=15.0.0",
|
|
18
|
+
"textual>=8.2.6",
|
|
19
|
+
"textual-plotext>=1.0.1",
|
|
20
|
+
]
|
|
21
|
+
|
|
22
|
+
[project.scripts]
|
|
23
|
+
lazyprox = "lazyprox:main"
|
|
24
|
+
|
|
25
|
+
[project.urls]
|
|
26
|
+
homepage = "https://github.com/benzino77/lazyprox"
|
|
27
|
+
repository = "https://github.com/benzino77/lazyprox"
|
|
28
|
+
issues = "https://github.com/benzino77/lazyprox/issues"
|
|
29
|
+
|
|
30
|
+
[build-system]
|
|
31
|
+
requires = ["uv_build>=0.13.0,<0.14"]
|
|
32
|
+
build-backend = "uv_build"
|
|
33
|
+
|
|
34
|
+
[[tool.uv.index]]
|
|
35
|
+
name = "testpypi"
|
|
36
|
+
url = "https://test.pypi.org/simple/"
|
|
37
|
+
publish-url = "https://test.pypi.org/legacy/"
|
|
38
|
+
explicit = true
|
|
39
|
+
|
|
40
|
+
[dependency-groups]
|
|
41
|
+
dev = [
|
|
42
|
+
"pytest>=9.0.3",
|
|
43
|
+
"pytest-asyncio>=1.4.0",
|
|
44
|
+
"pytest-cov>=7.1.0",
|
|
45
|
+
"pytest-textual-snapshot>=1.0.0",
|
|
46
|
+
"ruff>=0.16.3",
|
|
47
|
+
"textual-dev>=1.8.0",
|
|
48
|
+
]
|
|
49
|
+
|
|
50
|
+
[tool.ruff]
|
|
51
|
+
line-length = 120
|
|
52
|
+
|
|
53
|
+
[tool.pytest.ini_options]
|
|
54
|
+
testpaths = ["tests"]
|
|
55
|
+
pythonpath = ["src"]
|
|
56
|
+
asyncio_mode = "auto"
|
|
57
|
+
asyncio_default_fixture_loop_scope = "function"
|
|
58
|
+
asyncio_default_test_loop_scope = "function"
|
|
59
|
+
markers = [
|
|
60
|
+
"e2e: end-to-end Textual Pilot and snapshot tests",
|
|
61
|
+
]
|
|
62
|
+
|
|
63
|
+
[tool.coverage.run]
|
|
64
|
+
source = ["src"]
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import argparse
|
|
2
|
+
import sys
|
|
3
|
+
|
|
4
|
+
from pydantic import ValidationError
|
|
5
|
+
|
|
6
|
+
from lazyprox.app import LazyProx
|
|
7
|
+
from lazyprox.common import Config
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def main() -> None:
|
|
11
|
+
parser = argparse.ArgumentParser(description="LazyProx Application")
|
|
12
|
+
parser.add_argument("-c", "--config", type=str, required=False, help="Path to the configuration file")
|
|
13
|
+
args = parser.parse_args()
|
|
14
|
+
try:
|
|
15
|
+
Config.load_config(config_file_path=args.config)
|
|
16
|
+
except ValidationError:
|
|
17
|
+
print(
|
|
18
|
+
"Something went wrong when loading config file. Please check your configuration against the documentation.",
|
|
19
|
+
file=sys.stderr,
|
|
20
|
+
)
|
|
21
|
+
sys.exit(1)
|
|
22
|
+
except FileNotFoundError:
|
|
23
|
+
print("Cannot find lazyprox config file.", file=sys.stderr)
|
|
24
|
+
sys.exit(1)
|
|
25
|
+
except Exception as e: # noqa: BLE001
|
|
26
|
+
print(f"Something went wrong: {e}", file=sys.stderr)
|
|
27
|
+
sys.exit(2)
|
|
28
|
+
|
|
29
|
+
app = LazyProx()
|
|
30
|
+
app.run()
|