nextpy-framework 1.1.0__tar.gz → 2.0.0__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.0.0/.nextpy_framework/nextpy/__init__.py +120 -0
- nextpy_framework-2.0.0/.nextpy_framework/nextpy/cli.py +1079 -0
- nextpy_framework-2.0.0/.nextpy_framework/nextpy/components/__init__.py +74 -0
- nextpy_framework-2.0.0/.nextpy_framework/nextpy/components/form.py +468 -0
- nextpy_framework-2.0.0/.nextpy_framework/nextpy/components/layout.py +289 -0
- nextpy_framework-2.0.0/.nextpy_framework/nextpy/components/navigation.py +394 -0
- nextpy_framework-2.0.0/.nextpy_framework/nextpy/components/ui.py +465 -0
- nextpy_framework-2.0.0/.nextpy_framework/nextpy/components.py +289 -0
- nextpy_framework-2.0.0/.nextpy_framework/nextpy/core/component_renderer.py +213 -0
- nextpy_framework-2.0.0/.nextpy_framework/nextpy/core/component_router.py +294 -0
- nextpy_framework-2.0.0/.nextpy_framework/nextpy/core/demo_pages_simple.py +696 -0
- nextpy_framework-2.0.0/.nextpy_framework/nextpy/core/demo_router.py +57 -0
- {nextpy_framework-1.1.0 → nextpy_framework-2.0.0}/.nextpy_framework/nextpy/core/router.py +26 -0
- nextpy_framework-2.0.0/.nextpy_framework/nextpy/hooks.py +470 -0
- nextpy_framework-2.0.0/.nextpy_framework/nextpy/hooks_provider.py +113 -0
- nextpy_framework-2.0.0/.nextpy_framework/nextpy/jsx.py +188 -0
- nextpy_framework-2.0.0/.nextpy_framework/nextpy/jsx_preprocessor.py +123 -0
- nextpy_framework-2.0.0/.nextpy_framework/nextpy/jsx_transformer.py +86 -0
- nextpy_framework-2.0.0/.nextpy_framework/nextpy/security.py +259 -0
- {nextpy_framework-1.1.0 → nextpy_framework-2.0.0}/.nextpy_framework/nextpy/server/app.py +64 -0
- nextpy_framework-2.0.0/.nextpy_framework/nextpy/true_jsx.py +234 -0
- nextpy_framework-2.0.0/.nextpy_framework/nextpy/utils/__init__.py +0 -0
- nextpy_framework-2.0.0/.nextpy_framework/nextpy_framework.egg-info/PKG-INFO +999 -0
- {nextpy_framework-1.1.0 → nextpy_framework-2.0.0}/.nextpy_framework/nextpy_framework.egg-info/SOURCES.txt +14 -0
- {nextpy_framework-1.1.0 → nextpy_framework-2.0.0}/.nextpy_framework/nextpy_framework.egg-info/requires.txt +2 -0
- nextpy_framework-2.0.0/PKG-INFO +999 -0
- nextpy_framework-2.0.0/README.md +958 -0
- {nextpy_framework-1.1.0 → nextpy_framework-2.0.0}/pyproject.toml +6 -2
- nextpy_framework-1.1.0/.nextpy_framework/nextpy/__init__.py +0 -52
- nextpy_framework-1.1.0/.nextpy_framework/nextpy/cli.py +0 -595
- nextpy_framework-1.1.0/.nextpy_framework/nextpy/components/__init__.py +0 -45
- nextpy_framework-1.1.0/.nextpy_framework/nextpy/components/form.py +0 -346
- nextpy_framework-1.1.0/.nextpy_framework/nextpy/components/layout.py +0 -206
- nextpy_framework-1.1.0/.nextpy_framework/nextpy/hooks.py +0 -348
- nextpy_framework-1.1.0/.nextpy_framework/nextpy_framework.egg-info/PKG-INFO +0 -343
- nextpy_framework-1.1.0/PKG-INFO +0 -343
- nextpy_framework-1.1.0/README.md +0 -304
- {nextpy_framework-1.1.0 → nextpy_framework-2.0.0}/.nextpy_framework/nextpy/auth.py +0 -0
- {nextpy_framework-1.1.0 → nextpy_framework-2.0.0}/.nextpy_framework/nextpy/builder.py +0 -0
- {nextpy_framework-1.1.0 → nextpy_framework-2.0.0}/.nextpy_framework/nextpy/components/feedback.py +0 -0
- {nextpy_framework-1.1.0 → nextpy_framework-2.0.0}/.nextpy_framework/nextpy/components/head.py +0 -0
- {nextpy_framework-1.1.0 → nextpy_framework-2.0.0}/.nextpy_framework/nextpy/components/hooks_provider.py +0 -0
- {nextpy_framework-1.1.0 → nextpy_framework-2.0.0}/.nextpy_framework/nextpy/components/image.py +0 -0
- {nextpy_framework-1.1.0 → nextpy_framework-2.0.0}/.nextpy_framework/nextpy/components/link.py +0 -0
- {nextpy_framework-1.1.0 → nextpy_framework-2.0.0}/.nextpy_framework/nextpy/components/loader.py +0 -0
- {nextpy_framework-1.1.0 → nextpy_framework-2.0.0}/.nextpy_framework/nextpy/components/toast.py +0 -0
- {nextpy_framework-1.1.0 → nextpy_framework-2.0.0}/.nextpy_framework/nextpy/components/visual.py +0 -0
- {nextpy_framework-1.1.0 → nextpy_framework-2.0.0}/.nextpy_framework/nextpy/config.py +0 -0
- {nextpy_framework-1.1.0 → nextpy_framework-2.0.0}/.nextpy_framework/nextpy/core/__init__.py +0 -0
- {nextpy_framework-1.1.0 → nextpy_framework-2.0.0}/.nextpy_framework/nextpy/core/builder.py +0 -0
- {nextpy_framework-1.1.0 → nextpy_framework-2.0.0}/.nextpy_framework/nextpy/core/data_fetching.py +0 -0
- {nextpy_framework-1.1.0 → nextpy_framework-2.0.0}/.nextpy_framework/nextpy/core/renderer.py +0 -0
- {nextpy_framework-1.1.0 → nextpy_framework-2.0.0}/.nextpy_framework/nextpy/core/sync.py +0 -0
- {nextpy_framework-1.1.0 → nextpy_framework-2.0.0}/.nextpy_framework/nextpy/db.py +0 -0
- {nextpy_framework-1.1.0 → nextpy_framework-2.0.0}/.nextpy_framework/nextpy/dev_server.py +0 -0
- {nextpy_framework-1.1.0 → nextpy_framework-2.0.0}/.nextpy_framework/nextpy/dev_tools.py +0 -0
- {nextpy_framework-1.1.0 → nextpy_framework-2.0.0}/.nextpy_framework/nextpy/errors.py +0 -0
- /nextpy_framework-1.1.0/.nextpy_framework/nextpy/py.typed → /nextpy_framework-2.0.0/.nextpy_framework/nextpy/hooks_provider_new.py +0 -0
- {nextpy_framework-1.1.0 → nextpy_framework-2.0.0}/.nextpy_framework/nextpy/performance.py +0 -0
- {nextpy_framework-1.1.0 → nextpy_framework-2.0.0}/.nextpy_framework/nextpy/plugins.py +0 -0
- /nextpy_framework-1.1.0/.nextpy_framework/nextpy/utils/__init__.py → /nextpy_framework-2.0.0/.nextpy_framework/nextpy/py.typed +0 -0
- {nextpy_framework-1.1.0 → nextpy_framework-2.0.0}/.nextpy_framework/nextpy/server/__init__.py +0 -0
- {nextpy_framework-1.1.0 → nextpy_framework-2.0.0}/.nextpy_framework/nextpy/server/debug.py +0 -0
- {nextpy_framework-1.1.0 → nextpy_framework-2.0.0}/.nextpy_framework/nextpy/server/middleware.py +0 -0
- {nextpy_framework-1.1.0 → nextpy_framework-2.0.0}/.nextpy_framework/nextpy/utils/cache.py +0 -0
- {nextpy_framework-1.1.0 → nextpy_framework-2.0.0}/.nextpy_framework/nextpy/utils/email.py +0 -0
- {nextpy_framework-1.1.0 → nextpy_framework-2.0.0}/.nextpy_framework/nextpy/utils/file_upload.py +0 -0
- {nextpy_framework-1.1.0 → nextpy_framework-2.0.0}/.nextpy_framework/nextpy/utils/logging.py +0 -0
- {nextpy_framework-1.1.0 → nextpy_framework-2.0.0}/.nextpy_framework/nextpy/utils/search.py +0 -0
- {nextpy_framework-1.1.0 → nextpy_framework-2.0.0}/.nextpy_framework/nextpy/utils/seo.py +0 -0
- {nextpy_framework-1.1.0 → nextpy_framework-2.0.0}/.nextpy_framework/nextpy/utils/validators.py +0 -0
- {nextpy_framework-1.1.0 → nextpy_framework-2.0.0}/.nextpy_framework/nextpy/websocket.py +0 -0
- {nextpy_framework-1.1.0 → nextpy_framework-2.0.0}/.nextpy_framework/nextpy_framework.egg-info/dependency_links.txt +0 -0
- {nextpy_framework-1.1.0 → nextpy_framework-2.0.0}/.nextpy_framework/nextpy_framework.egg-info/entry_points.txt +0 -0
- {nextpy_framework-1.1.0 → nextpy_framework-2.0.0}/.nextpy_framework/nextpy_framework.egg-info/top_level.txt +0 -0
- {nextpy_framework-1.1.0 → nextpy_framework-2.0.0}/LICENSE +0 -0
- {nextpy_framework-1.1.0 → nextpy_framework-2.0.0}/setup.cfg +0 -0
- {nextpy_framework-1.1.0 → nextpy_framework-2.0.0}/tests/test_routing.py +0 -0
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
"""
|
|
2
|
+
NextPy - A Python web framework inspired by Next.js
|
|
3
|
+
File-based routing, SSR, SSG, and more with FastAPI + Jinja2
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
__version__ = "1.0.1"
|
|
7
|
+
|
|
8
|
+
from nextpy.core.router import Router, Route, DynamicRoute
|
|
9
|
+
from nextpy.core.renderer import Renderer
|
|
10
|
+
from nextpy.core.data_fetching import (
|
|
11
|
+
get_server_side_props,
|
|
12
|
+
get_static_props,
|
|
13
|
+
get_static_paths,
|
|
14
|
+
)
|
|
15
|
+
from nextpy.components.head import Head
|
|
16
|
+
from nextpy.components.link import Link
|
|
17
|
+
from nextpy.server.app import create_app
|
|
18
|
+
from nextpy.hooks import (
|
|
19
|
+
useState,
|
|
20
|
+
useEffect,
|
|
21
|
+
useContext,
|
|
22
|
+
useReducer,
|
|
23
|
+
useCallback,
|
|
24
|
+
useMemo,
|
|
25
|
+
useRef,
|
|
26
|
+
useCounter,
|
|
27
|
+
useToggle,
|
|
28
|
+
useLocalStorage,
|
|
29
|
+
useFetch,
|
|
30
|
+
useDebounce,
|
|
31
|
+
createContext,
|
|
32
|
+
Provider,
|
|
33
|
+
)
|
|
34
|
+
from nextpy.security import (
|
|
35
|
+
security_manager,
|
|
36
|
+
sanitize_input,
|
|
37
|
+
safe_html,
|
|
38
|
+
validate_and_sanitize_props,
|
|
39
|
+
)
|
|
40
|
+
from nextpy.hooks_provider import with_hooks
|
|
41
|
+
from nextpy.components import (
|
|
42
|
+
Button, Card, Input, TextArea, Select, Checkbox, Radio, RadioGroup, Form, FormGroup, FileInput,
|
|
43
|
+
NumberInput, DateInput, TimeInput, PasswordInput, RangeInput, ColorInput, SubmitButton,
|
|
44
|
+
Container, Grid, Flex, Stack, Sidebar, MainContent, Section, Article,
|
|
45
|
+
Header, Footer, Navigation, Center, Spacer, Divider, AspectRatio,
|
|
46
|
+
Badge, Avatar, Icon, Alert, Progress, Skeleton, Tooltip, Chip,
|
|
47
|
+
Breadcrumb, Table, Code, Blockquote,
|
|
48
|
+
Navbar, Menu, Dropdown, Tabs, Pagination,
|
|
49
|
+
SearchBar, BreadcrumbNav
|
|
50
|
+
)
|
|
51
|
+
from nextpy.jsx import (
|
|
52
|
+
div, h1, h2, h3, h4, h5, h6,
|
|
53
|
+
p, span, a, img,
|
|
54
|
+
ul, ol, li,
|
|
55
|
+
form, input, button, textarea, select, option,
|
|
56
|
+
table, thead, tbody, tr, th, td,
|
|
57
|
+
header, footer, main, section, article, nav, aside,
|
|
58
|
+
strong, em, i, b,
|
|
59
|
+
hr, br,
|
|
60
|
+
style, script, meta, link, title,
|
|
61
|
+
jsx
|
|
62
|
+
)
|
|
63
|
+
|
|
64
|
+
__all__ = [
|
|
65
|
+
"Router",
|
|
66
|
+
"Route",
|
|
67
|
+
"DynamicRoute",
|
|
68
|
+
"Renderer",
|
|
69
|
+
"get_server_side_props",
|
|
70
|
+
"get_static_props",
|
|
71
|
+
"get_static_paths",
|
|
72
|
+
"Head",
|
|
73
|
+
"Link",
|
|
74
|
+
"create_app",
|
|
75
|
+
"useState",
|
|
76
|
+
"useEffect",
|
|
77
|
+
"useContext",
|
|
78
|
+
"useReducer",
|
|
79
|
+
"useCallback",
|
|
80
|
+
"useMemo",
|
|
81
|
+
"useRef",
|
|
82
|
+
"useCounter",
|
|
83
|
+
"useToggle",
|
|
84
|
+
"useLocalStorage",
|
|
85
|
+
"useFetch",
|
|
86
|
+
"useDebounce",
|
|
87
|
+
"createContext",
|
|
88
|
+
"Provider",
|
|
89
|
+
"with_hooks",
|
|
90
|
+
"security_manager",
|
|
91
|
+
"sanitize_input",
|
|
92
|
+
"safe_html",
|
|
93
|
+
"validate_and_sanitize_props",
|
|
94
|
+
"Button", "Card", "Input", "TextArea", "Select", "Checkbox", "Radio", "RadioGroup", "Form", "FormGroup", "FileInput",
|
|
95
|
+
"NumberInput", "DateInput", "TimeInput", "PasswordInput", "RangeInput", "ColorInput", "SubmitButton",
|
|
96
|
+
"Container", "Grid", "Flex", "Stack", "Sidebar", "MainContent", "Section", "Article",
|
|
97
|
+
"Header", "Footer", "Navigation", "Center", "Spacer", "Divider", "AspectRatio",
|
|
98
|
+
"Badge", "Avatar", "Icon", "Alert", "Progress", "Skeleton", "Tooltip", "Chip",
|
|
99
|
+
"Breadcrumb", "Table", "Code", "Blockquote",
|
|
100
|
+
"Navbar", "Menu", "Dropdown", "Tabs", "Pagination",
|
|
101
|
+
"SearchBar", "BreadcrumbNav",
|
|
102
|
+
"div", "h1", "h2", "h3", "h4", "h5", "h6",
|
|
103
|
+
"p", "span", "a", "img",
|
|
104
|
+
"ul", "ol", "li",
|
|
105
|
+
"form", "input", "button", "textarea", "select", "option",
|
|
106
|
+
"table", "thead", "tbody", "tr", "th", "td",
|
|
107
|
+
"header", "footer", "main", "section", "article", "nav", "aside",
|
|
108
|
+
"strong", "em", "i", "b",
|
|
109
|
+
"hr", "br",
|
|
110
|
+
"style", "script", "meta", "link", "title",
|
|
111
|
+
"jsx",
|
|
112
|
+
"maintainers",
|
|
113
|
+
"main"
|
|
114
|
+
]
|
|
115
|
+
|
|
116
|
+
maintainers = [
|
|
117
|
+
{"name": "NextPy Team", "email": "team@nextpy.dev"}
|
|
118
|
+
]
|
|
119
|
+
|
|
120
|
+
main = "nextpy.server.app:create_app"
|