future-framework 2.1.0__tar.gz → 2.1.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.
- {future_framework-2.1.0 → future_framework-2.1.1}/PKG-INFO +1 -1
- {future_framework-2.1.0 → future_framework-2.1.1}/future/application.py +1 -1
- {future_framework-2.1.0 → future_framework-2.1.1}/future/seeder.py +12 -4
- {future_framework-2.1.0 → future_framework-2.1.1}/pyproject.toml +1 -1
- {future_framework-2.1.0 → future_framework-2.1.1}/LICENSE +0 -0
- {future_framework-2.1.0 → future_framework-2.1.1}/README.md +0 -0
- {future_framework-2.1.0 → future_framework-2.1.1}/future/__init__.py +0 -0
- {future_framework-2.1.0 → future_framework-2.1.1}/future/authentication/Auth0Authentication.py +0 -0
- {future_framework-2.1.0 → future_framework-2.1.1}/future/authentication/AzureADAuthentication.py +0 -0
- {future_framework-2.1.0 → future_framework-2.1.1}/future/authentication/BasicAuthentication.py +0 -0
- {future_framework-2.1.0 → future_framework-2.1.1}/future/authentication/KerberosAuthentication.py +0 -0
- {future_framework-2.1.0 → future_framework-2.1.1}/future/authentication/KeycloakAuthentication.py +0 -0
- {future_framework-2.1.0 → future_framework-2.1.1}/future/authentication/OAuth2Authentication.py +0 -0
- {future_framework-2.1.0 → future_framework-2.1.1}/future/authentication/OpenIdConnectAuthentication.py +0 -0
- {future_framework-2.1.0 → future_framework-2.1.1}/future/authentication/SAMLAuthentication.py +0 -0
- {future_framework-2.1.0 → future_framework-2.1.1}/future/authentication/__init__.py +0 -0
- {future_framework-2.1.0 → future_framework-2.1.1}/future/cli.py +0 -0
- {future_framework-2.1.0 → future_framework-2.1.1}/future/controllers/DebugController.py +0 -0
- {future_framework-2.1.0 → future_framework-2.1.1}/future/controllers/GraphQLController.py +0 -0
- {future_framework-2.1.0 → future_framework-2.1.1}/future/controllers/OpenAPIController.py +0 -0
- {future_framework-2.1.0 → future_framework-2.1.1}/future/controllers/WebSocketController.py +0 -0
- {future_framework-2.1.0 → future_framework-2.1.1}/future/controllers/WelcomeController.py +0 -0
- {future_framework-2.1.0 → future_framework-2.1.1}/future/controllers/__init__.py +0 -0
- {future_framework-2.1.0 → future_framework-2.1.1}/future/database.py +0 -0
- {future_framework-2.1.0 → future_framework-2.1.1}/future/databases/ClickhouseDatabase.py +0 -0
- {future_framework-2.1.0 → future_framework-2.1.1}/future/databases/ElasticsearchDatabase.py +0 -0
- {future_framework-2.1.0 → future_framework-2.1.1}/future/databases/MongoDBDatabase.py +0 -0
- {future_framework-2.1.0 → future_framework-2.1.1}/future/databases/MySQLDatabase.py +0 -0
- {future_framework-2.1.0 → future_framework-2.1.1}/future/databases/PostgresDatabase.py +0 -0
- {future_framework-2.1.0 → future_framework-2.1.1}/future/databases/RedisDatabase.py +0 -0
- {future_framework-2.1.0 → future_framework-2.1.1}/future/databases/SQLiteDatabase.py +0 -0
- {future_framework-2.1.0 → future_framework-2.1.1}/future/databases/__init__.py +0 -0
- {future_framework-2.1.0 → future_framework-2.1.1}/future/exceptions.py +0 -0
- {future_framework-2.1.0 → future_framework-2.1.1}/future/interfaces/IAuthentication.py +0 -0
- {future_framework-2.1.0 → future_framework-2.1.1}/future/interfaces/IController.py +0 -0
- {future_framework-2.1.0 → future_framework-2.1.1}/future/interfaces/IDatabase.py +0 -0
- {future_framework-2.1.0 → future_framework-2.1.1}/future/interfaces/IMiddleware.py +0 -0
- {future_framework-2.1.0 → future_framework-2.1.1}/future/interfaces/IModel.py +0 -0
- {future_framework-2.1.0 → future_framework-2.1.1}/future/interfaces/IPlugin.py +0 -0
- {future_framework-2.1.0 → future_framework-2.1.1}/future/interfaces/ITask.py +0 -0
- {future_framework-2.1.0 → future_framework-2.1.1}/future/interfaces/__init__.py +0 -0
- {future_framework-2.1.0 → future_framework-2.1.1}/future/interfacing.py +0 -0
- {future_framework-2.1.0 → future_framework-2.1.1}/future/lifespan.py +0 -0
- {future_framework-2.1.0 → future_framework-2.1.1}/future/logger.py +0 -0
- {future_framework-2.1.0 → future_framework-2.1.1}/future/middleware/BruteforcePreventionMiddleware.py +0 -0
- {future_framework-2.1.0 → future_framework-2.1.1}/future/middleware/CORSMiddleware.py +0 -0
- {future_framework-2.1.0 → future_framework-2.1.1}/future/middleware/CSRFMiddleware.py +0 -0
- {future_framework-2.1.0 → future_framework-2.1.1}/future/middleware/GZipMiddleware.py +0 -0
- {future_framework-2.1.0 → future_framework-2.1.1}/future/middleware/HTAccessConfuserMiddleware.py +0 -0
- {future_framework-2.1.0 → future_framework-2.1.1}/future/middleware/HeaderConfuserMiddleware.py +0 -0
- {future_framework-2.1.0 → future_framework-2.1.1}/future/middleware/RateLimitMiddleware.py +0 -0
- {future_framework-2.1.0 → future_framework-2.1.1}/future/middleware/ResponseCodeConfuserMiddleware.py +0 -0
- {future_framework-2.1.0 → future_framework-2.1.1}/future/middleware/SQLiConfuserMiddleware.py +0 -0
- {future_framework-2.1.0 → future_framework-2.1.1}/future/middleware/ScopeValidationMiddleware.py +0 -0
- {future_framework-2.1.0 → future_framework-2.1.1}/future/middleware/SessionMiddleware.py +0 -0
- {future_framework-2.1.0 → future_framework-2.1.1}/future/middleware/TestMiddlewareRequest.py +0 -0
- {future_framework-2.1.0 → future_framework-2.1.1}/future/middleware/TestMiddlewareResponse.py +0 -0
- {future_framework-2.1.0 → future_framework-2.1.1}/future/middleware/WebServerConfuserMiddleware.py +0 -0
- {future_framework-2.1.0 → future_framework-2.1.1}/future/middleware/__init__.py +0 -0
- {future_framework-2.1.0 → future_framework-2.1.1}/future/migrations.py +0 -0
- {future_framework-2.1.0 → future_framework-2.1.1}/future/models/PostModel.py +0 -0
- {future_framework-2.1.0 → future_framework-2.1.1}/future/models/Query.py +0 -0
- {future_framework-2.1.0 → future_framework-2.1.1}/future/models/UserModel.py +0 -0
- {future_framework-2.1.0 → future_framework-2.1.1}/future/models/__init__.py +0 -0
- {future_framework-2.1.0 → future_framework-2.1.1}/future/openapi.py +0 -0
- {future_framework-2.1.0 → future_framework-2.1.1}/future/plugins/ElasticsearchPlugin.py +0 -0
- {future_framework-2.1.0 → future_framework-2.1.1}/future/plugins/__init__.py +0 -0
- {future_framework-2.1.0 → future_framework-2.1.1}/future/request.py +0 -0
- {future_framework-2.1.0 → future_framework-2.1.1}/future/response.py +0 -0
- {future_framework-2.1.0 → future_framework-2.1.1}/future/routing.py +0 -0
- {future_framework-2.1.0 → future_framework-2.1.1}/future/settings.py +0 -0
- {future_framework-2.1.0 → future_framework-2.1.1}/future/tasks/CheckDNSTask.py +0 -0
- {future_framework-2.1.0 → future_framework-2.1.1}/future/tasks/CheckDiskUsageTask.py +0 -0
- {future_framework-2.1.0 → future_framework-2.1.1}/future/tasks/CheckHttpStatusTask.py +0 -0
- {future_framework-2.1.0 → future_framework-2.1.1}/future/tasks/CheckMemoryUsageTask.py +0 -0
- {future_framework-2.1.0 → future_framework-2.1.1}/future/tasks/CheckSSHBannerTask.py +0 -0
- {future_framework-2.1.0 → future_framework-2.1.1}/future/tasks/CheckSystemUptimeTask.py +0 -0
- {future_framework-2.1.0 → future_framework-2.1.1}/future/tasks/DailyBackupTask.py +0 -0
- {future_framework-2.1.0 → future_framework-2.1.1}/future/tasks/SyncTaskExample.py +0 -0
- {future_framework-2.1.0 → future_framework-2.1.1}/future/tasks/__init__.py +0 -0
- {future_framework-2.1.0 → future_framework-2.1.1}/future/taskscheduler.py +0 -0
- {future_framework-2.1.0 → future_framework-2.1.1}/future/testclient.py +0 -0
- {future_framework-2.1.0 → future_framework-2.1.1}/future/types.py +0 -0
|
@@ -402,7 +402,7 @@ class Future:
|
|
|
402
402
|
try:
|
|
403
403
|
host_domain = request.host.split("/")[0] if "/" in request.host else request.host
|
|
404
404
|
if not self._validate_domain_access(host_domain):
|
|
405
|
-
raise HTTPException("
|
|
405
|
+
raise HTTPException("Not Found", 404)
|
|
406
406
|
|
|
407
407
|
debug = bool(self.config.get("APP_DEBUG")) if self.config else False
|
|
408
408
|
route_host = host_domain.rsplit(":", 1)[0] if debug and ":" in host_domain else host_domain
|
|
@@ -65,7 +65,7 @@ class SeedGenerator:
|
|
|
65
65
|
return model
|
|
66
66
|
raise ValueError(f"Model not found: {name}")
|
|
67
67
|
|
|
68
|
-
def value_expr(self, field, annotation):
|
|
68
|
+
def value_expr(self, field, annotation, model_name=None):
|
|
69
69
|
origin = get_origin(annotation)
|
|
70
70
|
if origin is Union or origin is UnionType:
|
|
71
71
|
args = [arg for arg in get_args(annotation) if arg is not type(None)]
|
|
@@ -124,9 +124,9 @@ class SeedGenerator:
|
|
|
124
124
|
if field == "trade_type" or field == "side":
|
|
125
125
|
return 'fake.random_element(elements=("BUY", "SELL"))'
|
|
126
126
|
if field == "percentage_change_interval":
|
|
127
|
-
return 'fake.random_element(elements=("
|
|
127
|
+
return 'fake.random_element(elements=("UNKNOWN", "LESS_THAN_ONE", "ONE_TO_FIVE", "FIVE_TO_TEN", "TEN_TO_TWENTY", "TWENTY_TO_THIRTY", "OVER_ONE_HUNDRED"))'
|
|
128
128
|
if field == "group_type":
|
|
129
|
-
return 'fake.random_element(elements=("COMMON_SHARE", "
|
|
129
|
+
return 'fake.random_element(elements=("COMMON_SHARE", "FND", "ETF", "WARRANT", "OTHER"))'
|
|
130
130
|
if field == "kind":
|
|
131
131
|
return 'fake.random_element(elements=("instruments", "users"))'
|
|
132
132
|
if field == "members":
|
|
@@ -137,6 +137,14 @@ class SeedGenerator:
|
|
|
137
137
|
return "fake.sentence()"
|
|
138
138
|
if field == "password_hash":
|
|
139
139
|
return "fake.sha256()"
|
|
140
|
+
if field == "name" and model_name == "NordnetInstrumentModel":
|
|
141
|
+
return 'fake.random_element(elements=("Equinor", "Nordnet Global Indeks", "DNB Teknologi A", "T1 Energy", "Aker BP"))'
|
|
142
|
+
if field == "name" and model_name == "IndexModel":
|
|
143
|
+
return 'fake.random_element(elements=("Nordic Momentum", "Top Shareville Traders", "Consensus Buys", "Long-term Winners"))'
|
|
144
|
+
if field == "country":
|
|
145
|
+
return 'fake.random_element(elements=("NO", "SE", "DK", "FI"))'
|
|
146
|
+
if field == "slug":
|
|
147
|
+
return "fake.slug()"
|
|
140
148
|
if "name" in field or "username" in field:
|
|
141
149
|
return "fake.user_name()"
|
|
142
150
|
if field in ("description", "text", "body", "content") or field.endswith("_original") or field.endswith("_translated"):
|
|
@@ -155,7 +163,7 @@ class SeedGenerator:
|
|
|
155
163
|
current = non_null[0] if non_null else str
|
|
156
164
|
if isinstance(current, type) and issubclass(current, IModel):
|
|
157
165
|
continue
|
|
158
|
-
args.append(f" {field}={self.value_expr(field, annotation)},")
|
|
166
|
+
args.append(f" {field}={self.value_expr(field, annotation, name)},")
|
|
159
167
|
if args:
|
|
160
168
|
construct = f" await {name}(\n" + "\n".join(args) + f"\n ).save()"
|
|
161
169
|
else:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{future_framework-2.1.0 → future_framework-2.1.1}/future/authentication/Auth0Authentication.py
RENAMED
|
File without changes
|
{future_framework-2.1.0 → future_framework-2.1.1}/future/authentication/AzureADAuthentication.py
RENAMED
|
File without changes
|
{future_framework-2.1.0 → future_framework-2.1.1}/future/authentication/BasicAuthentication.py
RENAMED
|
File without changes
|
{future_framework-2.1.0 → future_framework-2.1.1}/future/authentication/KerberosAuthentication.py
RENAMED
|
File without changes
|
{future_framework-2.1.0 → future_framework-2.1.1}/future/authentication/KeycloakAuthentication.py
RENAMED
|
File without changes
|
{future_framework-2.1.0 → future_framework-2.1.1}/future/authentication/OAuth2Authentication.py
RENAMED
|
File without changes
|
|
File without changes
|
{future_framework-2.1.0 → future_framework-2.1.1}/future/authentication/SAMLAuthentication.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
|
|
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
|
|
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
|
|
File without changes
|
{future_framework-2.1.0 → future_framework-2.1.1}/future/middleware/HTAccessConfuserMiddleware.py
RENAMED
|
File without changes
|
{future_framework-2.1.0 → future_framework-2.1.1}/future/middleware/HeaderConfuserMiddleware.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{future_framework-2.1.0 → future_framework-2.1.1}/future/middleware/SQLiConfuserMiddleware.py
RENAMED
|
File without changes
|
{future_framework-2.1.0 → future_framework-2.1.1}/future/middleware/ScopeValidationMiddleware.py
RENAMED
|
File without changes
|
|
File without changes
|
{future_framework-2.1.0 → future_framework-2.1.1}/future/middleware/TestMiddlewareRequest.py
RENAMED
|
File without changes
|
{future_framework-2.1.0 → future_framework-2.1.1}/future/middleware/TestMiddlewareResponse.py
RENAMED
|
File without changes
|
{future_framework-2.1.0 → future_framework-2.1.1}/future/middleware/WebServerConfuserMiddleware.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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|