faster-app 0.0.12__tar.gz → 0.0.13__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 (42) hide show
  1. {faster_app-0.0.12 → faster_app-0.0.13}/PKG-INFO +1 -1
  2. {faster_app-0.0.12 → faster_app-0.0.13}/faster_app/__init__.py +1 -1
  3. faster_app-0.0.13/faster_app/commands/builtins/app.py +46 -0
  4. {faster_app-0.0.12 → faster_app-0.0.13}/faster_app.egg-info/PKG-INFO +1 -1
  5. {faster_app-0.0.12 → faster_app-0.0.13}/pyproject.toml +1 -1
  6. faster_app-0.0.12/faster_app/commands/builtins/app.py +0 -29
  7. {faster_app-0.0.12 → faster_app-0.0.13}/LICENSE +0 -0
  8. {faster_app-0.0.12 → faster_app-0.0.13}/README.md +0 -0
  9. {faster_app-0.0.12 → faster_app-0.0.13}/faster_app/.env.example +0 -0
  10. {faster_app-0.0.12 → faster_app-0.0.13}/faster_app/base.py +0 -0
  11. {faster_app-0.0.12 → faster_app-0.0.13}/faster_app/commands/__init__.py +0 -0
  12. {faster_app-0.0.12 → faster_app-0.0.13}/faster_app/commands/base.py +0 -0
  13. {faster_app-0.0.12 → faster_app-0.0.13}/faster_app/commands/builtins/__init__.py +0 -0
  14. {faster_app-0.0.12 → faster_app-0.0.13}/faster_app/commands/builtins/db.py +0 -0
  15. {faster_app-0.0.12 → faster_app-0.0.13}/faster_app/commands/builtins/fastapi.py +0 -0
  16. {faster_app-0.0.12 → faster_app-0.0.13}/faster_app/commands/discover.py +0 -0
  17. {faster_app-0.0.12 → faster_app-0.0.13}/faster_app/db.py +0 -0
  18. {faster_app-0.0.12 → faster_app-0.0.13}/faster_app/main.py +0 -0
  19. {faster_app-0.0.12 → faster_app-0.0.13}/faster_app/models/__init__.py +0 -0
  20. {faster_app-0.0.12 → faster_app-0.0.13}/faster_app/models/base.py +0 -0
  21. {faster_app-0.0.12 → faster_app-0.0.13}/faster_app/models/discover.py +0 -0
  22. {faster_app-0.0.12 → faster_app-0.0.13}/faster_app/routes/__init__.py +0 -0
  23. {faster_app-0.0.12 → faster_app-0.0.13}/faster_app/routes/base.py +0 -0
  24. {faster_app-0.0.12 → faster_app-0.0.13}/faster_app/routes/builtins/__init__.py +0 -0
  25. {faster_app-0.0.12 → faster_app-0.0.13}/faster_app/routes/builtins/defaults.py +0 -0
  26. {faster_app-0.0.12 → faster_app-0.0.13}/faster_app/routes/builtins/swagger.py +0 -0
  27. {faster_app-0.0.12 → faster_app-0.0.13}/faster_app/routes/discover.py +0 -0
  28. {faster_app-0.0.12 → faster_app-0.0.13}/faster_app/settings/__init__.py +0 -0
  29. {faster_app-0.0.12 → faster_app-0.0.13}/faster_app/settings/builtins/settings.py +0 -0
  30. {faster_app-0.0.12 → faster_app-0.0.13}/faster_app/settings/discover.py +0 -0
  31. {faster_app-0.0.12 → faster_app-0.0.13}/faster_app/statics/swagger-ui-bundle.min.js +0 -0
  32. {faster_app-0.0.12 → faster_app-0.0.13}/faster_app/statics/swagger-ui.min.css +0 -0
  33. {faster_app-0.0.12 → faster_app-0.0.13}/faster_app/templates/apps/demo/commands.py +0 -0
  34. {faster_app-0.0.12 → faster_app-0.0.13}/faster_app/templates/apps/demo/models.py +0 -0
  35. {faster_app-0.0.12 → faster_app-0.0.13}/faster_app/templates/apps/demo/routes.py +0 -0
  36. {faster_app-0.0.12 → faster_app-0.0.13}/faster_app/templates/config/settings.py +0 -0
  37. {faster_app-0.0.12 → faster_app-0.0.13}/faster_app.egg-info/SOURCES.txt +0 -0
  38. {faster_app-0.0.12 → faster_app-0.0.13}/faster_app.egg-info/dependency_links.txt +0 -0
  39. {faster_app-0.0.12 → faster_app-0.0.13}/faster_app.egg-info/entry_points.txt +0 -0
  40. {faster_app-0.0.12 → faster_app-0.0.13}/faster_app.egg-info/requires.txt +0 -0
  41. {faster_app-0.0.12 → faster_app-0.0.13}/faster_app.egg-info/top_level.txt +0 -0
  42. {faster_app-0.0.12 → faster_app-0.0.13}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: faster_app
