aipostify 1.0.0__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.

Potentially problematic release.


This version of aipostify might be problematic. Click here for more details.

Files changed (97) hide show
  1. aipostify/__init__.py +22 -0
  2. aipostify/cli.py +165 -0
  3. aipostify-1.0.0.dist-info/METADATA +162 -0
  4. aipostify-1.0.0.dist-info/RECORD +97 -0
  5. aipostify-1.0.0.dist-info/WHEEL +5 -0
  6. aipostify-1.0.0.dist-info/entry_points.txt +4 -0
  7. aipostify-1.0.0.dist-info/licenses/LICENSE +21 -0
  8. aipostify-1.0.0.dist-info/top_level.txt +2 -0
  9. framework/__init__.py +10 -0
  10. framework/apps.py +6 -0
  11. framework/auto_discovery.py +46 -0
  12. framework/console/__init__.py +4 -0
  13. framework/console/artisan.py +213 -0
  14. framework/console/command.py +59 -0
  15. framework/console/commands/cache_clear.py +35 -0
  16. framework/console/commands/config_cache.py +36 -0
  17. framework/console/commands/db_check.py +61 -0
  18. framework/console/commands/db_create.py +36 -0
  19. framework/console/commands/db_seed.py +34 -0
  20. framework/console/commands/db_show.py +52 -0
  21. framework/console/commands/db_transfer.py +37 -0
  22. framework/console/commands/key_generate.py +36 -0
  23. framework/console/commands/make_auth.py +268 -0
  24. framework/console/commands/make_command.py +45 -0
  25. framework/console/commands/make_component.py +39 -0
  26. framework/console/commands/make_controller.py +77 -0
  27. framework/console/commands/make_crud.py +236 -0
  28. framework/console/commands/make_job.py +42 -0
  29. framework/console/commands/make_layout.py +38 -0
  30. framework/console/commands/make_middleware.py +39 -0
  31. framework/console/commands/make_migration.py +32 -0
  32. framework/console/commands/make_model.py +57 -0
  33. framework/console/commands/make_request.py +39 -0
  34. framework/console/commands/make_seeder.py +42 -0
  35. framework/console/commands/make_service.py +39 -0
  36. framework/console/commands/make_view.py +42 -0
  37. framework/console/commands/migrate.py +30 -0
  38. framework/console/commands/migrate_fresh.py +48 -0
  39. framework/console/commands/migrate_refresh.py +19 -0
  40. framework/console/commands/migrate_rollback.py +20 -0
  41. framework/console/commands/migrate_status.py +33 -0
  42. framework/console/commands/ptl_format.py +146 -0
  43. framework/console/commands/ptl_install_vscode.py +106 -0
  44. framework/console/commands/pypi_publish.py +93 -0
  45. framework/console/commands/queue_work.py +38 -0
  46. framework/console/commands/route_list.py +38 -0
  47. framework/console/commands/schedule_run.py +38 -0
  48. framework/console/commands/serve.py +39 -0
  49. framework/console/commands/storage_link.py +41 -0
  50. framework/console/commands/test_command.py +20 -0
  51. framework/console/commands/tinker.py +48 -0
  52. framework/console/commands/view_cache.py +33 -0
  53. framework/console/commands/view_check.py +26 -0
  54. framework/console/commands/view_clear.py +16 -0
  55. framework/database/__init__.py +13 -0
  56. framework/database/connector.py +90 -0
  57. framework/database/fields.py +51 -0
  58. framework/database/model.py +93 -0
  59. framework/database/seeder.py +20 -0
  60. framework/http/__init__.py +17 -0
  61. framework/http/controller.py +39 -0
  62. framework/http/middleware.py +50 -0
  63. framework/http/request.py +61 -0
  64. framework/http/response.py +76 -0
  65. framework/http/validator.py +253 -0
  66. framework/kernel.py +71 -0
  67. framework/queue/__init__.py +3 -0
  68. framework/queue/queue.py +111 -0
  69. framework/routing/__init__.py +4 -0
  70. framework/routing/resolver.py +149 -0
  71. framework/routing/route.py +172 -0
  72. framework/routing/templatetags/__init__.py +1 -0
  73. framework/routing/templatetags/aipostify.py +69 -0
  74. framework/routing/urls.py +45 -0
  75. framework/schedule/__init__.py +3 -0
  76. framework/schedule/schedule.py +101 -0
  77. framework/settings.py +139 -0
  78. framework/stubs/command.stub +8 -0
  79. framework/stubs/component.stub +4 -0
  80. framework/stubs/controller.resource.stub +40 -0
  81. framework/stubs/controller.stub +5 -0
  82. framework/stubs/job.stub +12 -0
  83. framework/stubs/layout.stub +15 -0
  84. framework/stubs/middleware.stub +7 -0
  85. framework/stubs/model.stub +10 -0
  86. framework/stubs/request.stub +12 -0
  87. framework/stubs/seeder.stub +6 -0
  88. framework/stubs/service.stub +5 -0
  89. framework/stubs/view.stub +10 -0
  90. framework/view/__init__.py +28 -0
  91. framework/view/compiler.py +738 -0
  92. framework/view/engine.py +403 -0
  93. framework/view/exceptions.py +35 -0
  94. framework/view/filters.py +145 -0
  95. framework/view/formatter.py +222 -0
  96. framework/view/helpers.py +114 -0
  97. framework/view/sandbox.py +136 -0
