calypso-api 0.1.0__py3-none-any.whl → 0.1.1__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.
calypso_api/cli.py CHANGED
@@ -1,6 +1,7 @@
1
1
 
2
2
  import typer
3
3
  import uvicorn
4
+ from typing import Optional
4
5
  from calypso_api.core import config
5
6
  from pathlib import Path
6
7
  from calypso_api.scaffold import generate
@@ -31,14 +32,37 @@ def shell():
31
32
 
32
33
  @app.command()
33
34
  def init(
34
- destino: Path = typer.Argument(..., file_okay=False, dir_okay=True, readable=True, writable=True, help="Directorio destino"),
35
- nombre: str = typer.Argument(..., help="Nombre del proyecto"),
35
+ destino: Optional[Path] = typer.Argument(None, help="Directorio destino"),
36
+ nombre: Optional[str] = typer.Argument(None, help="Nombre del proyecto"),
36
37
  host: str = typer.Option("127.0.0.1", help="Host para la aplicación"),
37
38
  port: int = typer.Option(8000, help="Puerto para la aplicación"),
38
- docker: bool = typer.Option(True, help="Incluir configuración de Docker")
39
+ docker: bool = typer.Option(True, help="Incluir configuración de Docker"),
40
+ interactive: bool = typer.Option(False, "--interactive", "-i", help="Habilitar modo interactivo para opciones avanzadas")
39
41
  ):
42
+ """
43
+ Inicializa un nuevo proyecto Calypso.
44
+
45
+ Si no se proporcionan argumentos, se solicitarán de forma interactiva.
46
+ """
47
+ if destino is None:
48
+ typer.secho("👋 ¡Bienvenido al asistente de creación de proyectos Calypso!", fg=typer.colors.GREEN, bold=True)
49
+ destino_str = typer.prompt("📂 ¿Dónde quieres crear el proyecto? (Directorio destino)")
50
+ destino = Path(destino_str)
51
+
52
+ if nombre is None:
53
+ nombre = typer.prompt("📦 ¿Cuál es el nombre de tu proyecto?")
54
+
55
+ if interactive:
56
+ host = typer.prompt("🌐 Host para la aplicación", default=host)
57
+ port = typer.prompt("🔌 Puerto para la aplicación", default=port, type=int)
58
+ docker = typer.confirm("🐳 ¿Incluir configuración de Docker?", default=docker)
59
+
40
60
  generate(destino, nombre, host, port, docker)
41
- typer.echo(f"Estructura creada en {destino}")
61
+
62
+ typer.secho(f"\n✨ Estructura creada exitosamente en {destino}", fg=typer.colors.GREEN, bold=True)
63
+ typer.echo("🚀 Para iniciar:")
64
+ typer.secho(f" cd {destino}", fg=typer.colors.CYAN)
65
+ typer.secho(" calypso run", fg=typer.colors.CYAN)
42
66
 
43
67
  if __name__ == "__main__":
44
68
  app()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: calypso-api
3
- Version: 0.1.0
3
+ Version: 0.1.1
4
4
  Summary: Calypso API Library and CLI for scaffolding FastAPI projects
5
5
  Author-email: Juan Maniglia <juan.maniglia@example.com>
6
6
  License: MIT
@@ -1,6 +1,6 @@
1
1
  calypso_api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
2
  calypso_api/__main__.py,sha256=c8bbCFxGZ-HpBs3G9tJN8O4PuEYBItzP3gsVhRaXGHs,70
3
- calypso_api/cli.py,sha256=TTSyvTETOJEaLyqNjTq9ROBI-hgdxzs9zurVnxjSIvM,1218
3
+ calypso_api/cli.py,sha256=9tK9hzFbwLqt0yNOo9_Gqsxvy4o1VfijLHoJHHAD_IY,2349
4
4
  calypso_api/main.py,sha256=kYdM0xs2UpEdQA0l-RJIcBgsLE7_41bVu5BfrcXDA78,948
5
5
  calypso_api/scaffold.py,sha256=pCOcK0fV4TtoImy_OPjQJA1Y1QGp4WUXRCZkH2Ik69Q,32077
6
6
  calypso_api/auth/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -19,7 +19,7 @@ calypso_api/schemas/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSu
19
19
  calypso_api/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
20
20
  calypso_api/test/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
21
21
  calypso_api/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
22
- calypso_api-0.1.0.dist-info/METADATA,sha256=VZuACI6QAk01heNsA0aVN_iqs_cOAKmkCHcv8jV-ev8,2274
23
- calypso_api-0.1.0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
24
- calypso_api-0.1.0.dist-info/entry_points.txt,sha256=1OjUzhVPJ8gx098ZWmknCd1ooi4UFfMC0crXQX0mzwo,48
25
- calypso_api-0.1.0.dist-info/RECORD,,
22
+ calypso_api-0.1.1.dist-info/METADATA,sha256=kJ-jQCSrs6_ieePinRNkJNbqpF_Ite5PKuTbv16CQ-k,2274
23
+ calypso_api-0.1.1.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
24
+ calypso_api-0.1.1.dist-info/entry_points.txt,sha256=1OjUzhVPJ8gx098ZWmknCd1ooi4UFfMC0crXQX0mzwo,48
25
+ calypso_api-0.1.1.dist-info/RECORD,,