3
- Version: 0.0.12
3
+ Version: 0.0.13
4
4
  Summary: 一个轻量级的 Python Web 框架,提供自动发现、模型基类、命令行工具等功能
5
5
  Author-email: peizhenfei <peizhenfei@hotmail.com>
6
6
  Maintainer-email: peizhenfei <peizhenfei@hotmail.com>
@@ -9,7 +9,7 @@ Faster APP - 一个轻量级的 Python Web 框架
9
9
  - 数据库连接管理 (tortoise_init)
10
10
  """
11
11
 
12
- __version__ = "0.0.12"
12
+ __version__ = "0.0.13"
13
13
  __author__ = "peizhenfei"
14
14
  __email__ = "peizhenfei@hotmail.com"
15
15
 
@@ -0,0 +1,46 @@
1
+ import os
2
+ import shutil
3
+ from faster_app.commands.base import CommandBase
4
+ from rich.console import Console
5
+
6
+ console = Console()
7
+
8
+
9
+ class AppCommand(CommandBase):
10
+ """App Command"""
11
+
12
+ async def env(self):
13
+ """Create .env file"""
14
+ # 拷贝项目根路径下的 .env.example 文件到项目根路径
15
+ try:
16
+ shutil.copy(f"{self.BASE_PATH}/.env.example", ".env")
17
+ console.print("✅ .env created successfully")
18
+ except FileExistsError:
19
+ console.print("✅ .env already exists")
20
+ except Exception as e:
21
+ console.print(f"❌ .env created failed: {e}")
22
+
23
+ async def demo(self):
24
+ """create demo app"""
25
+ # 项目根路径下创建 apps 目录,如果存在则跳过
26
+ try:
27
+ if not os.path.exists("apps"):
28
+ os.makedirs("apps")
29
+ # 拷贝 templates/apps/demo 目录到 apps 目录
30
+ shutil.copytree(f"{self.BASE_PATH}/templates/apps/demo", "apps/demo")
31
+ console.print("✅ apps/demo created successfully")
32
+ except FileExistsError:
33
+ console.print("✅ apps/demo already exists")
34
+ except Exception as e:
35
+ console.print(f"❌ apps/demo created failed: {e}")
36
+
37
+ async def config(self):
38
+ """create config"""
39
+ # 拷贝 templates/config 到 . 目录
40
+ try:
41
+ shutil.copytree(f"{self.BASE_PATH}/templates/config", "./config")
42
+ console.print("✅ config created successfully")
43
+ except FileExistsError:
44
+ console.print("✅ config already exists")
45
+ except Exception as e:
46
+ console.print(f"❌ config created failed: {e}")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: faster_app
3
- Version: 0.0.12
3
+ Version: 0.0.13
4
4
  Summary: 一个轻量级的 Python Web 框架,提供自动发现、模型基类、命令行工具等功能
5
5
  Author-email: peizhenfei <peizhenfei@hotmail.com>
6
6
  Maintainer-email: peizhenfei <peizhenfei@hotmail.com>
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "faster_app"
7
- version = "0.0.12"
7
+ version = "0.0.13"
8
8
  description = "一个轻量级的 Python Web 框架,提供自动发现、模型基类、命令行工具等功能"
9
9
  readme = "README.md"
10
10
  license = "MIT"
@@ -1,29 +0,0 @@
1
- import os
2
- import shutil
3
- from faster_app.commands.base import CommandBase
4
- from rich.console import Console
5
-
6
- console = Console()
7
-
8
-
9
- class AppCommand(CommandBase):
10
- """App Command"""
11
-
12
- async def env(self):
13
- """Create .env file"""
14
- # 拷贝项目根路径下的 .env.example 文件到项目根路径
15
- shutil.copy(f"{self.BASE_PATH}/.env.example", ".env")
16
- console.print("✅ .env created successfully")
17
-
18
- async def demo(self):
19
- """create demo app"""
20
- # 项目根路径下创建 apps 目录,如果存在则跳过
21
- if not os.path.exists("apps"):
22
- os.makedirs("apps")
23
- # 拷贝 templates/apps/demo 目录到 apps 目录
24
- shutil.copytree(f"{self.BASE_PATH}/templates/apps/demo", "apps/demo")
25
-
26
- async def config(self):
27
- """create config"""
28
- # 拷贝 templates/config 到 . 目录
29
- shutil.copytree(f"{self.BASE_PATH}/templates/config", ".")
File without changes
File without changes
File without changes