vega-framework 0.1.24__py3-none-any.whl → 0.1.26__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.
- vega/cli/commands/add.py +61 -24
- vega/cli/commands/init.py +2 -11
- vega/cli/commands/web.py +90 -0
- vega/cli/main.py +3 -1
- vega/cli/templates/project/README.md.j2 +2 -2
- vega/cli/templates/project/main.py.j2 +1 -86
- vega/cli/templates/project/main_fastapi.py.j2 +1 -51
- vega/cli/templates/project/main_standard.py.j2 +0 -58
- {vega_framework-0.1.24.dist-info → vega_framework-0.1.26.dist-info}/METADATA +3 -1
- {vega_framework-0.1.24.dist-info → vega_framework-0.1.26.dist-info}/RECORD +13 -12
- {vega_framework-0.1.24.dist-info → vega_framework-0.1.26.dist-info}/WHEEL +0 -0
- {vega_framework-0.1.24.dist-info → vega_framework-0.1.26.dist-info}/entry_points.txt +0 -0
- {vega_framework-0.1.24.dist-info → vega_framework-0.1.26.dist-info}/licenses/LICENSE +0 -0
vega/cli/commands/add.py
CHANGED
@@ -58,39 +58,18 @@ def add_web_feature(project_path: Path, project_name: str):
|
|
58
58
|
presentation_dir = project_path / "presentation"
|
59
59
|
if not presentation_dir.exists():
|
60
60
|
presentation_dir.mkdir(parents=True, exist_ok=True)
|
61
|
-
(presentation_dir / "__init__.py").write_text("")
|
62
61
|
click.echo(f" + Created presentation/")
|
63
62
|
|
64
63
|
# Create FastAPI scaffold
|
65
64
|
create_fastapi_scaffold(project_path, project_name, overwrite=overwrite)
|
66
65
|
|
67
|
-
# Update main.py to use web command
|
68
|
-
main_file = project_path / "main.py"
|
69
|
-
if main_file.exists():
|
70
|
-
click.echo("\n[!] Update main.py to add web command:")
|
71
|
-
click.echo(" Add the following to your main.py CLI group:\n")
|
72
|
-
click.echo(click.style('''
|
73
|
-
@cli.command()
|
74
|
-
@click.option('--host', default='0.0.0.0', help='Host to bind')
|
75
|
-
@click.option('--port', default=8000, help='Port to bind')
|
76
|
-
@click.option('--reload', is_flag=True, help='Enable auto-reload')
|
77
|
-
def web(host: str, port: int, reload: bool):
|
78
|
-
"""Start FastAPI web server"""
|
79
|
-
import uvicorn
|
80
|
-
from presentation.web.main import app
|
81
|
-
|
82
|
-
click.echo(f"Starting web server on http://{host}:{port}")
|
83
|
-
uvicorn.run(app, host=host, port=port, reload=reload)
|
84
|
-
''', fg='cyan'))
|
85
|
-
|
86
66
|
click.echo(f"\n{click.style('SUCCESS: FastAPI web scaffold added!', fg='green', bold=True)}\n")
|
87
67
|
click.echo("Next steps:")
|
88
68
|
click.echo(" 1. Add FastAPI dependencies:")
|
89
69
|
click.echo(" poetry add fastapi uvicorn[standard]")
|
90
|
-
click.echo(" 2.
|
91
|
-
click.echo("
|
92
|
-
click.echo("
|
93
|
-
click.echo(" 4. Visit http://localhost:8000/api/health/status")
|
70
|
+
click.echo(" 2. Run the server:")
|
71
|
+
click.echo(" vega web run --reload")
|
72
|
+
click.echo(" 3. Visit http://localhost:8000/api/health/status")
|
94
73
|
|
95
74
|
|
96
75
|
def add_sqlalchemy_feature(project_path: Path, project_name: str):
|
@@ -111,6 +90,13 @@ def add_sqlalchemy_feature(project_path: Path, project_name: str):
|
|
111
90
|
# Create SQLAlchemy scaffold
|
112
91
|
create_sqlalchemy_scaffold(project_path, project_name, overwrite=overwrite)
|
113
92
|
|
93
|
+
# Ask if user wants an example repository
|
94
|
+
create_example = click.confirm("\nDo you want to create an example User repository with SQLAlchemy implementation?", default=True)
|
95
|
+
|
96
|
+
if create_example:
|
97
|
+
click.echo("\n[*] Creating example User repository...")
|
98
|
+
_create_user_example_repository(project_path, project_name)
|
99
|
+
|
114
100
|
click.echo(f"\n{click.style('SUCCESS: SQLAlchemy database support added!', fg='green', bold=True)}\n")
|
115
101
|
click.echo("Next steps:")
|
116
102
|
click.echo(" 1. Add DATABASE_URL to your settings.py:")
|
@@ -123,3 +109,54 @@ def add_sqlalchemy_feature(project_path: Path, project_name: str):
|
|
123
109
|
click.echo(' vega migrate create -m "Initial migration"')
|
124
110
|
click.echo(" 5. Apply migrations:")
|
125
111
|
click.echo(" vega migrate upgrade")
|
112
|
+
|
113
|
+
|
114
|
+
def _create_user_example_repository(project_path: Path, project_name: str):
|
115
|
+
"""Create example User entity, repository, and SQLAlchemy implementation"""
|
116
|
+
from vega.cli.commands.generate import _generate_entity, _generate_repository, _generate_sqlalchemy_model, _generate_infrastructure_repository
|
117
|
+
from vega.cli.utils import to_pascal_case, to_snake_case
|
118
|
+
|
119
|
+
# Suppress verbose output temporarily by redirecting
|
120
|
+
import sys
|
121
|
+
from io import StringIO
|
122
|
+
|
123
|
+
# Generate User entity
|
124
|
+
click.echo(" + Creating User entity...")
|
125
|
+
_generate_entity(project_path, project_name, 'User', 'user')
|
126
|
+
|
127
|
+
# Generate UserRepository interface (without next steps)
|
128
|
+
click.echo(" + Creating UserRepository interface...")
|
129
|
+
original_stdout = sys.stdout
|
130
|
+
sys.stdout = StringIO() # Suppress "Next steps" output
|
131
|
+
|
132
|
+
try:
|
133
|
+
_generate_repository(project_path, project_name, 'UserRepository', 'user_repository', implementation=None)
|
134
|
+
finally:
|
135
|
+
sys.stdout = original_stdout
|
136
|
+
|
137
|
+
# Generate SQLAlchemy UserModel
|
138
|
+
click.echo(" + Creating UserModel (SQLAlchemy)...")
|
139
|
+
sys.stdout = StringIO() # Suppress verbose output
|
140
|
+
try:
|
141
|
+
_generate_sqlalchemy_model(project_path, project_name, 'User', 'user')
|
142
|
+
finally:
|
143
|
+
sys.stdout = original_stdout
|
144
|
+
|
145
|
+
# Generate SQLAlchemy repository implementation
|
146
|
+
click.echo(" + Creating SQLAlchemyUserRepository implementation...")
|
147
|
+
_generate_infrastructure_repository(
|
148
|
+
project_path,
|
149
|
+
'UserRepository',
|
150
|
+
'user_repository',
|
151
|
+
'User',
|
152
|
+
'user',
|
153
|
+
'sql'
|
154
|
+
)
|
155
|
+
|
156
|
+
click.echo(click.style("\n ✓ Example User repository created!", fg='green'))
|
157
|
+
click.echo("\nGenerated files:")
|
158
|
+
click.echo(" - domain/entities/user.py")
|
159
|
+
click.echo(" - domain/repositories/user_repository.py")
|
160
|
+
click.echo(" - infrastructure/models/user.py")
|
161
|
+
click.echo(" - infrastructure/repositories/sqlalchemy_user_repository.py")
|
162
|
+
click.echo("\nNext step: Update config.py to register SQLAlchemyUserRepository in SERVICES dict")
|
vega/cli/commands/init.py
CHANGED
@@ -53,18 +53,9 @@ def init_project(project_name: str, template: str, parent_path: str):
|
|
53
53
|
from vega.cli.templates import render_cli_commands_init
|
54
54
|
content = render_cli_commands_init()
|
55
55
|
(dir_path / "__init__.py").write_text(content)
|
56
|
-
else:
|
57
|
-
(dir_path / "__init__.py").write_text("")
|
58
56
|
|
59
57
|
click.echo(f" + Created {directory}/")
|
60
58
|
|
61
|
-
# Create __init__.py files
|
62
|
-
(project_path / "__init__.py").write_text("")
|
63
|
-
(project_path / "domain" / "__init__.py").write_text("")
|
64
|
-
(project_path / "application" / "__init__.py").write_text("")
|
65
|
-
(project_path / "infrastructure" / "__init__.py").write_text("")
|
66
|
-
(project_path / "presentation" / "__init__.py").write_text("")
|
67
|
-
(project_path / "tests" / "__init__.py").write_text("")
|
68
59
|
|
69
60
|
# Create config.py
|
70
61
|
config_content = render_template("config.py.j2", project_name=project_name)
|
@@ -131,8 +122,8 @@ def init_project(project_name: str, template: str, parent_path: str):
|
|
131
122
|
|
132
123
|
if template == "fastapi":
|
133
124
|
click.echo(f"\nRun commands:")
|
134
|
-
click.echo(f"
|
135
|
-
click.echo(f"
|
125
|
+
click.echo(f" vega web run # Start FastAPI server (http://localhost:8000)")
|
126
|
+
click.echo(f" vega web run --reload # Start with auto-reload")
|
136
127
|
click.echo(f" python main.py hello # Run CLI command")
|
137
128
|
click.echo(f" python main.py --help # Show all commands")
|
138
129
|
else:
|
vega/cli/commands/web.py
ADDED
@@ -0,0 +1,90 @@
|
|
1
|
+
"""Web command - Manage FastAPI web server"""
|
2
|
+
import sys
|
3
|
+
from pathlib import Path
|
4
|
+
|
5
|
+
import click
|
6
|
+
|
7
|
+
|
8
|
+
@click.group()
|
9
|
+
def web():
|
10
|
+
"""Manage FastAPI web server
|
11
|
+
|
12
|
+
Commands to manage the web server for your Vega project.
|
13
|
+
The web module must be added to the project first using 'vega add web'.
|
14
|
+
"""
|
15
|
+
pass
|
16
|
+
|
17
|
+
|
18
|
+
@web.command()
|
19
|
+
@click.option('--host', default='0.0.0.0', help='Host to bind')
|
20
|
+
@click.option('--port', default=8000, help='Port to bind')
|
21
|
+
@click.option('--reload', is_flag=True, help='Enable auto-reload')
|
22
|
+
@click.option('--path', default='.', help='Path to Vega project (default: current directory)')
|
23
|
+
def run(host: str, port: int, reload: bool, path: str):
|
24
|
+
"""Start the FastAPI web server
|
25
|
+
|
26
|
+
Examples:
|
27
|
+
vega web run
|
28
|
+
vega web run --reload
|
29
|
+
vega web run --host 127.0.0.1 --port 3000
|
30
|
+
vega web run --path ./my-project --reload
|
31
|
+
"""
|
32
|
+
project_path = Path(path).resolve()
|
33
|
+
|
34
|
+
# Validate it's a Vega project
|
35
|
+
if not (project_path / "config.py").exists():
|
36
|
+
click.echo(click.style("ERROR: Not a Vega project (config.py not found)", fg='red'))
|
37
|
+
click.echo(f"Path checked: {project_path}")
|
38
|
+
click.echo("\nRun 'vega init <project-name>' to create a new Vega project.")
|
39
|
+
sys.exit(1)
|
40
|
+
|
41
|
+
# Check if web module exists
|
42
|
+
web_main = project_path / "presentation" / "web" / "main.py"
|
43
|
+
if not web_main.exists():
|
44
|
+
click.echo(click.style("ERROR: Web module not found", fg='red'))
|
45
|
+
click.echo("\nThe FastAPI web module is not available in this project.")
|
46
|
+
click.echo("Add it using:")
|
47
|
+
click.echo(click.style(" vega add web", fg='cyan', bold=True))
|
48
|
+
sys.exit(1)
|
49
|
+
|
50
|
+
# Add project path to sys.path so we can import from it
|
51
|
+
if str(project_path) not in sys.path:
|
52
|
+
sys.path.insert(0, str(project_path))
|
53
|
+
|
54
|
+
# Try to import uvicorn
|
55
|
+
try:
|
56
|
+
import uvicorn
|
57
|
+
except ImportError:
|
58
|
+
click.echo(click.style("ERROR: uvicorn not installed", fg='red'))
|
59
|
+
click.echo("\nInstall FastAPI dependencies:")
|
60
|
+
click.echo(click.style(" poetry add fastapi uvicorn[standard]", fg='cyan', bold=True))
|
61
|
+
sys.exit(1)
|
62
|
+
|
63
|
+
# Try to import the app
|
64
|
+
try:
|
65
|
+
from presentation.web.main import app
|
66
|
+
except ImportError as e:
|
67
|
+
click.echo(click.style("ERROR: Failed to import FastAPI app", fg='red'))
|
68
|
+
click.echo(f"\nDetails: {e}")
|
69
|
+
click.echo("\nMake sure:")
|
70
|
+
click.echo(" 1. You are in the project directory or use --path")
|
71
|
+
click.echo(" 2. The web module is properly configured")
|
72
|
+
click.echo(" 3. All dependencies are installed (poetry install)")
|
73
|
+
sys.exit(1)
|
74
|
+
|
75
|
+
click.echo(f"Starting web server on http://{host}:{port}")
|
76
|
+
if reload:
|
77
|
+
click.echo(click.style("Auto-reload enabled", fg='yellow'))
|
78
|
+
|
79
|
+
# Run the server
|
80
|
+
try:
|
81
|
+
uvicorn.run(
|
82
|
+
"presentation.web.main:app",
|
83
|
+
host=host,
|
84
|
+
port=port,
|
85
|
+
reload=reload,
|
86
|
+
)
|
87
|
+
except Exception as e:
|
88
|
+
click.echo(click.style(f"\nERROR: Failed to start server", fg='red'))
|
89
|
+
click.echo(f"Details: {e}")
|
90
|
+
sys.exit(1)
|
vega/cli/main.py
CHANGED
@@ -9,6 +9,7 @@ from vega.cli.commands.generate import generate_component
|
|
9
9
|
from vega.cli.commands.add import add
|
10
10
|
from vega.cli.commands.update import update_vega, check_version
|
11
11
|
from vega.cli.commands.migrate import migrate
|
12
|
+
from vega.cli.commands.web import web
|
12
13
|
|
13
14
|
|
14
15
|
@click.group()
|
@@ -139,9 +140,10 @@ def update(check, force):
|
|
139
140
|
update_vega(force=force)
|
140
141
|
|
141
142
|
|
142
|
-
# Register the add and
|
143
|
+
# Register the add, migrate and web commands
|
143
144
|
cli.add_command(add)
|
144
145
|
cli.add_command(migrate)
|
146
|
+
cli.add_command(web)
|
145
147
|
|
146
148
|
|
147
149
|
if __name__ == '__main__':
|
@@ -46,8 +46,8 @@ python main.py hello
|
|
46
46
|
python main.py greet --name John
|
47
47
|
|
48
48
|
# If using FastAPI template, run the web server
|
49
|
-
|
50
|
-
|
49
|
+
vega web run
|
50
|
+
vega web run --reload # With auto-reload
|
51
51
|
# Visit http://localhost:8000/api/health/status
|
52
52
|
|
53
53
|
# Run tests
|
@@ -1,54 +1,4 @@
|
|
1
1
|
"""Main entry point for {{ project_name }}"""
|
2
|
-
{% if template == "fastapi" -%}
|
3
|
-
import click
|
4
|
-
import config # noqa: F401 - Import to initialize DI container
|
5
|
-
|
6
|
-
|
7
|
-
@click.group()
|
8
|
-
def cli():
|
9
|
-
"""Vega Framework Application - CLI and Web"""
|
10
|
-
pass
|
11
|
-
|
12
|
-
|
13
|
-
@cli.command()
|
14
|
-
@click.option('--host', default='0.0.0.0', help='Host to bind')
|
15
|
-
@click.option('--port', default=8000, help='Port to bind')
|
16
|
-
@click.option('--reload', is_flag=True, help='Enable auto-reload')
|
17
|
-
def web(host: str, port: int, reload: bool):
|
18
|
-
"""Start FastAPI web server"""
|
19
|
-
import uvicorn
|
20
|
-
from presentation.web.main import app
|
21
|
-
|
22
|
-
click.echo(f"Starting web server on http://{host}:{port}")
|
23
|
-
uvicorn.run(
|
24
|
-
app,
|
25
|
-
host=host,
|
26
|
-
port=port,
|
27
|
-
reload=reload,
|
28
|
-
)
|
29
|
-
|
30
|
-
|
31
|
-
@cli.command()
|
32
|
-
def hello():
|
33
|
-
"""Example CLI command"""
|
34
|
-
click.echo("Hello from Vega Framework!")
|
35
|
-
click.echo("Add your CLI commands in presentation/cli/commands/")
|
36
|
-
|
37
|
-
|
38
|
-
# Auto-register custom commands from presentation/cli/commands/
|
39
|
-
try:
|
40
|
-
from presentation.cli.commands import get_commands
|
41
|
-
for cmd in get_commands():
|
42
|
-
cli.add_command(cmd)
|
43
|
-
except ImportError:
|
44
|
-
# cli/commands/ not created yet
|
45
|
-
pass
|
46
|
-
|
47
|
-
|
48
|
-
if __name__ == "__main__":
|
49
|
-
cli()
|
50
|
-
{% else -%}
|
51
|
-
import asyncio
|
52
2
|
import click
|
53
3
|
import config # noqa: F401 - Import to initialize DI container
|
54
4
|
|
@@ -58,43 +8,9 @@ import config # noqa: F401 - Import to initialize DI container
|
|
58
8
|
|
59
9
|
@click.group()
|
60
10
|
def cli():
|
61
|
-
"""Vega Framework
|
11
|
+
"""Vega Framework Application"""
|
62
12
|
pass
|
63
13
|
|
64
|
-
|
65
|
-
@cli.command()
|
66
|
-
def hello():
|
67
|
-
"""Example CLI command"""
|
68
|
-
click.echo("Hello from Vega Framework!")
|
69
|
-
click.echo("Add your CLI commands in presentation/cli/commands/")
|
70
|
-
|
71
|
-
|
72
|
-
@cli.command()
|
73
|
-
@click.option('--name', default='World', help='Name to greet')
|
74
|
-
def greet(name: str):
|
75
|
-
"""Example command with parameter"""
|
76
|
-
click.echo(f"Hello, {name}!")
|
77
|
-
|
78
|
-
|
79
|
-
# Uncomment this block if you enable FastAPI support
|
80
|
-
# @cli.command()
|
81
|
-
# @click.option('--host', default='0.0.0.0', help='Host to bind')
|
82
|
-
# @click.option('--port', default=8000, help='Port to bind')
|
83
|
-
# @click.option('--reload', is_flag=True, help='Enable auto-reload')
|
84
|
-
# def web(host: str, port: int, reload: bool):
|
85
|
-
# """Start FastAPI web server"""
|
86
|
-
# import uvicorn
|
87
|
-
# from presentation.web.main import app
|
88
|
-
#
|
89
|
-
# click.echo(f"Starting web server on http://{host}:{port}")
|
90
|
-
# uvicorn.run(
|
91
|
-
# app,
|
92
|
-
# host=host,
|
93
|
-
# port=port,
|
94
|
-
# reload=reload,
|
95
|
-
# )
|
96
|
-
|
97
|
-
|
98
14
|
# Auto-register custom commands from presentation/cli/commands/
|
99
15
|
try:
|
100
16
|
from presentation.cli.commands import get_commands
|
@@ -107,4 +23,3 @@ except ImportError:
|
|
107
23
|
|
108
24
|
if __name__ == "__main__":
|
109
25
|
cli()
|
110
|
-
{% endif -%}
|
@@ -9,59 +9,9 @@ import config # noqa: F401 - Import to initialize DI container
|
|
9
9
|
|
10
10
|
@click.group()
|
11
11
|
def cli():
|
12
|
-
"""Vega Framework Application
|
12
|
+
"""Vega Framework Application"""
|
13
13
|
pass
|
14
14
|
|
15
|
-
|
16
|
-
@cli.command()
|
17
|
-
@click.option('--host', default='0.0.0.0', help='Host to bind')
|
18
|
-
@click.option('--port', default=8000, help='Port to bind')
|
19
|
-
@click.option('--reload', is_flag=True, help='Enable auto-reload')
|
20
|
-
def web(host: str, port: int, reload: bool):
|
21
|
-
"""Start FastAPI web server"""
|
22
|
-
import uvicorn
|
23
|
-
from presentation.web.main import app
|
24
|
-
|
25
|
-
click.echo(f"Starting web server on http://{host}:{port}")
|
26
|
-
uvicorn.run(
|
27
|
-
app,
|
28
|
-
host=host,
|
29
|
-
port=port,
|
30
|
-
reload=reload,
|
31
|
-
)
|
32
|
-
|
33
|
-
|
34
|
-
@cli.command()
|
35
|
-
def hello():
|
36
|
-
"""Example CLI command"""
|
37
|
-
click.echo("Hello from Vega Framework!")
|
38
|
-
click.echo("Add your CLI commands in presentation/cli/commands/")
|
39
|
-
|
40
|
-
|
41
|
-
@cli.command()
|
42
|
-
@click.option('--name', required=True, help='User name')
|
43
|
-
@click.option('--email', required=True, help='User email')
|
44
|
-
@async_command
|
45
|
-
async def create_user(name: str, email: str):
|
46
|
-
"""
|
47
|
-
Example async CLI command that uses an interactor.
|
48
|
-
|
49
|
-
This demonstrates how to use async/await with Click commands
|
50
|
-
to execute interactors and other async operations.
|
51
|
-
|
52
|
-
Usage:
|
53
|
-
python main.py create-user --name="John Doe" --email="john@example.com"
|
54
|
-
"""
|
55
|
-
# Import your interactor
|
56
|
-
# from domain.interactors.create_user import CreateUser
|
57
|
-
# user = await CreateUser(name=name, email=email)
|
58
|
-
# click.echo(f"Created user: {user.id} - {user.name}")
|
59
|
-
|
60
|
-
# Placeholder implementation
|
61
|
-
click.echo(f"Creating user: {name} ({email})")
|
62
|
-
click.echo("Note: Replace this with your actual CreateUser interactor")
|
63
|
-
|
64
|
-
|
65
15
|
# Auto-register custom commands from presentation/cli/commands/
|
66
16
|
try:
|
67
17
|
from presentation.cli.commands import get_commands
|
@@ -12,64 +12,6 @@ def cli():
|
|
12
12
|
"""Vega Framework CLI Application"""
|
13
13
|
pass
|
14
14
|
|
15
|
-
|
16
|
-
@cli.command()
|
17
|
-
def hello():
|
18
|
-
"""Example CLI command"""
|
19
|
-
click.echo("Hello from Vega Framework!")
|
20
|
-
click.echo("Add your CLI commands in presentation/cli/commands/")
|
21
|
-
|
22
|
-
|
23
|
-
@cli.command()
|
24
|
-
@click.option('--name', default='World', help='Name to greet')
|
25
|
-
def greet(name: str):
|
26
|
-
"""Example command with parameter"""
|
27
|
-
click.echo(f"Hello, {name}!")
|
28
|
-
|
29
|
-
|
30
|
-
@cli.command()
|
31
|
-
@click.option('--name', required=True, help='User name')
|
32
|
-
@click.option('--email', required=True, help='User email')
|
33
|
-
@async_command
|
34
|
-
async def create_user(name: str, email: str):
|
35
|
-
"""
|
36
|
-
Example async command that uses an interactor.
|
37
|
-
|
38
|
-
This demonstrates how to use async/await with Click commands
|
39
|
-
to execute interactors and other async operations.
|
40
|
-
|
41
|
-
Usage:
|
42
|
-
python main.py create-user --name="John Doe" --email="john@example.com"
|
43
|
-
"""
|
44
|
-
# Import your interactor
|
45
|
-
# from domain.interactors.create_user import CreateUser
|
46
|
-
# user = await CreateUser(name=name, email=email)
|
47
|
-
# click.echo(f"Created user: {user.id} - {user.name}")
|
48
|
-
|
49
|
-
# Placeholder implementation
|
50
|
-
click.echo(f"Creating user: {name} ({email})")
|
51
|
-
click.echo("Note: Replace this with your actual CreateUser interactor")
|
52
|
-
|
53
|
-
|
54
|
-
# Uncomment this block if you enable FastAPI support
|
55
|
-
# @cli.command()
|
56
|
-
# @click.option('--host', default='0.0.0.0', help='Host to bind')
|
57
|
-
# @click.option('--port', default=8000, help='Port to bind')
|
58
|
-
# @click.option('--reload', is_flag=True, help='Enable auto-reload')
|
59
|
-
# def web(host: str, port: int, reload: bool):
|
60
|
-
# """Start FastAPI web server"""
|
61
|
-
# import uvicorn
|
62
|
-
# from presentation.web.main import app
|
63
|
-
#
|
64
|
-
# click.echo(f"Starting web server on http://{host}:{port}")
|
65
|
-
# uvicorn.run(
|
66
|
-
# app,
|
67
|
-
# host=host,
|
68
|
-
# port=port,
|
69
|
-
# reload=reload,
|
70
|
-
# )
|
71
|
-
|
72
|
-
|
73
15
|
# Auto-register custom commands from presentation/cli/commands/
|
74
16
|
try:
|
75
17
|
from presentation.cli.commands import get_commands
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: vega-framework
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.26
|
4
4
|
Summary: Enterprise-ready Python framework that enforces Clean Architecture for building maintainable and scalable applications.
|
5
5
|
License: MIT
|
6
6
|
License-File: LICENSE
|
@@ -19,10 +19,12 @@ Classifier: Programming Language :: Python :: 3.14
|
|
19
19
|
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
|
20
20
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
21
21
|
Requires-Dist: click (>=8.0,<9.0)
|
22
|
+
Requires-Dist: fastapi (>=0.109,<0.110)
|
22
23
|
Requires-Dist: jinja2 (>=3.1,<4.0)
|
23
24
|
Requires-Dist: pydantic (>=2.0,<3.0)
|
24
25
|
Requires-Dist: pydantic-settings (>=2.0,<3.0)
|
25
26
|
Requires-Dist: toml (>=0.10,<0.11)
|
27
|
+
Requires-Dist: uvicorn (>=0.27,<0.28)
|
26
28
|
Project-URL: Documentation, https://vega-framework.readthedocs.io
|
27
29
|
Project-URL: Homepage, https://github.com/RobyFerro/vega-framework
|
28
30
|
Project-URL: Repository, https://github.com/RobyFerro/vega-framework
|
@@ -1,12 +1,13 @@
|
|
1
1
|
vega/__init__.py,sha256=A05RwOYXooAZUz3GnbJ--ofLXgtRZK9gaSmsLVRdGPY,1811
|
2
2
|
vega/cli/__init__.py,sha256=NCzOOyhKHqLeN1r80ekhMfkQwBdAQXKcKiKoNwYPNiY,304
|
3
3
|
vega/cli/commands/__init__.py,sha256=UH7MdYduBG_YoulgdiWkUCtcgGLzuYRGFzxaqoa0pyg,19
|
4
|
-
vega/cli/commands/add.py,sha256=
|
4
|
+
vega/cli/commands/add.py,sha256=z-KH0R_Si43eqTozPtLNpzXBzPyFWL-oXSCLLfP6mog,6583
|
5
5
|
vega/cli/commands/generate.py,sha256=sR8d-0mgF9Aq0qy-QGAB_-JndCw82EpkwHcXQQxDMnM,34569
|
6
|
-
vega/cli/commands/init.py,sha256=
|
6
|
+
vega/cli/commands/init.py,sha256=kBRtntHT7e-y9uOwZm9o9IUED64e_pO5fBEsIx5m-X8,5592
|
7
7
|
vega/cli/commands/migrate.py,sha256=00swKeVhmKr1_1VJhg3GpIMcJ6Jfgz5FUpmJoLf5qSQ,3805
|
8
8
|
vega/cli/commands/update.py,sha256=0zRWkHvQwKGlJL9XF3bi--dThkFapyNOugL6AgGr6Ic,5897
|
9
|
-
vega/cli/
|
9
|
+
vega/cli/commands/web.py,sha256=7Lte7X7Gx0XJFCxnUIaadlmzXdosPR5P4Uu71V2cxWc,3130
|
10
|
+
vega/cli/main.py,sha256=GNqNB6kX_c2a7d68B3g4_oFyWjxTf8ZaoPH7TaYiSmk,5136
|
10
11
|
vega/cli/scaffolds/__init__.py,sha256=WFJf2H_4UWL89gDxX8PXKkTVSVOfw7hFfyaPWKokp1g,217
|
11
12
|
vega/cli/scaffolds/fastapi.py,sha256=a_vZVSfMgyteRURFZAShbtjSRMOSM4YeEIKKvBtAOfo,3788
|
12
13
|
vega/cli/scaffolds/sqlalchemy.py,sha256=il5JqiA8LSQKnNoOYfAFD82rdYx5l_ZsqsjHnplYohw,6164
|
@@ -27,11 +28,11 @@ vega/cli/templates/loader.py,sha256=cyt9ZOVLwBgv4ijPxoqR4JgFSbdkXCMzviHcq3fdv8Q,
|
|
27
28
|
vega/cli/templates/project/.env.example,sha256=BqfRxYeOasgZMz4_B2kybu6areIy9dHCt5BJ6fa56ik,221
|
28
29
|
vega/cli/templates/project/.gitignore,sha256=7JSDihCtBznd-QxQ4wUtHM9fnbYnbw6PK4Auh56ofAY,229
|
29
30
|
vega/cli/templates/project/ARCHITECTURE.md.j2,sha256=HunrJ_9LlPxd5-GONaJxjoLlw-XfjYaLpsVHFa72Yf4,25868
|
30
|
-
vega/cli/templates/project/README.md.j2,sha256=
|
31
|
+
vega/cli/templates/project/README.md.j2,sha256=tZtMKhyKjfCq5JTECHihISu0VjYd254t-7y2kJ0nbKY,4589
|
31
32
|
vega/cli/templates/project/config.py.j2,sha256=1Iva9JEz5ej_WmTbRVBvOfSBhYUKIzN88p6GYKR0m4s,866
|
32
|
-
vega/cli/templates/project/main.py.j2,sha256=
|
33
|
-
vega/cli/templates/project/main_fastapi.py.j2,sha256=
|
34
|
-
vega/cli/templates/project/main_standard.py.j2,sha256=
|
33
|
+
vega/cli/templates/project/main.py.j2,sha256=wpIWNcj0N42KI1crdn0aDISZ6aRt9LjX7FDzJxEE8OM,572
|
34
|
+
vega/cli/templates/project/main_fastapi.py.j2,sha256=5xXB7_OR1-3vkTAkvRvSh3GpL5NWnUEId3bSOOd9qxA,613
|
35
|
+
vega/cli/templates/project/main_standard.py.j2,sha256=j2z6u93_ObiOquzYQM1sZex50Z1cAwHOEG1-0REImRI,617
|
35
36
|
vega/cli/templates/project/pyproject.toml.j2,sha256=372XOUluFot28oKyAwnKt_hBJEtc7qfULVjmFYq8_FE,643
|
36
37
|
vega/cli/templates/project/settings.py.j2,sha256=uHt3qVbzoYZNb1ViD2Bu4SZYYw0jCUx6_m_kauILCCs,522
|
37
38
|
vega/cli/templates/sqlalchemy/alembic.ini.j2,sha256=7pcqcXWXU_0lHaokuHlkUNoN20oOw1Dd6HizMG1Cmmk,3472
|
@@ -71,8 +72,8 @@ vega/patterns/repository.py,sha256=uYUyLs-O8OqW1Wb9ZqIo8UUcCjZ5UFuHors_F2iDg9A,1
|
|
71
72
|
vega/patterns/service.py,sha256=buFRgJoeQtZQK22Upb4vh84c1elWKFXWBaB0X4RaruE,1374
|
72
73
|
vega/settings/__init__.py,sha256=Eb8PMUyXAlCAQIcL2W8QhTTUHUbVlkAfXdpTUlADo1I,786
|
73
74
|
vega/settings/base.py,sha256=bL45hyoa3t-hQOvur860eSo7O833sQMsXJJPwbTVbwE,1321
|
74
|
-
vega_framework-0.1.
|
75
|
-
vega_framework-0.1.
|
76
|
-
vega_framework-0.1.
|
77
|
-
vega_framework-0.1.
|
78
|
-
vega_framework-0.1.
|
75
|
+
vega_framework-0.1.26.dist-info/METADATA,sha256=Bquhk2HkD4lRALjv17GC34Mb97X_PzabZiDcXM-ENd0,12349
|
76
|
+
vega_framework-0.1.26.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
|
77
|
+
vega_framework-0.1.26.dist-info/entry_points.txt,sha256=p3gyTmPYjNRLbuiKS-hG3ytWd-ssBweFy6VZ-F9FTNk,42
|
78
|
+
vega_framework-0.1.26.dist-info/licenses/LICENSE,sha256=wlHh1MBTcs2kSQr99P30mZ61s7uh7Cp9Rk0YiJxots0,1084
|
79
|
+
vega_framework-0.1.26.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|