fenrir-framework 0.1.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.
fenrir/__init__.py ADDED
@@ -0,0 +1,148 @@
1
+ from fenrir.app import Fenrir, Blueprint
2
+ from fenrir.context import request, g, current_app, session
3
+ from fenrir.dependencies import Depends, Query, Header, Cookie, Body, Path, Form, File
4
+ from fenrir.upload import UploadFile
5
+ from fenrir.websocket import WebSocket, WebSocketDisconnect
6
+ from fenrir.exceptions import (
7
+ HTTPException,
8
+ HTTPBadRequest,
9
+ HTTPUnauthorized,
10
+ HTTPForbidden,
11
+ HTTPNotFound,
12
+ HTTPMethodNotAllowed,
13
+ HTTPConflict,
14
+ HTTPUnprocessableEntity,
15
+ HTTPInternalServerError,
16
+ )
17
+ from fenrir.response import (
18
+ Response,
19
+ JSONResponse,
20
+ HTMLResponse,
21
+ TextResponse,
22
+ RedirectResponse,
23
+ StreamingResponse,
24
+ FileResponse,
25
+ PlainTextResponse,
26
+ )
27
+ from fenrir.templating import render_template, BaseTemplateRenderer, Jinja2Renderer
28
+ from fenrir.views import View, MethodView
29
+ from fenrir.helpers import url_for, send_file, send_from_directory, redirect
30
+ from fenrir.routing import Router, Route, APIRouter
31
+ from fenrir.sse import EventSourceResponse
32
+ from fenrir.security import (
33
+ APIKeyCookie,
34
+ APIKeyHeader,
35
+ APIKeyQuery,
36
+ HTTPBasic,
37
+ HTTPBearer,
38
+ HTTPDigest,
39
+ OAuth2PasswordBearer,
40
+ OAuth2AuthorizationCodeBearer,
41
+ OpenIDConnect,
42
+ )
43
+ from fenrir.background import BackgroundTasks, BackgroundTask
44
+ from fenrir.compat import WsgiToAsgi, install_bottle_compat, install_falcon_compat, install_sanic_compat
45
+ from fenrir.bottle import Bottle
46
+ import fenrir.bottle as bottle
47
+ import fenrir.falcon as falcon
48
+ import fenrir.sanic as sanic
49
+ from fenrir.testing import TestClient, FenrirTestClient
50
+
51
+
52
+
53
+
54
+ # Re-export Annotated for convenient use with param markers
55
+ from typing import Annotated
56
+
57
+ __version__ = "0.1.0"
58
+ __all__ = [
59
+ # Core app
60
+ "Fenrir",
61
+ "Blueprint",
62
+ # Context
63
+ "request",
64
+ "g",
65
+ "current_app",
66
+ "session",
67
+ # Dependency injection
68
+ "Depends",
69
+ "Query",
70
+ "Header",
71
+ "Cookie",
72
+ "Body",
73
+ "Path",
74
+ "Form",
75
+ "File",
76
+ "Annotated",
77
+ # File upload
78
+ "UploadFile",
79
+ # WebSocket
80
+ "WebSocket",
81
+ "WebSocketDisconnect",
82
+ # Exceptions
83
+ "HTTPException",
84
+ "HTTPBadRequest",
85
+ "HTTPUnauthorized",
86
+ "HTTPForbidden",
87
+ "HTTPNotFound",
88
+ "HTTPMethodNotAllowed",
89
+ "HTTPConflict",
90
+ "HTTPUnprocessableEntity",
91
+ "HTTPInternalServerError",
92
+ # Responses
93
+ "Response",
94
+ "JSONResponse",
95
+ "HTMLResponse",
96
+ "TextResponse",
97
+ "RedirectResponse",
98
+ "StreamingResponse",
99
+ "FileResponse",
100
+ "PlainTextResponse",
101
+ # Templating
102
+ "render_template",
103
+ "BaseTemplateRenderer",
104
+ "Jinja2Renderer",
105
+ # Views
106
+ "View",
107
+ "MethodView",
108
+ # Helpers
109
+ "url_for",
110
+ "send_file",
111
+ "send_from_directory",
112
+ "redirect",
113
+ # Routing
114
+ "Router",
115
+ "Route",
116
+ "APIRouter",
117
+ # SSE
118
+ "EventSourceResponse",
119
+ # Security
120
+ "APIKeyCookie",
121
+ "APIKeyHeader",
122
+ "APIKeyQuery",
123
+ "HTTPBasic",
124
+ "HTTPBearer",
125
+ "HTTPDigest",
126
+ "OAuth2PasswordBearer",
127
+ "OAuth2AuthorizationCodeBearer",
128
+ "OpenIDConnect",
129
+ # Background tasks
130
+ "BackgroundTasks",
131
+ "BackgroundTask",
132
+ # WSGI/Falcon/Sanic compat
133
+ "WsgiToAsgi",
134
+ "install_bottle_compat",
135
+ "install_falcon_compat",
136
+ "install_sanic_compat",
137
+ # Bottle built-in
138
+ "Bottle",
139
+ "bottle",
140
+ # Falcon built-in
141
+ "falcon",
142
+ # Sanic built-in
143
+ "sanic",
144
+ # Testing
145
+ "TestClient",
146
+ "FenrirTestClient",
147
+ ]
148
+