nextpy-framework 2.2.0__tar.gz → 2.3.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.
- {nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/cli.py +103 -1
- {nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy_framework.egg-info/PKG-INFO +1 -1
- {nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/PKG-INFO +1 -1
- {nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/pyproject.toml +1 -1
- {nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/__init__.py +0 -0
- {nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/auth.py +0 -0
- {nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/builder.py +0 -0
- {nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/components/__init__.py +0 -0
- {nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/components/debug/AutoDebug.py +0 -0
- {nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/components/debug/DebugIcon.py +0 -0
- {nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/components/debug/DebugIconFixed.py +0 -0
- {nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/components/feedback.py +0 -0
- {nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/components/form.py +0 -0
- {nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/components/head.py +0 -0
- {nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/components/hooks_provider.py +0 -0
- {nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/components/image.py +0 -0
- {nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/components/layout.py +0 -0
- {nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/components/link.py +0 -0
- {nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/components/loader.py +0 -0
- {nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/components/navigation.py +0 -0
- {nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/components/toast.py +0 -0
- {nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/components/ui.py +0 -0
- {nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/components/visual.py +0 -0
- {nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/components.py +0 -0
- {nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/config.py +0 -0
- {nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/core/__init__.py +0 -0
- {nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/core/builder.py +0 -0
- {nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/core/component_renderer.py +0 -0
- {nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/core/component_router.py +0 -0
- {nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/core/data_fetching.py +0 -0
- {nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/core/demo_pages_simple.py +0 -0
- {nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/core/demo_router.py +0 -0
- {nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/core/renderer.py +0 -0
- {nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/core/router.py +0 -0
- {nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/core/sync.py +0 -0
- {nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/db.py +0 -0
- {nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/dev_server.py +0 -0
- {nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/dev_tools.py +0 -0
- {nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/errors.py +0 -0
- {nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/hooks.py +0 -0
- {nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/hooks_provider.py +0 -0
- {nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/hooks_provider_new.py +0 -0
- {nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/jsx.py +0 -0
- {nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/jsx_preprocessor.py +0 -0
- {nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/jsx_transformer.py +0 -0
- {nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/main.py +0 -0
- {nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/performance.py +0 -0
- {nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/plugins/__init__.py +0 -0
- {nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/plugins/base.py +0 -0
- {nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/plugins/builtin.py +0 -0
- {nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/plugins/config.py +0 -0
- {nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/plugins.py +0 -0
- {nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/py.typed +0 -0
- {nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/security.py +0 -0
- {nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/server/__init__.py +0 -0
- {nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/server/app.py +0 -0
- {nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/server/debug.py +0 -0
- {nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/server/middleware.py +0 -0
- {nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/true_jsx.py +0 -0
- {nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/utils/__init__.py +0 -0
- {nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/utils/cache.py +0 -0
- {nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/utils/email.py +0 -0
- {nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/utils/file_upload.py +0 -0
- {nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/utils/logging.py +0 -0
- {nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/utils/search.py +0 -0
- {nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/utils/seo.py +0 -0
- {nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/utils/validators.py +0 -0
- {nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/websocket.py +0 -0
- {nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy_framework.egg-info/SOURCES.txt +0 -0
- {nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy_framework.egg-info/dependency_links.txt +0 -0
- {nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy_framework.egg-info/entry_points.txt +0 -0
- {nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy_framework.egg-info/requires.txt +0 -0
- {nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy_framework.egg-info/top_level.txt +0 -0
- {nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/LICENSE +0 -0
- {nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/README.md +0 -0
- {nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/setup.cfg +0 -0
- {nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/tests/test_routing.py +0 -0
|
@@ -430,6 +430,9 @@ def create(name: str):
|
|
|
430
430
|
|
|
431
431
|
except Exception as e:
|
|
432
432
|
click.echo(click.style(f" ❌ Failed to create project: {str(e)}", fg="red"))
|
|
433
|
+
click.echo(click.style(f" 💡 Check the error message above for more details", fg="yellow"))
|
|
434
|
+
# Clean up partial creation
|
|
435
|
+
|
|
433
436
|
# Clean up partial creation
|
|
434
437
|
if project_dir.exists():
|
|
435
438
|
import shutil
|
|
@@ -529,7 +532,7 @@ def version():
|
|
|
529
532
|
click.echo(click.style("\n 📋 NextPy Framework Info", fg="cyan", bold=True))
|
|
530
533
|
click.echo(click.style(" ===================\n", fg="cyan"))
|
|
531
534
|
|
|
532
|
-
click.echo(f" 🏷️ Version: 2.
|
|
535
|
+
click.echo(f" 🏷️ Version: 2.3.1")
|
|
533
536
|
click.echo(f" 🐍 Python: {sys.version.split()[0]}")
|
|
534
537
|
click.echo(f" ⚡ Framework: NextPy")
|
|
535
538
|
click.echo(f" 🎨 Architecture: True JSX")
|
|
@@ -1147,6 +1150,105 @@ pyjwt>=2.8.0
|
|
|
1147
1150
|
markdown>=3.0.0 # Added markdown for documentation rendering
|
|
1148
1151
|
''')
|
|
1149
1152
|
click.echo(" Created: requirements.txt")
|
|
1153
|
+
|
|
1154
|
+
# Create main.py file for ASGI app
|
|
1155
|
+
(project_dir / "main.py").write_text('''"""NextPy ASGI Application Entry Point"""
|
|
1156
|
+
|
|
1157
|
+
from fastapi import FastAPI
|
|
1158
|
+
from nextpy.server.app import NextPyApp
|
|
1159
|
+
from nextpy.core.router import Router
|
|
1160
|
+
from pathlib import Path
|
|
1161
|
+
import os
|
|
1162
|
+
|
|
1163
|
+
# Create NextPy app
|
|
1164
|
+
app = NextPyApp()
|
|
1165
|
+
|
|
1166
|
+
# Configure pages directory
|
|
1167
|
+
pages_dir = Path("pages")
|
|
1168
|
+
if pages_dir.exists():
|
|
1169
|
+
router = Router(pages_dir=pages_dir)
|
|
1170
|
+
app.add_router(router)
|
|
1171
|
+
|
|
1172
|
+
# Add debug icon in development
|
|
1173
|
+
if os.getenv("DEVELOPMENT") or os.getenv("DEBUG") or os.getenv("NEXTPY_DEBUG"):
|
|
1174
|
+
from nextpy.components.debug.AutoDebug import AutoDebug
|
|
1175
|
+
app.add_middleware(AutoDebug)
|
|
1176
|
+
|
|
1177
|
+
# Health check endpoint
|
|
1178
|
+
@app.get("/health")
|
|
1179
|
+
async def health_check():
|
|
1180
|
+
return {"status": "healthy", "framework": "NextPy"}
|
|
1181
|
+
|
|
1182
|
+
# Root endpoint
|
|
1183
|
+
@app.get("/")
|
|
1184
|
+
async def root():
|
|
1185
|
+
return {"message": "NextPy is running!", "docs": "/docs"}
|
|
1186
|
+
|
|
1187
|
+
if __name__ == "__main__":
|
|
1188
|
+
import uvicorn
|
|
1189
|
+
uvicorn.run("main:app", host="0.0.0.0", port=8000, reload=True)
|
|
1190
|
+
''')
|
|
1191
|
+
click.echo(" Created: main.py")
|
|
1192
|
+
|
|
1193
|
+
# Create .env file for development
|
|
1194
|
+
(project_dir / ".env").write_text('''# NextPy Development Environment
|
|
1195
|
+
DEVELOPMENT=true
|
|
1196
|
+
DEBUG=true
|
|
1197
|
+
NEXTPY_DEBUG=true
|
|
1198
|
+
|
|
1199
|
+
# Server Configuration
|
|
1200
|
+
HOST=0.0.0.0
|
|
1201
|
+
PORT=8000
|
|
1202
|
+
|
|
1203
|
+
# Database (if needed)
|
|
1204
|
+
DATABASE_URL=sqlite:///./app.db
|
|
1205
|
+
|
|
1206
|
+
# Secret Key
|
|
1207
|
+
SECRET_KEY=your-secret-key-here
|
|
1208
|
+
|
|
1209
|
+
# NextPy Settings
|
|
1210
|
+
NEXTPY_DEBUG_ICON=true
|
|
1211
|
+
NEXTPY_HOT_RELOAD=true
|
|
1212
|
+
NEXTPY_LOG_LEVEL=info
|
|
1213
|
+
''')
|
|
1214
|
+
click.echo(" Created: .env")
|
|
1215
|
+
|
|
1216
|
+
# Install VS Code extension if available
|
|
1217
|
+
try:
|
|
1218
|
+
import sys
|
|
1219
|
+
import subprocess
|
|
1220
|
+
from pathlib import Path
|
|
1221
|
+
|
|
1222
|
+
# Check if VS Code is available
|
|
1223
|
+
result = subprocess.run([sys.executable, "-c", "import vscode"],
|
|
1224
|
+
capture_output=True, text=True)
|
|
1225
|
+
|
|
1226
|
+
if result.returncode == 0:
|
|
1227
|
+
extension_id = "nextpy.nextpy-vscode"
|
|
1228
|
+
|
|
1229
|
+
# Check if extension is already installed
|
|
1230
|
+
check_cmd = ["code", "--list-extensions", "--show-versions", extension_id]
|
|
1231
|
+
check_result = subprocess.run(check_cmd, capture_output=True, text=True)
|
|
1232
|
+
|
|
1233
|
+
if extension_id not in check_result.stdout:
|
|
1234
|
+
click.echo(click.style(" 🔌 Installing NextPy VS Code extension...", fg="blue"))
|
|
1235
|
+
|
|
1236
|
+
# Try to install from marketplace
|
|
1237
|
+
install_cmd = ["code", "--install-extension", extension_id]
|
|
1238
|
+
install_result = subprocess.run(install_cmd, capture_output=True, text=True)
|
|
1239
|
+
|
|
1240
|
+
if install_result.returncode == 0:
|
|
1241
|
+
click.echo(click.style(" ✅ NextPy VS Code extension installed!", fg="green"))
|
|
1242
|
+
click.echo(click.style(" 📝 Restart VS Code to activate", fg="yellow"))
|
|
1243
|
+
else:
|
|
1244
|
+
click.echo(click.style(" ⚠️ Extension installation failed", fg="yellow"))
|
|
1245
|
+
click.echo(" 💡 Install manually: code --install-extension nextpy.nextpy-vscode")
|
|
1246
|
+
else:
|
|
1247
|
+
click.echo(click.style(" ✅ NextPy VS Code extension already installed", fg="green"))
|
|
1248
|
+
else:
|
|
1249
|
+
click.echo(click.style(" ⚠️ VS Code not available", fg="yellow"))
|
|
1250
|
+
except Exception as e:
|
|
1251
|
+
click.echo(click.style(f" ⚠️ Could not install VS Code extension: {e}", fg="yellow"))
|
|
1150
1252
|
|
|
1151
1253
|
|
|
1152
1254
|
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "nextpy-framework"
|
|
7
|
-
version = "2.
|
|
7
|
+
version = "2.3.1"
|
|
8
8
|
description = "A Python web framework inspired by Next.js with file-based routing, SSR, and SSG and more"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.11"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/components/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/components/feedback.py
RENAMED
|
File without changes
|
{nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/components/form.py
RENAMED
|
File without changes
|
{nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/components/head.py
RENAMED
|
File without changes
|
|
File without changes
|
{nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/components/image.py
RENAMED
|
File without changes
|
{nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/components/layout.py
RENAMED
|
File without changes
|
{nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/components/link.py
RENAMED
|
File without changes
|
{nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/components/loader.py
RENAMED
|
File without changes
|
{nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/components/navigation.py
RENAMED
|
File without changes
|
{nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/components/toast.py
RENAMED
|
File without changes
|
|
File without changes
|
{nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/components/visual.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/core/component_router.py
RENAMED
|
File without changes
|
{nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/core/data_fetching.py
RENAMED
|
File without changes
|
{nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/core/demo_pages_simple.py
RENAMED
|
File without changes
|
{nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/core/demo_router.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/hooks_provider.py
RENAMED
|
File without changes
|
{nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/hooks_provider_new.py
RENAMED
|
File without changes
|
|
File without changes
|
{nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/jsx_preprocessor.py
RENAMED
|
File without changes
|
{nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/jsx_transformer.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/plugins/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/plugins/builtin.py
RENAMED
|
File without changes
|
{nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/plugins/config.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/server/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/server/middleware.py
RENAMED
|
File without changes
|
|
File without changes
|
{nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/utils/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/utils/file_upload.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{nextpy_framework-2.2.0 → nextpy_framework-2.3.1}/.nextpy_framework/nextpy/utils/validators.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|