jinja3kit 1.2.2__tar.gz → 1.2.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.
Files changed (40) hide show
  1. {jinja3kit-1.2.2 → jinja3kit-1.2.3}/PKG-INFO +1 -1
  2. {jinja3kit-1.2.2 → jinja3kit-1.2.3}/pyproject.toml +1 -1
  3. jinja3kit-1.2.3/src/jinja3kit/__init__.py +1 -0
  4. jinja3kit-1.2.3/src/jinja3kit/cli.py +49 -0
  5. jinja3kit-1.2.3/src/jinja3kit/template/__pycache__/app.cpython-313.pyc +0 -0
  6. jinja3kit-1.2.3/src/jinja3kit/template/__pycache__/db.cpython-313.pyc +0 -0
  7. {jinja3kit-1.2.2 → jinja3kit-1.2.3}/src/jinja3kit.egg-info/PKG-INFO +1 -1
  8. {jinja3kit-1.2.2 → jinja3kit-1.2.3}/src/jinja3kit.egg-info/SOURCES.txt +4 -0
  9. {jinja3kit-1.2.2 → jinja3kit-1.2.3}/README.md +0 -0
  10. {jinja3kit-1.2.2 → jinja3kit-1.2.3}/setup.cfg +0 -0
  11. {jinja3kit-1.2.2 → jinja3kit-1.2.3}/src/jinja3kit/template/app.py +0 -0
  12. {jinja3kit-1.2.2 → jinja3kit-1.2.3}/src/jinja3kit/template/db/schema.sql +0 -0
  13. {jinja3kit-1.2.2 → jinja3kit-1.2.3}/src/jinja3kit/template/db/seed.sql +0 -0
  14. {jinja3kit-1.2.2 → jinja3kit-1.2.3}/src/jinja3kit/template/db/shpory_flask_pg_pillow.docx +0 -0
  15. {jinja3kit-1.2.2 → jinja3kit-1.2.3}/src/jinja3kit/template/db.py +0 -0
  16. {jinja3kit-1.2.2 → jinja3kit-1.2.3}/src/jinja3kit/template/static/css/style.css +0 -0
  17. {jinja3kit-1.2.2 → jinja3kit-1.2.3}/src/jinja3kit/template/static/img/1.jpg +0 -0
  18. {jinja3kit-1.2.2 → jinja3kit-1.2.3}/src/jinja3kit/template/static/img/10.jpg +0 -0
  19. {jinja3kit-1.2.2 → jinja3kit-1.2.3}/src/jinja3kit/template/static/img/2.jpg +0 -0
  20. {jinja3kit-1.2.2 → jinja3kit-1.2.3}/src/jinja3kit/template/static/img/3.jpg +0 -0
  21. {jinja3kit-1.2.2 → jinja3kit-1.2.3}/src/jinja3kit/template/static/img/4.jpg +0 -0
  22. {jinja3kit-1.2.2 → jinja3kit-1.2.3}/src/jinja3kit/template/static/img/5.jpg +0 -0
  23. {jinja3kit-1.2.2 → jinja3kit-1.2.3}/src/jinja3kit/template/static/img/6.jpg +0 -0
  24. {jinja3kit-1.2.2 → jinja3kit-1.2.3}/src/jinja3kit/template/static/img/7.jpg +0 -0
  25. {jinja3kit-1.2.2 → jinja3kit-1.2.3}/src/jinja3kit/template/static/img/8.jpg +0 -0
  26. {jinja3kit-1.2.2 → jinja3kit-1.2.3}/src/jinja3kit/template/static/img/9.jpg +0 -0
  27. {jinja3kit-1.2.2 → jinja3kit-1.2.3}/src/jinja3kit/template/static/img/Icon.JPG +0 -0
  28. {jinja3kit-1.2.2 → jinja3kit-1.2.3}/src/jinja3kit/template/static/img/Icon.ico +0 -0
  29. {jinja3kit-1.2.2 → jinja3kit-1.2.3}/src/jinja3kit/template/static/img/Icon.png +0 -0
  30. {jinja3kit-1.2.2 → jinja3kit-1.2.3}/src/jinja3kit/template/static/img/picture.png +0 -0
  31. {jinja3kit-1.2.2 → jinja3kit-1.2.3}/src/jinja3kit/template/templates/base.html +0 -0
  32. {jinja3kit-1.2.2 → jinja3kit-1.2.3}/src/jinja3kit/template/templates/error.html +0 -0
  33. {jinja3kit-1.2.2 → jinja3kit-1.2.3}/src/jinja3kit/template/templates/login.html +0 -0
  34. {jinja3kit-1.2.2 → jinja3kit-1.2.3}/src/jinja3kit/template/templates/order_form.html +0 -0
  35. {jinja3kit-1.2.2 → jinja3kit-1.2.3}/src/jinja3kit/template/templates/orders.html +0 -0
  36. {jinja3kit-1.2.2 → jinja3kit-1.2.3}/src/jinja3kit/template/templates/product_form.html +0 -0
  37. {jinja3kit-1.2.2 → jinja3kit-1.2.3}/src/jinja3kit/template/templates/products.html +0 -0
  38. {jinja3kit-1.2.2 → jinja3kit-1.2.3}/src/jinja3kit.egg-info/dependency_links.txt +0 -0
  39. {jinja3kit-1.2.2 → jinja3kit-1.2.3}/src/jinja3kit.egg-info/entry_points.txt +0 -0
  40. {jinja3kit-1.2.2 → jinja3kit-1.2.3}/src/jinja3kit.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: jinja3kit
