calypso-api 0.1.0__tar.gz → 0.1.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.
Files changed (32) hide show
  1. calypso_api-0.1.1/.gitignore +33 -0
  2. {calypso_api-0.1.0 → calypso_api-0.1.1}/PKG-INFO +1 -1
  3. {calypso_api-0.1.0 → calypso_api-0.1.1}/pyproject.toml +1 -1
  4. calypso_api-0.1.1/src/calypso_api/cli.py +68 -0
  5. calypso_api-0.1.0/.python-version +0 -1
  6. calypso_api-0.1.0/src/calypso_api/cli.py +0 -44
  7. calypso_api-0.1.0/uv.lock +0 -1010
  8. {calypso_api-0.1.0 → calypso_api-0.1.1}/Dockerfile +0 -0
  9. {calypso_api-0.1.0 → calypso_api-0.1.1}/README.md +0 -0
  10. {calypso_api-0.1.0 → calypso_api-0.1.1}/docker-compose.yml +0 -0
  11. {calypso_api-0.1.0 → calypso_api-0.1.1}/main.py +0 -0
  12. {calypso_api-0.1.0 → calypso_api-0.1.1}/requirements.txt +0 -0
  13. {calypso_api-0.1.0 → calypso_api-0.1.1}/src/calypso_api/__init__.py +0 -0
  14. {calypso_api-0.1.0 → calypso_api-0.1.1}/src/calypso_api/__main__.py +0 -0
  15. {calypso_api-0.1.0 → calypso_api-0.1.1}/src/calypso_api/auth/__init__.py +0 -0
  16. {calypso_api-0.1.0 → calypso_api-0.1.1}/src/calypso_api/controllers/__init__.py +0 -0
  17. {calypso_api-0.1.0 → calypso_api-0.1.1}/src/calypso_api/core/__init__.py +0 -0
  18. {calypso_api-0.1.0 → calypso_api-0.1.1}/src/calypso_api/core/config.py +0 -0
  19. {calypso_api-0.1.0 → calypso_api-0.1.1}/src/calypso_api/database/__init__.py +0 -0
  20. {calypso_api-0.1.0 → calypso_api-0.1.1}/src/calypso_api/database/db.py +0 -0
  21. {calypso_api-0.1.0 → calypso_api-0.1.1}/src/calypso_api/dependencies/__init__.py +0 -0
  22. {calypso_api-0.1.0 → calypso_api-0.1.1}/src/calypso_api/helpers/__init__.py +0 -0
  23. {calypso_api-0.1.0 → calypso_api-0.1.1}/src/calypso_api/main.py +0 -0
  24. {calypso_api-0.1.0 → calypso_api-0.1.1}/src/calypso_api/models/__init__.py +0 -0
  25. {calypso_api-0.1.0 → calypso_api-0.1.1}/src/calypso_api/repositories/__init__.py +0 -0
  26. {calypso_api-0.1.0 → calypso_api-0.1.1}/src/calypso_api/routes/__init__.py +0 -0
  27. {calypso_api-0.1.0 → calypso_api-0.1.1}/src/calypso_api/routes/health.py +0 -0
  28. {calypso_api-0.1.0 → calypso_api-0.1.1}/src/calypso_api/scaffold.py +0 -0
  29. {calypso_api-0.1.0 → calypso_api-0.1.1}/src/calypso_api/schemas/__init__.py +0 -0
  30. {calypso_api-0.1.0 → calypso_api-0.1.1}/src/calypso_api/services/__init__.py +0 -0
  31. {calypso_api-0.1.0 → calypso_api-0.1.1}/src/calypso_api/test/__init__.py +0 -0
  32. {calypso_api-0.1.0 → calypso_api-0.1.1}/src/calypso_api/utils/__init__.py +0 -0
@@ -0,0 +1,33 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+ .python-version
6
+
7
+ # Distribution
8
+ dist/
9
+ build/
10
+ *.egg-info/
11
+
12
+ # Environments
13
+ .venv/
14
+ venv/
15
+ env/
16
+
17
+ # IDEs
18
+ .vscode/
19
+ .idea/
20
+ .trae/
21
+
22
+ # Environment variables
23
+ .env
24
+
25
+ # Database
26
+ *.sqlite
27
+ *.db
28
+
29
+ # Logs
30
+ *.log
31
+
32
+ # uv
33
+ uv.lock
@@ -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
  [project]
2
2
  name = "calypso-api"
3
- version = "0.1.0"
3
+ version = "0.1.1"
4
4
  description = "Calypso API Library and CLI for scaffolding FastAPI projects"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.12"
@@ -0,0 +1,68 @@
1
+
2
+ import typer
3
+ import uvicorn
4
+ from typing import Optional
5
+ from calypso_api.core import config
6
+ from pathlib import Path
7
+ from calypso_api.scaffold import generate
8
+
9
+ app = typer.Typer()
10
+
11
+ @app.command()
12
+ def run(
13
+ host: str = "127.0.0.1",
14
+ port: int = 8000,
15
+ reload: bool = True
16
+ ):
17
+ uvicorn.run(
18
+ "calypso_api.main:app",
19
+ host=host,
20
+ port=port,
21
+ reload=reload,
22
+ log_level="info" if config.DEBUG else "warning"
23
+ )
24
+
25
+ @app.command()
26
+ def shell():
27
+ import IPython
28
+ from calypso_api.database.db import engine
29
+
30
+ typer.echo("Opening shell...")
31
+ IPython.embed(header="API Template Shell", colors="neutral")
32
+
33
+ @app.command()
34
+ def init(
35
+ destino: Optional[Path] = typer.Argument(None, help="Directorio destino"),
36
+ nombre: Optional[str] = typer.Argument(None, help="Nombre del proyecto"),
37
+ host: str = typer.Option("127.0.0.1", help="Host para la aplicación"),
38
+ port: int = typer.Option(8000, help="Puerto para la aplicación"),
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")
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
+
60
+ generate(destino, nombre, host, port, docker)
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)
66
+
67
+ if __name__ == "__main__":
68
+ app()
@@ -1 +0,0 @@
1
- 3.12
@@ -1,44 +0,0 @@
1
-
2
- import typer
3
- import uvicorn
4
- from calypso_api.core import config
5
- from pathlib import Path
6
- from calypso_api.scaffold import generate
7
-
8
- app = typer.Typer()
9
-
10
- @app.command()
11
- def run(
12
- host: str = "127.0.0.1",
13
- port: int = 8000,
14
- reload: bool = True
15
- ):
16
- uvicorn.run(
17
- "calypso_api.main:app",
18
- host=host,
19
- port=port,
20
- reload=reload,
21
- log_level="info" if config.DEBUG else "warning"
22
- )
23
-
24
- @app.command()
25
- def shell():
26
- import IPython
27
- from calypso_api.database.db import engine
28
-
29
- typer.echo("Opening shell...")
30
- IPython.embed(header="API Template Shell", colors="neutral")
31
-
32
- @app.command()
33
- 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"),
36
- host: str = typer.Option("127.0.0.1", help="Host para la aplicación"),
37
- port: int = typer.Option(8000, help="Puerto para la aplicación"),
38
- docker: bool = typer.Option(True, help="Incluir configuración de Docker")
39
- ):
40
- generate(destino, nombre, host, port, docker)
41
- typer.echo(f"Estructura creada en {destino}")
42
-
43
- if __name__ == "__main__":
44
- app()