aipostify/__init__.py ADDED
@@ -0,0 +1,22 @@
1
+ # -*- coding: utf-8 -*-
2
+ """
3
+ AIPostify
4
+ Laravel-Style Python MVC Framework with PTL (Postify Template Language).
5
+ """
6
+
7
+ __title__ = "aipostify"
8
+ __version__ = "1.0.0"
9
+ __author__ = "AIPostify Contributors"
10
+ __license__ = "MIT"
11
+ __description__ = "Laravel-Style Python MVC Starter Framework with PTL Template Engine"
12
+
13
+ from framework.kernel import bootstrap, get_wsgi_application, get_asgi_application
14
+
15
+ __all__ = [
16
+ "bootstrap",
17
+ "get_wsgi_application",
18
+ "get_asgi_application",
19
+ "__version__",
20
+ "__author__",
21
+ "__license__",
22
+ ]
aipostify/cli.py ADDED
@@ -0,0 +1,165 @@
1
+ # -*- coding: utf-8 -*-
2
+ """
3
+ AIPostify CLI Entry Point
4
+ Provides global 'aipostify' and 'artisan' command-line tools.
5
+ """
6
+
7
+ import sys
8
+ import os
9
+ import shutil
10
+ from pathlib import Path
11
+
12
+
13
+ BANNER = r"""
14
+ ___ ____ ___ __ _ ____
15
+ / | / _/ / _ \___ ___ / /_ (_)/ __/__ __
16
+ / /| | / / / ___/ _ \ (_-< / __// // _/ / / / /
17
+ /_/ |_|_/___//_/ \___//___//_/ /_//_/ \__, /
18
+ /____/
19
+ Laravel-Style Python MVC Framework • v1.0.0
20
+ """
21
+
22
+
23
+ def _find_project_root():
24
+ """Look up directory tree for an artisan file to identify AIPostify project root."""
25
+ current = Path.cwd().resolve()
26
+ while current != current.parent:
27
+ if (current / "artisan").exists() and (current / "framework").exists():
28
+ return current
29
+ current = current.parent
30
+ return None
31
+
32
+
33
+ def _create_new_project(project_name: str):
34
+ """Scaffold a brand new AIPostify project in the specified directory."""
35
+ target_dir = Path.cwd() / project_name
36
+ if target_dir.exists() and any(target_dir.iterdir()):
37
+ print(f"\033[91m[Error]\033[0m Directory [{project_name}] already exists and is not empty.")
38
+ return 1
39
+
40
+ print(f"\033[95m{BANNER}\033[0m")
41
+ print(f"\033[96mCreating a new AIPostify application in:\033[0m {target_dir}\n")
42
+
43
+ # Locate package template / source directory
44
+ pkg_root = Path(__file__).resolve().parent.parent
45
+
46
+ # Folders and files to scaffold into new project
47
+ copy_dirs = [
48
+ "app",
49
+ "config",
50
+ "database",
51
+ "public",
52
+ "resources",
53
+ "routes",
54
+ "storage",
55
+ "tools",
56
+ ]
57
+ copy_files = [
58
+ "artisan",
59
+ ".env.example",
60
+ ".gitignore",
61
+ ".gitattributes",
62
+ "requirements.txt",
63
+ "pytest.ini",
64
+ ]
65
+
66
+ target_dir.mkdir(parents=True, exist_ok=True)
67
+
68
+ # Copy directories
69
+ for d in copy_dirs:
70
+ src = pkg_root / d
71
+ if src.exists():
72
+ shutil.copytree(src, target_dir / d, dirs_exist_ok=True)
73
+ print(f" \033[92m+\033[0m Created directory {d}/")
74
+
75
+ # Copy files
76
+ for f in copy_files:
77
+ src = pkg_root / f
78
+ if src.exists():
79
+ shutil.copy2(src, target_dir / f)
80
+ print(f" \033[92m+\033[0m Created file {f}")
81
+
82
+ # Create .env from .env.example
83
+ env_example = target_dir / ".env.example"
84
+ env_file = target_dir / ".env"
85
+ if env_example.exists() and not env_file.exists():
86
+ shutil.copy2(env_example, env_file)
87
+ print(f" \033[92m+\033[0m Generated .env configuration")
88
+
89
+ # Ensure storage subdirectories exist
90
+ for sub in ["logs", "framework/cache", "framework/sessions", "framework/views"]:
91
+ (target_dir / "storage" / sub).mkdir(parents=True, exist_ok=True)
92
+
93
+ print("\n\033[92m[Success] AIPostify application created successfully!\033[0m")
94
+ print("\n\033[93mNext Steps:\033[0m")
95
+ print(f" cd {project_name}")
96
+ print(" python artisan key:generate")
97
+ print(" python artisan migrate")
98
+ print(" python artisan serve\n")
99
+ return 0
100
+
101
+
102
+ def main():
103
+ """Main CLI handler for 'aipostify' command."""
104
+ args = sys.argv[1:]
105
+
106
+ if not args or args[0] in ["-h", "--help", "help"]:
107
+ print(f"\033[95m{BANNER}\033[0m")
108
+ print("Usage:")
109
+ print(" aipostify new <project_name> Create a new AIPostify project")
110
+ print(" aipostify --version, -v Display AIPostify version")
111
+ print(" aipostify <command> Run artisan command in current project")
112
+ print("\nExamples:")
113
+ print(" aipostify new myapp")
114
+ print(" aipostify serve")
115
+ print(" aipostify route:list")
116
+ return 0
117
+
118
+ if args[0] in ["-v", "--version", "version"]:
119
+ from . import __version__
120
+ print(f"AIPostify Framework v{__version__}")
121
+ return 0
122
+
123
+ if args[0] == "new":
124
+ if len(args) < 2:
125
+ print("\033[91m[Error]\033[0m Please provide a project name:")
126
+ print(" aipostify new <project_name>")
127
+ return 1
128
+ return _create_new_project(args[1])
129
+
130
+ # Check if we are inside an AIPostify project
131
+ project_root = _find_project_root()
132
+ if project_root:
133
+ artisan_path = project_root / "artisan"
134
+ cmd = [sys.executable, str(artisan_path)] + args
135
+ import subprocess
136
+ return subprocess.run(cmd).returncode
137
+ else:
138
+ print(f"\033[91m[Error]\033[0m Could not find an AIPostify project with an 'artisan' file.")
139
+ print("Run \033[96maipostify new <project_name>\033[0m to create a new application.")
140
+ return 1
141
+
142
+
143
+ def artisan_main():
144
+ """Entry point for standalone 'artisan' command."""
145
+ project_root = _find_project_root()
146
+ if not project_root:
147
+ # Fall back to current working directory
148
+ project_root = Path.cwd().resolve()
149
+
150
+ if str(project_root) not in sys.path:
151
+ sys.path.insert(0, str(project_root))
152
+
153
+ try:
154
+ from framework.kernel import bootstrap
155
+ bootstrap(project_root)
156
+ from framework.console import Artisan
157
+ exit_code = Artisan.handle(sys.argv[1:])
158
+ return exit_code or 0
159
+ except Exception as e:
160
+ print(f"\033[91m[Artisan Error]\033[0m {e}")
161
+ return 1
162
+
163
+
164
+ if __name__ == "__main__":
165
+ sys.exit(main())
@@ -0,0 +1,162 @@
1
+ Metadata-Version: 2.4
2
+ Name: aipostify
3
+ Version: 1.0.0
4
+ Summary: Laravel-Style Python MVC Framework with PTL (Postify Template Language)
5
+ Author: AIPostify Contributors
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/aipostify/aipostify
8
+ Project-URL: Documentation, https://github.com/aipostify/aipostify#readme
9
+ Project-URL: Repository, https://github.com/aipostify/aipostify.git
10
+ Project-URL: Issues, https://github.com/aipostify/aipostify/issues
11
+ Keywords: laravel,python,mvc,django,ptl,blade,artisan,template-engine,web-framework
12
+ Classifier: Development Status :: 5 - Production/Stable
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Topic :: Software Development :: Build Tools
15
+ Classifier: Topic :: Internet :: WWW/HTTP
16
+ Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
17
+ Classifier: Topic :: Internet :: WWW/HTTP :: WSGI
18
+ Classifier: Framework :: Django
19
+ Classifier: Programming Language :: Python :: 3
20
+ Classifier: Programming Language :: Python :: 3.10
21
+ Classifier: Programming Language :: Python :: 3.11
22
+ Classifier: Programming Language :: Python :: 3.12
23
+ Classifier: Operating System :: OS Independent
24
+ Classifier: Environment :: Web Environment
25
+ Requires-Python: >=3.10
26
+ Description-Content-Type: text/markdown
27
+ License-File: LICENSE
28
+ Requires-Dist: Django<6.2,>=5.0
29
+ Requires-Dist: PyMySQL>=1.1.0
30
+ Requires-Dist: python-dotenv>=1.0.0
31
+ Requires-Dist: rich>=13.0.0
32
+ Requires-Dist: requests>=2.31.0
33
+ Provides-Extra: dev
34
+ Requires-Dist: pytest>=8.0.0; extra == "dev"
35
+ Requires-Dist: build>=1.0.0; extra == "dev"
36
+ Requires-Dist: twine>=5.0.0; extra == "dev"
37
+ Dynamic: license-file
38
+
39
+ # AIPostify – Laravel-Style Python MVC Framework
40
+
41
+ > Brings the elegant, productive developer experience of **Laravel** (`artisan`, `.env`, `routes/web.py`, Controllers, Models, Migrations, Seeders) to **Python and Django**, powered by **PTL (Postify Template Language)**.
42
+
43
+ ---
44
+
45
+ ## 🚀 Key Features
46
+
47
+ - **PTL (Postify Template Language):** Native `.ptl` view engine with Blade-like `@if`, `@foreach`, `@extends`, `<x-components>`, pipe filters (`| upper`), and auto-escaped security.
48
+ - **Zero Django Boilerplate:** Never edit `settings.py`, `INSTALLED_APPS`, or `urls.py`. Core configuration is completely abstracted.
49
+ - **Artisan CLI Engine:** Run `python artisan make:...`, `python artisan migrate`, `python artisan db:...`, and `python artisan serve`.
50
+ - **Instant SQLite ↔ MySQL Switching:** Switch databases effortlessly by changing `DB_CONNECTION=sqlite` to `DB_CONNECTION=mysql` in `.env`.
51
+ - **Docker-Free & Dependency-Light:** Runs locally on SQLite with zero external services required.
52
+ - **Auto-Discovery Engine:** Automatically scans and connects models in `app/models/`, controllers in `app/http/controllers/`, commands in `app/console/commands/`, and views in `resources/views/`.
53
+ - **Database Queue & Task Scheduler:** Integrated database queue worker (`python artisan queue:work`) and cron task runner (`python artisan schedule:run`).
54
+ - **Automatic VS Code Tooling:** Automatic syntax highlighting, `{ P }` file icon, and snippet setup on first run/clone.
55
+
56
+ ---
57
+
58
+ ## 📁 Directory Structure
59
+
60
+ ```text
61
+ aipostify/
62
+ ├── artisan # CLI entry point (python artisan ...)
63
+ ├── .env # Environment configuration
64
+ ├── .env.example
65
+ ├── .gitattributes # GitHub language syntax detection
66
+ ├── .vscode/ # VS Code settings & extensions
67
+ ├── requirements.txt
68
+ ├── app/ # User Application Code
69
+ │ ├── http/
70
+ │ │ ├── controllers/ # Controller, WelcomeController
71
+ │ │ ├── middleware/ # Custom HTTP Middlewares
72
+ │ │ └── requests/ # Form validation classes
73
+ │ ├── models/ # User model
74
+ │ ├── services/ # Application services
75
+ │ ├── jobs/ # Queueable background jobs
76
+ │ └── console/commands/ # Custom Artisan CLI commands
77
+ ├── config/ # app.py, database.py, queue.py, mail.py
78
+ ├── database/
79
+ │ ├── migrations/ # Database migrations (0001_initial.py)
80
+ │ ├── seeders/ # DatabaseSeeder, UserSeeder
81
+ │ └── database.sqlite # Default SQLite database file
82
+ ├── resources/
83
+ │ ├── views/ # PTL Templates (.ptl)
84
+ │ │ ├── components/ # Reusable <x-component> templates
85
+ │ │ ├── layouts/app.ptl # Base layout template
86
+ │ │ └── welcome.ptl # Welcome landing page
87
+ │ └── lang/ # en.json, gu.json, hi.json
88
+ ├── routes/
89
+ │ ├── web.py # Web routes (Route.get, Route.resource)
90
+ │ ├── api.py # API routes (prefixed with /api)
91
+ │ └── console.py # Scheduled tasks
92
+ ├── public/ # Static assets (css, js)
93
+ ├── storage/ # App logs, sessions, and view cache
94
+ ├── tools/
95
+ │ └── vscode-postify/ # PTL VS Code Extension (Icon + Grammar)
96
+ └── tests/ # Pytest test suite
97
+ ```
98
+
99
+ ---
100
+
101
+ ## ⚡ Quick Start
102
+
103
+ ### 1. Installation
104
+ ```bash
105
+ # Clone the repository
106
+ git clone <repo-url> myapp && cd myapp
107
+
108
+ # Install dependencies
109
+ pip install -r requirements.txt
110
+
111
+ # Setup environment key and database
112
+ cp .env.example .env
113
+ python artisan key:generate
114
+ python artisan migrate
115
+ python artisan db:seed
116
+ ```
117
+
118
+ ### 2. Start Development Server
119
+ ```bash
120
+ python artisan serve
121
+ ```
122
+ Open [http://127.0.0.1:8000](http://127.0.0.1:8000) in your browser.
123
+
124
+ ---
125
+
126
+ ## 🛠️ Artisan CLI Commands
127
+
128
+ | Command | Description |
129
+ |---|---|
130
+ | `python artisan list` | Display all available commands |
131
+ | `python artisan serve [--host --port]` | Start development server with live reload |
132
+ | `python artisan route:list` | Show all registered routes in a formatted table |
133
+ | `python artisan make:view <name>` | Generate new `.ptl` template view |
134
+ | `python artisan make:component <name>`| Generate new `.ptl` component |
135
+ | `python artisan make:layout <name>` | Generate new `.ptl` layout |
136
+ | `python artisan view:cache` | Compile and cache all PTL templates |
137
+ | `python artisan view:clear` | Clear compiled template cache |
138
+ | `python artisan view:check` | Validate syntax of all PTL templates |
139
+ | `python artisan ptl:install-vscode` | Install PTL VS Code extension (Icon + Grammar) |
140
+ | `python artisan make:model <Model>` | Create new Eloquent-style model |
141
+ | `python artisan make:controller <Name>`| Create standard or resource controller |
142
+ | `python artisan make:crud <Model>` | Scaffold full CRUD resource in 1 command |
143
+ | `python artisan make:migration <name>` | Generate database migration |
144
+ | `python artisan make:auth` | Scaffold complete authentication system |
145
+ | `python artisan migrate` | Run pending database migrations |
146
+ | `python artisan migrate:fresh [--seed]` | Drop all tables and re-run all migrations |
147
+ | `python artisan db:check` | Diagnose database connection and health |
148
+ | `python artisan db:seed` | Run seeders |
149
+ | `python artisan queue:work` | Start background queue worker daemon |
150
+ | `python artisan schedule:run` | Execute scheduled cron tasks |
151
+ | `python artisan tinker` | Interactive Python REPL with models preloaded |
152
+ | `python artisan test` | Run pytest test suite |
153
+
154
+ ---
155
+
156
+ ## 🧪 Running Tests
157
+
158
+ ```bash
159
+ python artisan test
160
+ # or
161
+ pytest
162
+ ```
@@ -0,0 +1,97 @@
1
+ aipostify/__init__.py,sha256=TBsarX-2sDUDo8-cKeJUFwHFJZFywJq-OhvLOGmpGqg,536
2
+ aipostify/cli.py,sha256=fyN85hGc9XMmw6iuM9alh0d6SdZQsqPFCSMkzYom9lE,5290
3
+ aipostify-1.0.0.dist-info/licenses/LICENSE,sha256=88_LgVHeXZ6_lxRvemRIOm5DOppwY63M9RYwZfcMwuk,1079
4
+ framework/__init__.py,sha256=2o0tFmiTJqGmDui7HjDjj93DUb-3g4FoEjO1MDQG0Vw,303
5
+ framework/apps.py,sha256=JiaztG-O-fYhbRjdehJLs4x97FGAlkxigQX87cQcviI,190
6
+ framework/auto_discovery.py,sha256=UQeQI27cW2UgkFlFKmejO11I1gDIdg5vzDZoiUGRmuM,1519
7
+ framework/kernel.py,sha256=w7kAArk1HxjoYUDCBqDCLVuLNRhFB8SLsgew8XIYg54,2146
8
+ framework/settings.py,sha256=DShu58nHiwF-FziXhoYWKqt7BlGR9cJRJ2_Wlb9VlbY,4492
9
+ framework/console/__init__.py,sha256=Hz3xX1LWq3rnSsdxihXtJ0cB09Zljc1DA7korf28cjI,92
10
+ framework/console/artisan.py,sha256=r8oHLGvB3qte-4FrbGiwM5OPJd5tYk1pr5FuEScA40U,7677
11
+ framework/console/command.py,sha256=LyjSaIpW7Cisud7wo47vSGafkzI41XbYJC7xHQZdcYI,1817
12
+ framework/console/commands/cache_clear.py,sha256=R-IAoc8x-599Bc_W40xLT-NDCrCbjfAPSKOrN2AbocM,1133
13
+ framework/console/commands/config_cache.py,sha256=PwfOOvjdmhnTyM3r0-uEZ5BPJUjoe12RSYDONrCglLI,1259
14
+ framework/console/commands/db_check.py,sha256=-u1BVQ6PEj0NlDoG6pb2cVdcbvv0AcAL7emC5oGSj2c,2686
15
+ framework/console/commands/db_create.py,sha256=DucNjxZzPjrj1BPwQ3kTuSkXw1yfJVLW3oeXoUYPc3Y,1391
16
+ framework/console/commands/db_seed.py,sha256=TZF42eskd1Fy5YUqmv-x6DgcQKh8Oyi1p-d2v9Nwmf0,1104
17
+ framework/console/commands/db_show.py,sha256=L4UMxayD27UtRv0lfFDGFoCvzOTzClUPkGpWI5rQSZA,1781
18
+ framework/console/commands/db_transfer.py,sha256=A_qi3MKP2PTUORVFF3i-ug-zQqc0ukMjPc73HnPcJZ8,1472
19
+ framework/console/commands/key_generate.py,sha256=r98UEe6l7CTHxcdsHGLV7b3oAK8y304eiC6QbzANw5s,1160
20
+ framework/console/commands/make_auth.py,sha256=TH2Le7bOJnm2IRZBVk0gnf8O82sYyL4NWuTYJ4fC3k8,12317
21
+ framework/console/commands/make_command.py,sha256=eheynI5pWTp_ZBQjL8MNxl5hXARoIzuKdaN7L7ab4W0,1687
22
+ framework/console/commands/make_component.py,sha256=ObA9pSgtYSPxUBKqbTz-ZOYBHibTc9uu6MWguEdpGas,1468
23
+ framework/console/commands/make_controller.py,sha256=1S2LjG9SQAljGBUErvWOoKa0DYwQqvOl-mQSK7mWCUM,3212
24
+ framework/console/commands/make_crud.py,sha256=PVGOShPI8aF5E_Vg2T3yn9nuMwjltbZNPMwEBfJegT4,10768
25
+ framework/console/commands/make_job.py,sha256=yX6tIadsHa9Yegel5Pe_WK3Gt8r84N8LR-IlJKsb-MY,1395
26
+ framework/console/commands/make_layout.py,sha256=r9xaQZFlxpu2tanVKTjTRmZvAn7wLutRLWpv2LsNoAc,1406
27
+ framework/console/commands/make_middleware.py,sha256=opFbx8g8FHYl-F22rREX3yzc20TaCWDlFakJon1xSZ0,1386
28
+ framework/console/commands/make_migration.py,sha256=AQG-CDr_1MD_VyP4ogvgnjJBWe5xJE-yQKuf7U7sbdk,1076
29
+ framework/console/commands/make_model.py,sha256=KtjvTSHIxq3_ou66Jk5MKaph9rmc_4HKpbcr3YYcJuk,2190
30
+ framework/console/commands/make_request.py,sha256=wCaTdw2kA4zt8AV5WY3aAiUCcgDNugRrzlE5-32LGwA,1381
31
+ framework/console/commands/make_seeder.py,sha256=iIUBCf-WUREc-VRaC-YO_SXbCrmgrWej34MtxkBWVdw,1424
32
+ framework/console/commands/make_service.py,sha256=tZLNQ9FGTRUwvOMZU48GGv3jw2bgqzJwVD7Wd9YH5Vc,1349
33
+ framework/console/commands/make_view.py,sha256=tw4-RScYVM_BzZwTJJdwoR78v5AzguVSaHUzs93w0aU,1576
34
+ framework/console/commands/migrate.py,sha256=cUD4qXoipyxn8zC_79qcRPGS_00rnlYIyqH67fgKBLg,928
35
+ framework/console/commands/migrate_fresh.py,sha256=ZixGWX-7rZ7gFrZTKG2rk1iA5QFkBff4WqEVzZ990cU,1908
36
+ framework/console/commands/migrate_refresh.py,sha256=-yiGgoTT12zf_JijsbGCPYrZ64nXu4CSs9_hQhyB5o8,558
37
+ framework/console/commands/migrate_rollback.py,sha256=XPB5rn1GmAh-muiAim6SMISXaLBUaBQ-B09toa7VZis,612
38
+ framework/console/commands/migrate_status.py,sha256=HDiRcDJH2p16eAGnbfyfvyj7Ry04Pze4IYm33eDnKZI,1161
39
+ framework/console/commands/ptl_format.py,sha256=UB1FhhCKSCGkd4wAG46nzerxavqgHfHWU-yv7KK8Jic,5785
40
+ framework/console/commands/ptl_install_vscode.py,sha256=e_OfnusDwDJAa4ZYUATqs1taOGLmxNEbI6nI-o2VpFI,5071
41
+ framework/console/commands/pypi_publish.py,sha256=q1-QZxffoVbAPEbIXeh2fpEINfR0jL7xLsV4vl3DTa4,3455
42
+ framework/console/commands/queue_work.py,sha256=vBgfoW7seOK2Kg5i2RJ3ZUAPHXlB3dlF0dyeR_mWz3w,1285
43
+ framework/console/commands/route_list.py,sha256=eSluQr-xTbl7xa7JxTMmPev4bDLgR-e2Sg22F1C7ubM,1148
44
+ framework/console/commands/schedule_run.py,sha256=JlyIlFr01XxqgP1xmoJWg4Rd9_LsffW75uoCXKqgO0U,1323
45
+ framework/console/commands/serve.py,sha256=7uW9B8e63oobxTvoD5OHhoQw3aCYKLMTybjsLipueGc,1510
46
+ framework/console/commands/storage_link.py,sha256=KS6L1CIQxTIfvrfxNnV01N7hwnuouhU6iyNUXKl2YWY,1614
47
+ framework/console/commands/test_command.py,sha256=9mX6y4Bl6jMZlfxrtEuYtL-N5T7uK9MXRfAgcZiVZ4E,508
48
+ framework/console/commands/tinker.py,sha256=lpLTF7Vi3IA0IYV3FlkjFkcHqqTdQhOia_no1MPKhCk,1539
49
+ framework/console/commands/view_cache.py,sha256=HGWjZEqmcbJR2aNTdQEw3VSo-dFWIb5KhgjaUwe1ndk,1019
50
+ framework/console/commands/view_check.py,sha256=4siXCET2bEUtj53mVgfiURCrLe10hQR0l76G7Ff4uSY,816
51
+ framework/console/commands/view_clear.py,sha256=mM60czCcCGrb9PzxXLdMoeOna4eRrD_lwoWeN-vY8Wg,448
52
+ framework/database/__init__.py,sha256=u3M524qKx26fGCr41rROLABazCAf2BgIR1qUgbVqqCE,378
53
+ framework/database/connector.py,sha256=e90XHlTtWUQJCEzuAZ9r6q84Jk_y8t9h4SJ0hV0_uHk,3077
54
+ framework/database/fields.py,sha256=g8dfgNACpwf8iG4VDnm2HjHSmc_9ScgQ9KlCpAtf_zY,1981
55
+ framework/database/model.py,sha256=OpF7XliTbCrZsd6zXSK3jl3s3BUWLRTAv82OWuU-k5U,3093
56
+ framework/database/seeder.py,sha256=MAbF4RxwSVAbYT5mD9HTYyvJNGR9Jesg4Frkqh6xGSA,564
57
+ framework/http/__init__.py,sha256=aCQixyoHWhafZTf21bRV_3mi4yZtTQrKBl4NbuncgmU,400
58
+ framework/http/controller.py,sha256=Iyb_ygmpAv2CIqe_hTaNcx1tKl-Glb5Y45zHZqijjO0,1513
59
+ framework/http/middleware.py,sha256=D4qpktKkc23u_wCH9Nb2GZGRfGu-ilXyf6GeA6bituw,2220
60
+ framework/http/request.py,sha256=qypkptE5QKF-y_eNpQ9-GdV56Q2k4OUCV3AHesfuvxs,1986
61
+ framework/http/response.py,sha256=XBmtvIky2lrTxcSits8kjzuSM2ZhEXx9CTla1WvxuRg,2935
62
+ framework/http/validator.py,sha256=GXIgePs9Inoc5zZYf45AplS-EfovPvADWVhmW22H-Us,11672
63
+ framework/queue/__init__.py,sha256=LPm6KowMFzTjAq-rFrMaAQ2ptR4ojUvDxWnLHqo54UE,80
64
+ framework/queue/queue.py,sha256=pGMVkhJPuBzIbFbP4pwwsHvfjn8QfB9g2GBL_1IO8j0,4016
65
+ framework/routing/__init__.py,sha256=7DjnyFzi33Y2sufoqtqY31u--L4ztEVmJeP10ikulAY,127
66
+ framework/routing/resolver.py,sha256=_edZOBQVMACXMdLk3Dy9F8IPD3yXNFtoKN8Bkk5X9ls,5704
67
+ framework/routing/route.py,sha256=vuvXir-TiqJkR18KKsjMcKQaCTj5wGaXD8kzq-e5tDk,6805
68
+ framework/routing/urls.py,sha256=VUjJB5gAeBzr2DESFMxixK6r0tVS7hxY41_csON4B2I,1557
69
+ framework/routing/templatetags/__init__.py,sha256=86OnBGIrD96F6ijYl2VHhV_e2AAWVT2ny3L2vut1Bmg,26
70
+ framework/routing/templatetags/aipostify.py,sha256=uESleRYGYl4eKW4g0MbNZxLdDO0fhhfwI-Fy0zbnqTw,2286
71
+ framework/schedule/__init__.py,sha256=xLRykK49jUDCwMEv9ZAEwGMXYBGWjtS0tHP7Xa4WGBw,89
72
+ framework/schedule/schedule.py,sha256=thzuOMoBrLWjOZbIWO7_AhDNALJX4d3iKu6MrdDDUcA,3055
73
+ framework/stubs/command.stub,sha256=yZjNkSmBHZjZpJ2NCabjwEvUyy3slohziFi0uQzw9ck,238
74
+ framework/stubs/component.stub,sha256=IGRZkFFY3zqG2wIuji0bG7kt5ZVhS97a1vEGVY-ANSM,77
75
+ framework/stubs/controller.resource.stub,sha256=Fbjgu_z3ZOCuoMl4jh6H24SUCtYqOtm1Krt4XlUNomU,1641
76
+ framework/stubs/controller.stub,sha256=oXBajXoT3cpnkd-GuGIlludoxniFiHimsj7YxdCEFUY,155
77
+ framework/stubs/job.stub,sha256=3pCL2H4mh1llvgrKPts3K4Weyt9CUgJAUX9I8Pd9DaE,225
78
+ framework/stubs/layout.stub,sha256=qI7SRMJpY00Ph_1DCLjNXntJCkpQtiFD_pLtXhVF2hs,329
79
+ framework/stubs/middleware.stub,sha256=rvdx9bRhjpEpcSPJrIM8NkhKfPRTbGQ8gz5XqzfvxkE,222
80
+ framework/stubs/model.stub,sha256=qaMOnuH10pprY5e990Iyw2AgCvOX8lhkpgxHd78s7So,309
81
+ framework/stubs/request.stub,sha256=thwGz7qNuOJQusTIuQ10DSMqaoXsWguA1BT5Wt8JDR8,298
82
+ framework/stubs/seeder.stub,sha256=FpSM7W_M_ZRLHNJCVZlTom6yQ3KWzGXwou1tuY_peY0,174
83
+ framework/stubs/service.stub,sha256=y69QHtKnF84jztvqKyK4lz5gDCS5t9f8_bOugo9adBE,124
84
+ framework/stubs/view.stub,sha256=-ZVwaaLe7CHtAvURDFOuV2lVhPx7eQhGc31FqshZYm0,255
85
+ framework/view/__init__.py,sha256=lAeC6UU1OZCZrY6s-1u3e1j1JGe-f5f_c2DkUrJjSkI,782
86
+ framework/view/compiler.py,sha256=uv2ikhpB6il_o9tDe8vq55-ZjL4FVGs08NSq3w8DVO0,33525
87
+ framework/view/engine.py,sha256=n6faCuncKgg-k2Ps1A6rN7kC5opSi-LTAq83GdsDE3s,15168
88
+ framework/view/exceptions.py,sha256=w2J6L-A-PXbbOTkr-YKgGli6Ya1P3xgmwGtx8oM_0i8,1036
89
+ framework/view/filters.py,sha256=ZL-NxnZXRNBY7EhxhIyAEEq-T-GAbW6pum7tbGY2BwY,3839
90
+ framework/view/formatter.py,sha256=kFmGsQrE31vypfOxomm-YlooKWXIFQOqQfoW9bCrvCY,7024
91
+ framework/view/helpers.py,sha256=2gQ9ntooDwhH_E-tGxNpUKrWJ3yEZjlCejT_9sx70EY,3568
92
+ framework/view/sandbox.py,sha256=9Cdz5BuF9KA6tD1whkEHiU54vK0sKMP24g6NTBbkFhs,4289
93
+ aipostify-1.0.0.dist-info/METADATA,sha256=IhOAemCLFpS5RuCnfaLy896T-11aeIhaieusWO8i9ss,7761
94
+ aipostify-1.0.0.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
95
+ aipostify-1.0.0.dist-info/entry_points.txt,sha256=jxUwX9NiakBUpR2uPVnTU-RiuJiU4Qe529vyPCUYazE,115
96
+ aipostify-1.0.0.dist-info/top_level.txt,sha256=1G2sy30wLKjE7BeenJPXaxCktFFMak4Ht5AF08Gva20,20
97
+ aipostify-1.0.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (84.2.1)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,4 @@
1
+ [console_scripts]
2
+ aipostify = aipostify.cli:main
3
+ artisan = aipostify.cli:artisan_main
4
+ postify = aipostify.cli:main
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 AIPostify Contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,2 @@
1
+ aipostify
2
+ framework
framework/__init__.py ADDED
@@ -0,0 +1,10 @@
1
+ # -*- coding: utf-8 -*-
2
+ """
3
+ AIPostify Framework Core
4
+ Laravel-Style Python MVC Framework with PTL Template Engine.
5
+ """
6
+
7
+ from .kernel import bootstrap, get_wsgi_application, get_asgi_application
8
+
9
+ __version__ = "1.0.0"
10
+ __all__ = ["bootstrap", "get_wsgi_application", "get_asgi_application", "__version__"]
framework/apps.py ADDED
@@ -0,0 +1,6 @@
1
+ from django.apps import AppConfig
2
+
3
+ class FrameworkConfig(AppConfig):
4
+ default_auto_field = "django.db.models.BigAutoField"
5
+ name = "framework"
6
+ verbose_name = "AIPostify Framework"
@@ -0,0 +1,46 @@
1
+ """
2
+ AIPostify Auto-Discovery Engine
3
+ Discovers Models, Controllers, Commands, Seeders, and Middleware without manual registration
4
+ """
5
+
6
+ import os
7
+ import sys
8
+ import importlib
9
+ import pkgutil
10
+ from pathlib import Path
11
+
12
+ def discover_models(base_dir: Path):
13
+ """Import all model modules in app/models to register them with Django ORM."""
14
+ models_dir = base_dir / "app" / "models"
15
+ if not models_dir.exists():
16
+ return
17
+
18
+ for _, module_name, _ in pkgutil.iter_modules([str(models_dir)]):
19
+ if module_name.startswith("__"):
20
+ continue
21
+ try:
22
+ importlib.import_module(f"app.models.{module_name}")
23
+ except Exception as e:
24
+ # Silently catch or log during initial discovery
25
+ pass
26
+
27
+ def discover_commands(base_dir: Path) -> dict:
28
+ """Discover user custom commands in app/console/commands."""
29
+ commands_dir = base_dir / "app" / "console" / "commands"
30
+ commands = {}
31
+ if not commands_dir.exists():
32
+ return commands
33
+
34
+ for _, module_name, _ in pkgutil.iter_modules([str(commands_dir)]):
35
+ if module_name.startswith("__"):
36
+ continue
37
+ try:
38
+ mod = importlib.import_module(f"app.console.commands.{module_name}")
39
+ for attr_name in dir(mod):
40
+ attr = getattr(mod, attr_name)
41
+ if isinstance(attr, type) and hasattr(attr, "signature") and attr.signature:
42
+ commands[attr.signature] = attr
43
+ except Exception:
44
+ pass
45
+
46
+ return commands
@@ -0,0 +1,4 @@
1
+ from .artisan import Artisan
2
+ from .command import Command
3
+
4
+ __all__ = ["Artisan", "Command"]