3
- Version: 1.2.2
3
+ Version: 1.2.3
4
4
  Summary: A simple Python toolkit for generating Flask-based web projects with PostgreSQL support.
5
5
  Author: JINJA
6
6
  Requires-Python: >=3.10
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "jinja3kit"
7
- version = "1.2.2"
7
+ version = "1.2.3"
8
8
  description = "A simple Python toolkit for generating Flask-based web projects with PostgreSQL support."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -0,0 +1 @@
1
+ __version__ = "0.1.0"
@@ -0,0 +1,49 @@
1
+ from __future__ import annotations
2
+
3
+ # cli.py нужен, если проект используется как шаблон-пакет.
4
+ # Команда jinja3-create копирует готовую папку template в новый проект.
5
+
6
+ import argparse
7
+ import shutil
8
+ from importlib.resources import files
9
+ from pathlib import Path
10
+
11
+
12
+ def create_project(target: str, force: bool = False) -> Path:
13
+ """Создаёт новый проект из папки template."""
14
+ target_path = Path(target).resolve()
15
+ template_path = files("jinja3kit").joinpath("template")
16
+
17
+ # Если папка уже существует, без --force проект не перезаписывается.
18
+ if target_path.exists():
19
+ if not force:
20
+ raise SystemExit(
21
+ f"Папка уже существует: {target_path}\n"
22
+ f"Используй --force, если хочешь перезаписать её."
23
+ )
24
+ shutil.rmtree(target_path)
25
+
26
+ # Копируем весь шаблон: app.py, db.py, templates, static, sql-файлы.
27
+ shutil.copytree(template_path, target_path)
28
+ return target_path
29
+
30
+
31
+ def main() -> None:
32
+ """Точка входа для консольной команды jinja3-create."""
33
+ parser = argparse.ArgumentParser(
34
+ prog="jinja3-create",
35
+ description="Create a neutral Flask + PostgreSQL starter project."
36
+ )
37
+ parser.add_argument("name", help="Название папки нового проекта")
38
+ parser.add_argument("--force", action="store_true", help="Перезаписать папку, если она уже есть")
39
+ args = parser.parse_args()
40
+
41
+ project_path = create_project(args.name, args.force)
42
+
43
+ print(f"Проект создан: {project_path}")
44
+ print("")
45
+ print("Дальше:")
46
+ print(f" cd {project_path.name}")
47
+ print(" copy .env.sample .env")
48
+ print(" pip install -r requirements.txt")
49
+ print(" python app.py")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: jinja3kit
3
- Version: 1.2.2
3
+ Version: 1.2.3
4
4
  Summary: A simple Python toolkit for generating Flask-based web projects with PostgreSQL support.
5
5
  Author: JINJA
6
6
  Requires-Python: >=3.10
@@ -1,5 +1,7 @@
1
1
  README.md
2
2
  pyproject.toml
3
+ src/jinja3kit/__init__.py
4
+ src/jinja3kit/cli.py
3
5
  src/jinja3kit.egg-info/PKG-INFO
4
6
  src/jinja3kit.egg-info/SOURCES.txt
5
7
  src/jinja3kit.egg-info/dependency_links.txt
@@ -7,6 +9,8 @@ src/jinja3kit.egg-info/entry_points.txt
7
9
  src/jinja3kit.egg-info/top_level.txt
8
10
  src/jinja3kit/template/app.py
9
11
  src/jinja3kit/template/db.py
12
+ src/jinja3kit/template/__pycache__/app.cpython-313.pyc
13
+ src/jinja3kit/template/__pycache__/db.cpython-313.pyc
10
14
  src/jinja3kit/template/db/schema.sql
11
15
  src/jinja3kit/template/db/seed.sql
12
16
  src/jinja3kit/template/db/shpory_flask_pg_pillow.docx
File without changes
File without changes