clear-skies 1.22.10__py3-none-any.whl → 2.0.23__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.
- clear_skies-2.0.23.dist-info/METADATA +76 -0
- clear_skies-2.0.23.dist-info/RECORD +265 -0
- {clear_skies-1.22.10.dist-info → clear_skies-2.0.23.dist-info}/WHEEL +1 -1
- clearskies/__init__.py +37 -21
- clearskies/action.py +7 -0
- clearskies/authentication/__init__.py +8 -39
- clearskies/authentication/authentication.py +44 -0
- clearskies/authentication/authorization.py +14 -8
- clearskies/authentication/authorization_pass_through.py +14 -10
- clearskies/authentication/jwks.py +135 -58
- clearskies/authentication/public.py +3 -26
- clearskies/authentication/secret_bearer.py +515 -44
- clearskies/autodoc/formats/oai3_json/__init__.py +2 -2
- clearskies/autodoc/formats/oai3_json/oai3_json.py +11 -9
- clearskies/autodoc/formats/oai3_json/parameter.py +6 -3
- clearskies/autodoc/formats/oai3_json/request.py +7 -5
- clearskies/autodoc/formats/oai3_json/response.py +7 -4
- clearskies/autodoc/formats/oai3_json/schema/object.py +10 -1
- clearskies/autodoc/request/__init__.py +2 -0
- clearskies/autodoc/request/header.py +4 -6
- clearskies/autodoc/request/json_body.py +4 -6
- clearskies/autodoc/request/parameter.py +8 -0
- clearskies/autodoc/request/request.py +16 -4
- clearskies/autodoc/request/url_parameter.py +4 -6
- clearskies/autodoc/request/url_path.py +4 -6
- clearskies/autodoc/schema/__init__.py +4 -2
- clearskies/autodoc/schema/array.py +5 -6
- clearskies/autodoc/schema/boolean.py +4 -10
- clearskies/autodoc/schema/date.py +0 -3
- clearskies/autodoc/schema/datetime.py +1 -4
- clearskies/autodoc/schema/double.py +0 -3
- clearskies/autodoc/schema/enum.py +4 -2
- clearskies/autodoc/schema/integer.py +4 -9
- clearskies/autodoc/schema/long.py +0 -3
- clearskies/autodoc/schema/number.py +4 -9
- clearskies/autodoc/schema/object.py +5 -7
- clearskies/autodoc/schema/password.py +0 -3
- clearskies/autodoc/schema/schema.py +11 -0
- clearskies/autodoc/schema/string.py +4 -10
- clearskies/backends/__init__.py +55 -20
- clearskies/backends/api_backend.py +1118 -280
- clearskies/backends/backend.py +54 -85
- clearskies/backends/cursor_backend.py +246 -191
- clearskies/backends/memory_backend.py +514 -208
- clearskies/backends/secrets_backend.py +68 -31
- clearskies/column.py +1221 -0
- clearskies/columns/__init__.py +71 -0
- clearskies/columns/audit.py +306 -0
- clearskies/columns/belongs_to_id.py +478 -0
- clearskies/columns/belongs_to_model.py +129 -0
- clearskies/columns/belongs_to_self.py +109 -0
- clearskies/columns/boolean.py +110 -0
- clearskies/columns/category_tree.py +273 -0
- clearskies/columns/category_tree_ancestors.py +51 -0
- clearskies/columns/category_tree_children.py +126 -0
- clearskies/columns/category_tree_descendants.py +48 -0
- clearskies/columns/created.py +92 -0
- clearskies/columns/created_by_authorization_data.py +114 -0
- clearskies/columns/created_by_header.py +103 -0
- clearskies/columns/created_by_ip.py +90 -0
- clearskies/columns/created_by_routing_data.py +102 -0
- clearskies/columns/created_by_user_agent.py +89 -0
- clearskies/columns/date.py +232 -0
- clearskies/columns/datetime.py +284 -0
- clearskies/columns/email.py +78 -0
- clearskies/columns/float.py +149 -0
- clearskies/columns/has_many.py +529 -0
- clearskies/columns/has_many_self.py +62 -0
- clearskies/columns/has_one.py +21 -0
- clearskies/columns/integer.py +158 -0
- clearskies/columns/json.py +126 -0
- clearskies/columns/many_to_many_ids.py +335 -0
- clearskies/columns/many_to_many_ids_with_data.py +274 -0
- clearskies/columns/many_to_many_models.py +156 -0
- clearskies/columns/many_to_many_pivots.py +132 -0
- clearskies/columns/phone.py +162 -0
- clearskies/columns/select.py +95 -0
- clearskies/columns/string.py +102 -0
- clearskies/columns/timestamp.py +164 -0
- clearskies/columns/updated.py +107 -0
- clearskies/columns/uuid.py +83 -0
- clearskies/configs/README.md +105 -0
- clearskies/configs/__init__.py +170 -0
- clearskies/configs/actions.py +43 -0
- clearskies/configs/any.py +15 -0
- clearskies/configs/any_dict.py +24 -0
- clearskies/configs/any_dict_or_callable.py +25 -0
- clearskies/configs/authentication.py +23 -0
- clearskies/configs/authorization.py +23 -0
- clearskies/configs/boolean.py +18 -0
- clearskies/configs/boolean_or_callable.py +20 -0
- clearskies/configs/callable_config.py +20 -0
- clearskies/configs/columns.py +34 -0
- clearskies/configs/conditions.py +30 -0
- clearskies/configs/config.py +26 -0
- clearskies/configs/datetime.py +20 -0
- clearskies/configs/datetime_or_callable.py +21 -0
- clearskies/configs/email.py +10 -0
- clearskies/configs/email_list.py +17 -0
- clearskies/configs/email_list_or_callable.py +17 -0
- clearskies/configs/email_or_email_list_or_callable.py +59 -0
- clearskies/configs/endpoint.py +23 -0
- clearskies/configs/endpoint_list.py +29 -0
- clearskies/configs/float.py +18 -0
- clearskies/configs/float_or_callable.py +20 -0
- clearskies/configs/headers.py +28 -0
- clearskies/configs/integer.py +18 -0
- clearskies/configs/integer_or_callable.py +20 -0
- clearskies/configs/joins.py +30 -0
- clearskies/configs/list_any_dict.py +32 -0
- clearskies/configs/list_any_dict_or_callable.py +33 -0
- clearskies/configs/model_class.py +35 -0
- clearskies/configs/model_column.py +67 -0
- clearskies/configs/model_columns.py +58 -0
- clearskies/configs/model_destination_name.py +26 -0
- clearskies/configs/model_to_id_column.py +45 -0
- clearskies/configs/readable_model_column.py +11 -0
- clearskies/configs/readable_model_columns.py +11 -0
- clearskies/configs/schema.py +23 -0
- clearskies/configs/searchable_model_columns.py +11 -0
- clearskies/configs/security_headers.py +39 -0
- clearskies/configs/select.py +28 -0
- clearskies/configs/select_list.py +49 -0
- clearskies/configs/string.py +31 -0
- clearskies/configs/string_dict.py +34 -0
- clearskies/configs/string_list.py +47 -0
- clearskies/configs/string_list_or_callable.py +48 -0
- clearskies/configs/string_or_callable.py +18 -0
- clearskies/configs/timedelta.py +20 -0
- clearskies/configs/timezone.py +20 -0
- clearskies/configs/url.py +25 -0
- clearskies/configs/validators.py +45 -0
- clearskies/configs/writeable_model_column.py +11 -0
- clearskies/configs/writeable_model_columns.py +11 -0
- clearskies/configurable.py +78 -0
- clearskies/contexts/__init__.py +8 -8
- clearskies/contexts/cli.py +129 -43
- clearskies/contexts/context.py +93 -56
- clearskies/contexts/wsgi.py +79 -33
- clearskies/contexts/wsgi_ref.py +87 -0
- clearskies/cursors/__init__.py +7 -0
- clearskies/cursors/cursor.py +166 -0
- clearskies/cursors/from_environment/__init__.py +5 -0
- clearskies/cursors/from_environment/mysql.py +51 -0
- clearskies/cursors/from_environment/postgresql.py +49 -0
- clearskies/cursors/from_environment/sqlite.py +35 -0
- clearskies/cursors/mysql.py +61 -0
- clearskies/cursors/postgresql.py +61 -0
- clearskies/cursors/sqlite.py +62 -0
- clearskies/decorators.py +33 -0
- clearskies/decorators.pyi +10 -0
- clearskies/di/__init__.py +11 -7
- clearskies/di/additional_config.py +115 -4
- clearskies/di/additional_config_auto_import.py +12 -0
- clearskies/di/di.py +714 -125
- clearskies/di/inject/__init__.py +23 -0
- clearskies/di/inject/akeyless_sdk.py +16 -0
- clearskies/di/inject/by_class.py +24 -0
- clearskies/di/inject/by_name.py +22 -0
- clearskies/di/inject/di.py +16 -0
- clearskies/di/inject/environment.py +15 -0
- clearskies/di/inject/input_output.py +19 -0
- clearskies/di/inject/now.py +16 -0
- clearskies/di/inject/requests.py +16 -0
- clearskies/di/inject/secrets.py +15 -0
- clearskies/di/inject/utcnow.py +16 -0
- clearskies/di/inject/uuid.py +16 -0
- clearskies/di/injectable.py +32 -0
- clearskies/di/injectable_properties.py +131 -0
- clearskies/end.py +219 -0
- clearskies/endpoint.py +1303 -0
- clearskies/endpoint_group.py +333 -0
- clearskies/endpoints/__init__.py +25 -0
- clearskies/endpoints/advanced_search.py +519 -0
- clearskies/endpoints/callable.py +382 -0
- clearskies/endpoints/create.py +201 -0
- clearskies/endpoints/delete.py +133 -0
- clearskies/endpoints/get.py +267 -0
- clearskies/endpoints/health_check.py +181 -0
- clearskies/endpoints/list.py +567 -0
- clearskies/endpoints/restful_api.py +417 -0
- clearskies/endpoints/schema.py +185 -0
- clearskies/endpoints/simple_search.py +279 -0
- clearskies/endpoints/update.py +188 -0
- clearskies/environment.py +7 -3
- clearskies/exceptions/__init__.py +19 -0
- clearskies/{handlers/exceptions/input_error.py → exceptions/input_errors.py} +1 -1
- clearskies/exceptions/missing_dependency.py +2 -0
- clearskies/exceptions/moved_permanently.py +3 -0
- clearskies/exceptions/moved_temporarily.py +3 -0
- clearskies/functional/__init__.py +2 -2
- clearskies/functional/json.py +47 -0
- clearskies/functional/routing.py +92 -0
- clearskies/functional/string.py +19 -11
- clearskies/functional/validations.py +61 -9
- clearskies/input_outputs/__init__.py +9 -7
- clearskies/input_outputs/cli.py +135 -160
- clearskies/input_outputs/exceptions/__init__.py +6 -1
- clearskies/input_outputs/headers.py +54 -0
- clearskies/input_outputs/input_output.py +77 -123
- clearskies/input_outputs/programmatic.py +62 -0
- clearskies/input_outputs/wsgi.py +36 -48
- clearskies/model.py +1874 -193
- clearskies/query/__init__.py +12 -0
- clearskies/query/condition.py +228 -0
- clearskies/query/join.py +136 -0
- clearskies/query/query.py +193 -0
- clearskies/query/sort.py +27 -0
- clearskies/schema.py +82 -0
- clearskies/secrets/__init__.py +4 -31
- clearskies/secrets/additional_configs/mysql_connection_dynamic_producer.py +15 -4
- clearskies/secrets/additional_configs/mysql_connection_dynamic_producer_via_ssh_cert_bastion.py +11 -5
- clearskies/secrets/akeyless.py +421 -155
- clearskies/secrets/exceptions/__init__.py +7 -1
- clearskies/secrets/exceptions/not_found_error.py +2 -0
- clearskies/secrets/exceptions/permissions_error.py +2 -0
- clearskies/secrets/secrets.py +12 -11
- clearskies/security_header.py +17 -0
- clearskies/security_headers/__init__.py +8 -8
- clearskies/security_headers/cache_control.py +47 -109
- clearskies/security_headers/cors.py +38 -92
- clearskies/security_headers/csp.py +76 -150
- clearskies/security_headers/hsts.py +14 -15
- clearskies/typing.py +11 -0
- clearskies/validator.py +36 -0
- clearskies/validators/__init__.py +33 -0
- clearskies/validators/after_column.py +61 -0
- clearskies/validators/before_column.py +15 -0
- clearskies/validators/in_the_future.py +29 -0
- clearskies/validators/in_the_future_at_least.py +13 -0
- clearskies/validators/in_the_future_at_most.py +12 -0
- clearskies/validators/in_the_past.py +29 -0
- clearskies/validators/in_the_past_at_least.py +12 -0
- clearskies/validators/in_the_past_at_most.py +12 -0
- clearskies/validators/maximum_length.py +25 -0
- clearskies/validators/maximum_value.py +28 -0
- clearskies/validators/minimum_length.py +25 -0
- clearskies/validators/minimum_value.py +28 -0
- clearskies/{input_requirements → validators}/required.py +18 -9
- clearskies/validators/timedelta.py +58 -0
- clearskies/validators/unique.py +28 -0
- clear_skies-1.22.10.dist-info/METADATA +0 -47
- clear_skies-1.22.10.dist-info/RECORD +0 -213
- clearskies/application.py +0 -29
- clearskies/authentication/auth0_jwks.py +0 -118
- clearskies/authentication/auth_exception.py +0 -2
- clearskies/authentication/jwks_jwcrypto.py +0 -51
- clearskies/backends/api_get_only_backend.py +0 -48
- clearskies/backends/example_backend.py +0 -43
- clearskies/backends/file_backend.py +0 -48
- clearskies/backends/json_backend.py +0 -7
- clearskies/backends/restful_api_advanced_search_backend.py +0 -103
- clearskies/binding_config.py +0 -16
- clearskies/column_types/__init__.py +0 -203
- clearskies/column_types/audit.py +0 -249
- clearskies/column_types/belongs_to.py +0 -271
- clearskies/column_types/boolean.py +0 -60
- clearskies/column_types/category_tree.py +0 -304
- clearskies/column_types/column.py +0 -373
- clearskies/column_types/created.py +0 -26
- clearskies/column_types/created_by_authorization_data.py +0 -26
- clearskies/column_types/created_by_header.py +0 -24
- clearskies/column_types/created_by_ip.py +0 -17
- clearskies/column_types/created_by_routing_data.py +0 -25
- clearskies/column_types/created_by_user_agent.py +0 -17
- clearskies/column_types/created_micro.py +0 -26
- clearskies/column_types/datetime.py +0 -109
- clearskies/column_types/datetime_micro.py +0 -13
- clearskies/column_types/email.py +0 -18
- clearskies/column_types/float.py +0 -43
- clearskies/column_types/has_many.py +0 -179
- clearskies/column_types/has_one.py +0 -58
- clearskies/column_types/integer.py +0 -41
- clearskies/column_types/json.py +0 -25
- clearskies/column_types/many_to_many.py +0 -278
- clearskies/column_types/many_to_many_with_data.py +0 -162
- clearskies/column_types/phone.py +0 -48
- clearskies/column_types/select.py +0 -11
- clearskies/column_types/string.py +0 -24
- clearskies/column_types/timestamp.py +0 -73
- clearskies/column_types/updated.py +0 -26
- clearskies/column_types/updated_micro.py +0 -26
- clearskies/column_types/uuid.py +0 -25
- clearskies/columns.py +0 -123
- clearskies/condition_parser.py +0 -172
- clearskies/contexts/build_context.py +0 -54
- clearskies/contexts/convert_to_application.py +0 -190
- clearskies/contexts/extract_handler.py +0 -37
- clearskies/contexts/test.py +0 -94
- clearskies/decorators/__init__.py +0 -39
- clearskies/decorators/auth0_jwks.py +0 -22
- clearskies/decorators/authorization.py +0 -10
- clearskies/decorators/binding_classes.py +0 -9
- clearskies/decorators/binding_modules.py +0 -9
- clearskies/decorators/bindings.py +0 -9
- clearskies/decorators/create.py +0 -10
- clearskies/decorators/delete.py +0 -10
- clearskies/decorators/docs.py +0 -14
- clearskies/decorators/get.py +0 -10
- clearskies/decorators/jwks.py +0 -26
- clearskies/decorators/merge.py +0 -124
- clearskies/decorators/patch.py +0 -10
- clearskies/decorators/post.py +0 -10
- clearskies/decorators/public.py +0 -11
- clearskies/decorators/response_headers.py +0 -10
- clearskies/decorators/return_raw_response.py +0 -9
- clearskies/decorators/schema.py +0 -10
- clearskies/decorators/secret_bearer.py +0 -24
- clearskies/decorators/security_headers.py +0 -10
- clearskies/di/standard_dependencies.py +0 -151
- clearskies/di/test_module/__init__.py +0 -6
- clearskies/di/test_module/another_module/__init__.py +0 -2
- clearskies/di/test_module/module_class.py +0 -5
- clearskies/handlers/__init__.py +0 -41
- clearskies/handlers/advanced_search.py +0 -271
- clearskies/handlers/base.py +0 -479
- clearskies/handlers/callable.py +0 -191
- clearskies/handlers/create.py +0 -35
- clearskies/handlers/crud_by_method.py +0 -18
- clearskies/handlers/database_connector.py +0 -32
- clearskies/handlers/delete.py +0 -61
- clearskies/handlers/exceptions/__init__.py +0 -5
- clearskies/handlers/exceptions/not_found.py +0 -3
- clearskies/handlers/get.py +0 -156
- clearskies/handlers/health_check.py +0 -59
- clearskies/handlers/input_processing.py +0 -79
- clearskies/handlers/list.py +0 -530
- clearskies/handlers/mygrations.py +0 -82
- clearskies/handlers/request_method_routing.py +0 -47
- clearskies/handlers/restful_api.py +0 -218
- clearskies/handlers/routing.py +0 -62
- clearskies/handlers/schema_helper.py +0 -128
- clearskies/handlers/simple_routing.py +0 -206
- clearskies/handlers/simple_routing_route.py +0 -192
- clearskies/handlers/simple_search.py +0 -136
- clearskies/handlers/update.py +0 -96
- clearskies/handlers/write.py +0 -193
- clearskies/input_requirements/__init__.py +0 -78
- clearskies/input_requirements/after.py +0 -36
- clearskies/input_requirements/before.py +0 -36
- clearskies/input_requirements/in_the_future_at_least.py +0 -19
- clearskies/input_requirements/in_the_future_at_most.py +0 -19
- clearskies/input_requirements/in_the_past_at_least.py +0 -19
- clearskies/input_requirements/in_the_past_at_most.py +0 -19
- clearskies/input_requirements/maximum_length.py +0 -19
- clearskies/input_requirements/maximum_value.py +0 -19
- clearskies/input_requirements/minimum_length.py +0 -22
- clearskies/input_requirements/minimum_value.py +0 -19
- clearskies/input_requirements/requirement.py +0 -25
- clearskies/input_requirements/time_delta.py +0 -38
- clearskies/input_requirements/unique.py +0 -18
- clearskies/mocks/__init__.py +0 -7
- clearskies/mocks/input_output.py +0 -124
- clearskies/mocks/models.py +0 -142
- clearskies/models.py +0 -350
- clearskies/security_headers/base.py +0 -12
- clearskies/tests/simple_api/models/__init__.py +0 -2
- clearskies/tests/simple_api/models/status.py +0 -23
- clearskies/tests/simple_api/models/user.py +0 -21
- clearskies/tests/simple_api/users_api.py +0 -64
- {clear_skies-1.22.10.dist-info → clear_skies-2.0.23.dist-info/licenses}/LICENSE +0 -0
- /clearskies/{contexts/bash.py → autodoc/py.typed} +0 -0
- /clearskies/{handlers/exceptions → exceptions}/authentication.py +0 -0
- /clearskies/{handlers/exceptions → exceptions}/authorization.py +0 -0
- /clearskies/{handlers/exceptions → exceptions}/client_error.py +0 -0
- /clearskies/{secrets/exceptions → exceptions}/not_found.py +0 -0
- /clearskies/{tests/__init__.py → input_outputs/py.typed} +0 -0
- /clearskies/{tests/simple_api/__init__.py → py.typed} +0 -0
|
@@ -1,213 +0,0 @@
|
|
|
1
|
-
clearskies/__init__.py,sha256=Iz_VxSgiqM6VtGXoUsB_yVKFy_uWvcf071w803wJ8EE,832
|
|
2
|
-
clearskies/application.py,sha256=_gYGIUGdVE5fAS9dwxRZ1gDpDjqGo7-twVt_VxI6XVE,966
|
|
3
|
-
clearskies/authentication/__init__.py,sha256=e8hJ_gKdKn7dIzHe4Hg3jdUYIzGGSr5aJKnQa3zh-MU,997
|
|
4
|
-
clearskies/authentication/auth0_jwks.py,sha256=bzqNaEoG_iPndwttRXuaKpgkDtgOCLAooyifl0I0ACI,4447
|
|
5
|
-
clearskies/authentication/auth_exception.py,sha256=8Tay3Sim2K8vAZ6ldisSJyRyN0cwX7iyGHwfglSKW_A,41
|
|
6
|
-
clearskies/authentication/authorization.py,sha256=eLzBrXMNr1gYoIBZTd8I6uH3R0CfMMjhvimkJt4Amrs,601
|
|
7
|
-
clearskies/authentication/authorization_pass_through.py,sha256=wrRSY0RyRFifeyRgNn9D-3ptCXjPSbytHB8xAyyFSWE,737
|
|
8
|
-
clearskies/authentication/jwks.py,sha256=AOrCkL7pVznTM6mbrQ3RVHCccws0b_yEtqEOe6NRw5k,3368
|
|
9
|
-
clearskies/authentication/jwks_jwcrypto.py,sha256=PqyQNJZY7P98qgdxNltwCWoPxsaWLDqPuMknB4u2mDc,1732
|
|
10
|
-
clearskies/authentication/public.py,sha256=zNpglAILTU7koz22YaGpMOAtTn_dG8dAP4Q9REdbaOk,630
|
|
11
|
-
clearskies/authentication/secret_bearer.py,sha256=OBkjvw4n-ZLRRtZEKyzdael03DYIwacvUxrj5V9h0Ow,2968
|
|
12
|
-
clearskies/autodoc/__init__.py,sha256=JRUAmd0he8iGlgiZvxewLMIXJqnOFEdvlaKAtHpC2lo,124
|
|
13
|
-
clearskies/autodoc/formats/__init__.py,sha256=3rhoLKmEwT6PljaHvOl9qdeMIXyD7PQBZbqZKy5Mb5I,56
|
|
14
|
-
clearskies/autodoc/formats/oai3_json/__init__.py,sha256=O4kkUc9RbqEc5C5wjirGRjfXdD-0yWXUxjC2E-Cit60,142
|
|
15
|
-
clearskies/autodoc/formats/oai3_json/oai3_json.py,sha256=5Sz4LNYvPT6M49nJ4Y3-DuQ-dE0S0FWfhPdimgjmUh8,2976
|
|
16
|
-
clearskies/autodoc/formats/oai3_json/oai3_schema_resolver.py,sha256=5gifJ36dyWEeYtfjHVbbTpPBo0BB1Gqxt0Y3sxTiHJA,509
|
|
17
|
-
clearskies/autodoc/formats/oai3_json/parameter.py,sha256=1LE-YWU1lG4KwKsUe1sZ0bC_kUp-yBoTHCaky8aiiYg,1070
|
|
18
|
-
clearskies/autodoc/formats/oai3_json/request.py,sha256=ZgEhanj-7va6O4A1m_k5p4udQcLqjnHb-DimRtF32bI,2902
|
|
19
|
-
clearskies/autodoc/formats/oai3_json/response.py,sha256=Oedd5DLWeXjtgqfucWUfo3LtKsTzTZCgYrKZ5OBD3z4,733
|
|
20
|
-
clearskies/autodoc/formats/oai3_json/schema/__init__.py,sha256=VJiDueMdGfJoVQVt9SXIE_-uPghSXtCzpTXuqPaaiRw,173
|
|
21
|
-
clearskies/autodoc/formats/oai3_json/schema/array.py,sha256=1VOrMC_i1JSu1Gw2cqQ7uVDhSk-xNm25io7oBQL9PZM,310
|
|
22
|
-
clearskies/autodoc/formats/oai3_json/schema/default.py,sha256=BhwQebdIaK6rrATu6yZxPU3bqVmd4LFKTTlydJVl644,484
|
|
23
|
-
clearskies/autodoc/formats/oai3_json/schema/enum.py,sha256=7qkpYWXPwbkgkoHPAowMIHJeGNb81qQmTmIIdc5yJbA,265
|
|
24
|
-
clearskies/autodoc/formats/oai3_json/schema/object.py,sha256=-XVQWe5yPBrgXNGUqpihNvPUhodc83bFbKpYl2MxFOM,837
|
|
25
|
-
clearskies/autodoc/formats/oai3_json/test.json,sha256=DdMvSUbaTEAyWtX_RDxEFR82kK9pCCTeFUghQwHjB3s,59848
|
|
26
|
-
clearskies/autodoc/request/__init__.py,sha256=PzlrHbw80M8G9ph7jbsq6Q-IUioBbUXViX-1gdNLFtU,253
|
|
27
|
-
clearskies/autodoc/request/header.py,sha256=mjVPI1C0frAVIH6C4CXuZ5fW2mlBsAu7UGkrG1dc_cc,236
|
|
28
|
-
clearskies/autodoc/request/json_body.py,sha256=j1O6XYdT8NNmm0yspVhLX3EfgVGJI90tv0YYx6uSun8,240
|
|
29
|
-
clearskies/autodoc/request/request.py,sha256=LhGXoVBdLhIrqXQD_63D-5DDbhjTAEL7z3nTjl70pvQ,1322
|
|
30
|
-
clearskies/autodoc/request/url_parameter.py,sha256=JruNymd8-l83R1w-9u3aept6fLUVTfZ7e_f80LMF76E,249
|
|
31
|
-
clearskies/autodoc/request/url_path.py,sha256=RGCpK_UhbB6xHuMWX_sWzsbVMIJPN6j7VgNvG63gTOo,239
|
|
32
|
-
clearskies/autodoc/response/__init__.py,sha256=a0vlujvsyLkq1zleRTqcGULoaXTJLkjyTKCUWdsq8Uc,62
|
|
33
|
-
clearskies/autodoc/response/response.py,sha256=I3-wA1gd5XKYey_7gqBoWA-II4k6URop48NO3ckQoh4,266
|
|
34
|
-
clearskies/autodoc/schema/__init__.py,sha256=jv7g6UN2XXlRzPFTwJjQ4bngOXY7CfE2hc7KxnbbqPk,545
|
|
35
|
-
clearskies/autodoc/schema/array.py,sha256=Zv8hjeEUHqlOc9TosTz6MKgkOsqZQ9T50xl19Y5VY74,269
|
|
36
|
-
clearskies/autodoc/schema/base64.py,sha256=IPISPbUVf02N_fqcxRMsaiBvFTXAznngZxlWSSyHh-w,190
|
|
37
|
-
clearskies/autodoc/schema/boolean.py,sha256=yItE3CoaDeSBJHlT8MszYcS4Ih4wecyTpWQF6c7p2oQ,246
|
|
38
|
-
clearskies/autodoc/schema/date.py,sha256=mFoRON5NOnM-M7W0cNNZt8V8fH_xPYCXd7M250frE7Y,188
|
|
39
|
-
clearskies/autodoc/schema/datetime.py,sha256=kkQf1-_Q5seONKTVNHuUMkjeVdoJ5QeozexYtO9HWhc,197
|
|
40
|
-
clearskies/autodoc/schema/double.py,sha256=ug2DWDBBMhbn1uv3UBi5NvYjyA4XtLXOddO3--lQx10,192
|
|
41
|
-
clearskies/autodoc/schema/enum.py,sha256=CSZoTdQ7SYiNrj-S3RE7mJAYUDHCbh5NGPvhjb-LUYU,392
|
|
42
|
-
clearskies/autodoc/schema/integer.py,sha256=4dO1bsstdV8ip0wtm1a9QJ1CxITglFll6JDTnCWkIJ0,251
|
|
43
|
-
clearskies/autodoc/schema/long.py,sha256=20XZE-4dScxqp0lV1bUYtujISWFEwEo6GOnG6M40aAY,192
|
|
44
|
-
clearskies/autodoc/schema/number.py,sha256=aw1UcA2fdgWL8ao8mbpgd5DgI50c9hli9U8GJyiQ2Zs,249
|
|
45
|
-
clearskies/autodoc/schema/object.py,sha256=GJ5zLw2CzhezQiNuIhVgRyk0esXqfHD5fxZrcn3tUow,383
|
|
46
|
-
clearskies/autodoc/schema/password.py,sha256=Ptj8OeddAL4h69KWqZ6ubZ2awR13xdDIrNe2N0T1jic,196
|
|
47
|
-
clearskies/autodoc/schema/string.py,sha256=oxZPCxYYhWnNHdbtwD3QuniStbj8XbBBpDTFXgPR1VU,244
|
|
48
|
-
clearskies/backends/__init__.py,sha256=ATNzuDYREx-VBWemPmG95FR8EzO2X0--7tkErUuF9Qc,832
|
|
49
|
-
clearskies/backends/api_backend.py,sha256=PQyT00pMtZZUQhfWySzVbXZ2GpycO93CRKVOmUFeo10,15073
|
|
50
|
-
clearskies/backends/api_get_only_backend.py,sha256=KfFF72l31KBK--90lIkDqE5gcTnolSkShUqNaaWZ_gc,1690
|
|
51
|
-
clearskies/backends/backend.py,sha256=fkL-De0MUdzcS2JG_spSUQZIVL9oRFvaL6SP26JPpcI,7399
|
|
52
|
-
clearskies/backends/cursor_backend.py,sha256=VntlPS6z6bnZOC3XRJ-WFf5gK3pFUhH_qJpnZn8hl9U,11278
|
|
53
|
-
clearskies/backends/example_backend.py,sha256=jVpv0LZpNUEJGko0XqioLkHmZHbCW6M4YyNvzKlZcDw,1413
|
|
54
|
-
clearskies/backends/file_backend.py,sha256=tByQdOX1pf6r9-6vRDqOnQ8teRYo0bEWk589qrg598w,1752
|
|
55
|
-
clearskies/backends/json_backend.py,sha256=uDBqkekQadBm0BMoCVuzSPRB-5SjMTCDSAbuIqqwkF8,180
|
|
56
|
-
clearskies/backends/memory_backend.py,sha256=6Ts_NtP9S_QisvpNcQKO0CUqhCRAuL3d5LZYPvSgXW4,20837
|
|
57
|
-
clearskies/backends/restful_api_advanced_search_backend.py,sha256=kBHO7wO_b24pkDXGWbGe0-5efQkkXjP6NQ3EaHC9V-k,3716
|
|
58
|
-
clearskies/backends/secrets_backend.py,sha256=4lzrgdL_O_pgCT5HknV2gotFgp9GzjQ5_2n0-4H4kvs,2204
|
|
59
|
-
clearskies/binding_config.py,sha256=bF8LBNEgJacwKCqToAtDqN9hv5omzU7zt_4qB9KPtE0,457
|
|
60
|
-
clearskies/column_types/__init__.py,sha256=wofhLfyW00I6tb6o9DMsMx7j9hlbbqefhDzWfw0Row0,4731
|
|
61
|
-
clearskies/column_types/audit.py,sha256=K908Gv2GBt8LOsAqz7RLCpyByeLoq1gFT7EOcMAnkQ8,9676
|
|
62
|
-
clearskies/column_types/belongs_to.py,sha256=E7Wi84vr2PnNw7TBCoZa8jkpwiJhO-iQmZ_ekq26kTs,12206
|
|
63
|
-
clearskies/column_types/boolean.py,sha256=1yyM1CUfgD84pPE65c1OP1Qjf_J0Z45hjPrDR51AUkQ,1878
|
|
64
|
-
clearskies/column_types/category_tree.py,sha256=kPx0fNTJxHaaEI_-0JxQ7NBcV2bYgUDGmtf1wmTqoEg,13172
|
|
65
|
-
clearskies/column_types/column.py,sha256=ftuDFswjk-KE9Frxo1rhgkjr4sjSjnUc5ZtfNrnGLIc,15530
|
|
66
|
-
clearskies/column_types/created.py,sha256=LIWSzPJ9rbHuk1u53pNvKtVCOG9y9XCn-mEEsSi97Zc,649
|
|
67
|
-
clearskies/column_types/created_by_authorization_data.py,sha256=--1w1TOSo2CMwrpn6Y_iorl2RTqLgG8MbR8k27qreew,1108
|
|
68
|
-
clearskies/column_types/created_by_header.py,sha256=5sY6vjtra-BrAgUE4zkuLhBtzCVWHNtJPwMozPw_7_s,520
|
|
69
|
-
clearskies/column_types/created_by_ip.py,sha256=wwCUoEwHEVGN89x4xP7NJ6QR85Aum6v3JmxofoQrqtg,395
|
|
70
|
-
clearskies/column_types/created_by_routing_data.py,sha256=EhVorRaGV2OhEb0YSPwPmrsK2NQycYgGEd4ab8-qI2I,569
|
|
71
|
-
clearskies/column_types/created_by_user_agent.py,sha256=sSYDRrqSjsCwcYlhF_s9NO-iDww3PaH6aO2ATp_SKGQ,419
|
|
72
|
-
clearskies/column_types/created_micro.py,sha256=Y_YADPg-TYPfWCFuGbs1b7NeM1Ixi_oBP8OQfJgTI7s,670
|
|
73
|
-
clearskies/column_types/datetime.py,sha256=xtuZpUC9fA16i1oO80kPIx--8RDPuei9RdsDDqensbw,4340
|
|
74
|
-
clearskies/column_types/datetime_micro.py,sha256=ewQSniCc2MmNIyX2XNuNcCIwh5Fpf1HcvpLfzB8lz8g,382
|
|
75
|
-
clearskies/column_types/email.py,sha256=qq0Yo_C3KxUqT68q2HWXocBBR4xwMqjxcIdgZRv218U,584
|
|
76
|
-
clearskies/column_types/float.py,sha256=j8jJeBueSOusPtAFCWgLHYBncfLnqT1U7bh1zcAkYiA,1332
|
|
77
|
-
clearskies/column_types/has_many.py,sha256=vcx6QU-LH-4hh_-LNfDBePt80hIFebSpTreGLh86pVc,7681
|
|
78
|
-
clearskies/column_types/has_one.py,sha256=uphIPUuHLwwmhljLMaKKPujR6TYTT7onn-hHUF6S_IY,2230
|
|
79
|
-
clearskies/column_types/integer.py,sha256=dGIluusPmhLRNg7PplOJLbQI2AXojqRBUHt8ekYWNVI,1386
|
|
80
|
-
clearskies/column_types/json.py,sha256=TbZkdwCoZYhbALUxof2jENGfaq2i5TlcyBcmo7XzDGQ,652
|
|
81
|
-
clearskies/column_types/many_to_many.py,sha256=Yu5wmMkVqRteMrH_8uSZK-bM_IrfDyv6AFb92iJ1FZs,11984
|
|
82
|
-
clearskies/column_types/many_to_many_with_data.py,sha256=NOYjZedeLIWVyDV4BTRyNmhkNHZzx6SkHLFbL-VqHQU,7769
|
|
83
|
-
clearskies/column_types/phone.py,sha256=aUKshuknqcklA0LhUAdIgCslmAXXnWtXln1q5js8Eh8,1611
|
|
84
|
-
clearskies/column_types/select.py,sha256=1oBslTJ_7QCjlFeEcwJVRL-ED4sXwCESVFRAOonvG2I,297
|
|
85
|
-
clearskies/column_types/string.py,sha256=XbHC31TmlW0k86cvdVJBDyowU8Xis6Te6R0rPLXgLpI,863
|
|
86
|
-
clearskies/column_types/timestamp.py,sha256=q_9-zXm8AqJVFpSAvl0O2yqfxPFy4id4TxEh5qRQVmE,2866
|
|
87
|
-
clearskies/column_types/updated.py,sha256=ZSaM97bjFK-vMkPBMo8WnVOgzS77K5mR6KAArC1CbhE,634
|
|
88
|
-
clearskies/column_types/updated_micro.py,sha256=Z39_D574V6rY33UhY8Yruv-KeWw5PJw5yeuUQJfjE4A,655
|
|
89
|
-
clearskies/column_types/uuid.py,sha256=pA6Cd-1QSRuUpz0PxWAGRdG01hW7bpIicOhhJvAvDkQ,711
|
|
90
|
-
clearskies/columns.py,sha256=3PgLopL1l20vVWaUqOJkwXMr06a-gFHEsbExfOWVB4I,5925
|
|
91
|
-
clearskies/condition_parser.py,sha256=IXl51-rDxws7-nAtTVu_m6gTegtpkDnoGAFX2MTPDIo,6589
|
|
92
|
-
clearskies/contexts/__init__.py,sha256=wKNK-SKuAEf7aJ3qX6UUzIbUfJIBSIHCI7cLXZTGGC0,179
|
|
93
|
-
clearskies/contexts/bash.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
94
|
-
clearskies/contexts/build_context.py,sha256=NNZSO55VVWQFcnoLsJUEdZunZA5Y9856tDzS-k-Do5Q,1489
|
|
95
|
-
clearskies/contexts/cli.py,sha256=25GpL2PcuUiqesZx8_chBhyk3dqr4qpitp6xe6N4G7U,1119
|
|
96
|
-
clearskies/contexts/context.py,sha256=0ufURXBDPaoYVuhU-IB8VmHABQlgiQYo5TgUZeXv5to,2589
|
|
97
|
-
clearskies/contexts/convert_to_application.py,sha256=5Y3eocNomUQYVX9kcLdf9vc-hItw1R1ns59bz5P3dbU,9602
|
|
98
|
-
clearskies/contexts/extract_handler.py,sha256=lmWACrV5KbE9vPHPYyg1vz1bWcLwt8WHtgHHL-lXB_k,1896
|
|
99
|
-
clearskies/contexts/test.py,sha256=BEK8ltTGH4sB8oLcBzv-uqzaTEzXzGVVU7qrLGUicwg,3194
|
|
100
|
-
clearskies/contexts/wsgi.py,sha256=6b69s3aHj3ZlL47LEulV-UveZprVXApZgFiN9qkqTxU,834
|
|
101
|
-
clearskies/decorators/__init__.py,sha256=bv515ELZ83cG2MUtOmp7nT9pQxrrBVEkLPKUDYppBbY,936
|
|
102
|
-
clearskies/decorators/auth0_jwks.py,sha256=tIVAJhIfW9h_2yv4BAqW2eVMb1AK4AlKylzBc2aKDBc,681
|
|
103
|
-
clearskies/decorators/authorization.py,sha256=HioRSmyvhaP1-EX6by3IZ-nEdehJPf0R_GUUCo-rP1E,274
|
|
104
|
-
clearskies/decorators/binding_classes.py,sha256=ZPuNTwwZgRW6MNmgOb-XVOzFwWerRyQhn4xOUKmnZ8U,233
|
|
105
|
-
clearskies/decorators/binding_modules.py,sha256=1Lvmv9J5SNBStObF9E0SBJqRwuN3seTJ7zukniVxnTo,233
|
|
106
|
-
clearskies/decorators/bindings.py,sha256=qLSBVwXl65F_sW35M7ux2sZ7eFZaebSDpmJviQGmRaE,224
|
|
107
|
-
clearskies/decorators/create.py,sha256=LtweHH3uFvr-J-zIFYyAGzAe87cna9FnxRx7ADppMr0,276
|
|
108
|
-
clearskies/decorators/delete.py,sha256=Jku2QrORuq21k_c3GYsVROxmzZS5dhuLU96y_pr8FT8,276
|
|
109
|
-
clearskies/decorators/docs.py,sha256=JPGxLjPmszAZbxJwPYiXhZkmYFNJksMFk0-o0JEh5ek,441
|
|
110
|
-
clearskies/decorators/get.py,sha256=oIt4-XM4eiZZ7yGt41Jjt1jU2qkCrCWdD3dGZaY7q6k,270
|
|
111
|
-
clearskies/decorators/jwks.py,sha256=GzaDppYS0PcTyoJgKcehmcAboBLknTfIMryxnmVE72o,811
|
|
112
|
-
clearskies/decorators/merge.py,sha256=o6FFh-0t25PBygphQ2DHdlkSeNe4aoPH1-iZ13DNA8U,5634
|
|
113
|
-
clearskies/decorators/patch.py,sha256=izjlpe1OH0w-8fdxJKJaby6iYLc0xsvjuQtWT2AxS9Y,274
|
|
114
|
-
clearskies/decorators/post.py,sha256=IE_rKkb-Xi1uMcDtTeyc7j1g7pMhbsznYQQOtdQncHY,272
|
|
115
|
-
clearskies/decorators/public.py,sha256=5tzn7sKw3gnReH3OrZUSPgVPiNjclqoxwCArxnxW_wY,318
|
|
116
|
-
clearskies/decorators/response_headers.py,sha256=TXV4IpX-EIooPLiQ9eHUzGKbPGXh8xq5cdGpGRC9ag0,298
|
|
117
|
-
clearskies/decorators/return_raw_response.py,sha256=o_nT2nc9cLg6k039Bph_BQLHkpg8dEQPxCK1Jc8hJoc,236
|
|
118
|
-
clearskies/decorators/schema.py,sha256=X7TEqIA_bzq0MYeEQ84xbcFSbZnKO6tG22466xUE0W4,303
|
|
119
|
-
clearskies/decorators/secret_bearer.py,sha256=iytP9fsTbxzLl-KtgG9-23iwNImusJlfCHuUY__pJ-U,772
|
|
120
|
-
clearskies/decorators/security_headers.py,sha256=Spk53FL4epHDSLQeGNTWO9R6QC63psqAThHM-xGGuj0,269
|
|
121
|
-
clearskies/di/__init__.py,sha256=T7SgQNny2XAZQPeFkdmp1XxxmEVxtnpcRiGK8YflkwU,304
|
|
122
|
-
clearskies/di/additional_config.py,sha256=PGWV-diJyqlx7WtYr4xV2Uo5W0-f4rmwdPWJRXq6V_8,592
|
|
123
|
-
clearskies/di/additional_config_auto_import.py,sha256=m57IODPbnCAus9iDu3mDp42u4H87oPZvjAlBGoS8uRQ,111
|
|
124
|
-
clearskies/di/di.py,sha256=Yo-wxQTD8pPeBxmfraWs1-ripf_Jd_G82YvQOC2GhUc,15725
|
|
125
|
-
clearskies/di/standard_dependencies.py,sha256=4cxWRjru5uKLW_1IJHKAgVu2cqc9gPcV0vZVm4HQxNg,4764
|
|
126
|
-
clearskies/di/test_module/__init__.py,sha256=7YHQF7JHP0FdI7GdEGANSZ_t1EISQYhUNm1wqOg0NKw,88
|
|
127
|
-
clearskies/di/test_module/another_module/__init__.py,sha256=8SRmHPDepLKGWTUSc1ucDF6U8mJPsNDsBDmBQCpzPWo,35
|
|
128
|
-
clearskies/di/test_module/module_class.py,sha256=I_-wnMuHfbsvti-7d2Z4bXnr6deo__uvww9nds9qrlE,46
|
|
129
|
-
clearskies/environment.py,sha256=n2IMpNMakHJ7KJJ7sEQlxd4jfzAzqejxcTKxElyo1Us,3591
|
|
130
|
-
clearskies/functional/__init__.py,sha256=em6xhpGOws_egf6jWfeQlxq0Vm5gYzsbMNt_rxTZzqk,95
|
|
131
|
-
clearskies/functional/string.py,sha256=HHXou_lyjntX7SMi0-hfe91Kk3grxQnU-7oi4Lon35Q,3015
|
|
132
|
-
clearskies/functional/validations.py,sha256=f1fTQ4rdFZouxoovAPg-YAgf0Q0QNpKEzxWWL7EFUHI,645
|
|
133
|
-
clearskies/handlers/__init__.py,sha256=9tH0zk4g7Mt22opD1NlynqXwwMX2DHzLmAVihZsJsfU,1011
|
|
134
|
-
clearskies/handlers/advanced_search.py,sha256=UbWDntGAGD5NM61yKEws5MfG0Xy3K_fn-i-X9FG-mKs,13746
|
|
135
|
-
clearskies/handlers/base.py,sha256=aFRm5R6oDJWO4TTxz9BusxuDF3aH_-QVGJUP9atNzLc,22787
|
|
136
|
-
clearskies/handlers/callable.py,sha256=SLgCln-6jvZJjmBOlxrnRXamICM_Wj3zY5Uah4_Wutg,8269
|
|
137
|
-
clearskies/handlers/create.py,sha256=xj_hVYma2sKDK5Vq_R9wo8f0ZXfGlXTkYU71AMyKF2U,1232
|
|
138
|
-
clearskies/handlers/crud_by_method.py,sha256=BOkPX-LUvQrbRLSbyTfRh4c8nPF51dZEXSKOl7m9ZYA,435
|
|
139
|
-
clearskies/handlers/database_connector.py,sha256=XLF_Y3aYnjDtOVP_MOtT5mbI3lHR8S-viOxPiqEAamE,1050
|
|
140
|
-
clearskies/handlers/delete.py,sha256=nXzEuOPI6GEvuiqA5baO2iNEjETsGqNXfRDRj-C1nhc,2247
|
|
141
|
-
clearskies/handlers/exceptions/__init__.py,sha256=pNQ8peBcHOJIpVNgcZXblG0erXZjH8kBU0ZsWMv8wIw,190
|
|
142
|
-
clearskies/handlers/exceptions/authentication.py,sha256=VlNS0Aq2_6LbG0jiE8jULpS54jNW8a8px0gPrK3EZCc,42
|
|
143
|
-
clearskies/handlers/exceptions/authorization.py,sha256=14JuU5zLEf2sv82VNxsJt7dGSwfP-t3Pvf_6QZuacfA,41
|
|
144
|
-
clearskies/handlers/exceptions/client_error.py,sha256=o1OGnjlXT5zZ1Vb2LTRPYIio0YAnXPpXDGuqSLQP9_Y,39
|
|
145
|
-
clearskies/handlers/exceptions/input_error.py,sha256=kmEVv9LNIalLKD9GF-olsD39Z94abHGkB54NskOG6g4,136
|
|
146
|
-
clearskies/handlers/exceptions/not_found.py,sha256=xThOXiMfyYBaI2bhfOhpVoZ_vdw1hU8A_HxHenPqHzo,96
|
|
147
|
-
clearskies/handlers/get.py,sha256=x9SogDd2ZvIYwv2UkNa_FUmmKMNd9XPadkbnBKbyTGo,6892
|
|
148
|
-
clearskies/handlers/health_check.py,sha256=m6H3psUql-I7hZao3fsxjrZnCjFJZ1ROTF-41g8Syww,2078
|
|
149
|
-
clearskies/handlers/input_processing.py,sha256=edtG6NQJZCte0Nq-j7SUMzp6vxgIIbLxeUGscWOALAs,3814
|
|
150
|
-
clearskies/handlers/list.py,sha256=RdhvcVA4ZgkdmOHl6iGBC-2jPhjYay0_kFHttmVoq9Q,25466
|
|
151
|
-
clearskies/handlers/mygrations.py,sha256=4iKpJKooqgNtAURwMl_FgsXUt8OYOaG_TY1OV1llQxY,2759
|
|
152
|
-
clearskies/handlers/request_method_routing.py,sha256=DgPEz3tgbaUkXHsOriPbIctfSf4Gm4NxfRdVulH91Kg,1636
|
|
153
|
-
clearskies/handlers/restful_api.py,sha256=1rJ2REX1sTAdbqaRuCclP375agrho4zNNQx6hXGa4nQ,9258
|
|
154
|
-
clearskies/handlers/routing.py,sha256=uWKWcEaiHVqfDebPkQVuG9AS8pOixW31wW0yIQ-25Aw,3079
|
|
155
|
-
clearskies/handlers/schema_helper.py,sha256=62644USvFlZu_6tT7rb-k6t_5J3Q0uZsJwP5KREk_WM,4961
|
|
156
|
-
clearskies/handlers/simple_routing.py,sha256=xMVfBas51pZOP8xvDmeH6L-iO6CGIrICyT5yUYceJOs,9550
|
|
157
|
-
clearskies/handlers/simple_routing_route.py,sha256=3U3dixEKuf-Xo88RQGH_grm1x79-px6idt1-xaLUSiY,8953
|
|
158
|
-
clearskies/handlers/simple_search.py,sha256=bSfq8rzdqkBj-dTGUBSZ1EkfjzUWHID7mKD2xEf8VzQ,6165
|
|
159
|
-
clearskies/handlers/update.py,sha256=rx8HW87Pfh95e_9nEfKKnxfkh2HBlCUdYqVwljtXiJ8,4116
|
|
160
|
-
clearskies/handlers/write.py,sha256=Gu1w1PQ1F7tlqCqALorMRek3UH6IkViPIO195dxPd8k,9372
|
|
161
|
-
clearskies/input_outputs/__init__.py,sha256=mQWL-u41FRTrPGuHe8FhLmcHjAEaUxjFwUf7RgDcbAs,182
|
|
162
|
-
clearskies/input_outputs/cli.py,sha256=DCoSHn2fd7cwi4-3eZU_M0-Txk85PQNB1x6D_B50f1M,6529
|
|
163
|
-
clearskies/input_outputs/exceptions/__init__.py,sha256=bc5Tc1XBZnqA1fKbk7pk5hyx102vqx3sDE19E03xGk4,82
|
|
164
|
-
clearskies/input_outputs/exceptions/cli_input_error.py,sha256=kOFU8aLTLmeTL_AKDshxMu8_ufildg6p8ndhE1xHfb0,41
|
|
165
|
-
clearskies/input_outputs/exceptions/cli_not_found.py,sha256=JBBuZA9ZwdkPhd3a0qaGgEPQrxh1fehy4R3ZaV2gWXU,39
|
|
166
|
-
clearskies/input_outputs/input_output.py,sha256=vYKn9SE5erS4LuOhhAsXqaOEsGXwZ1NJ4v85KN1Xg6A,4501
|
|
167
|
-
clearskies/input_outputs/wsgi.py,sha256=9p82eJP5FUAI6jbIojvydG3_9gncX7vcUACQMyRN9x4,3142
|
|
168
|
-
clearskies/input_requirements/__init__.py,sha256=cciSC614VlYsCeTBX69ZCBU6QByT8NNlzWu_n2SVieY,2106
|
|
169
|
-
clearskies/input_requirements/after.py,sha256=TXy8bIVz_77a8oJuohPwoM5E--AOVWsOSjjh5PpA2Ys,1544
|
|
170
|
-
clearskies/input_requirements/before.py,sha256=iLg-Hub9iW2eP19s5fkPrA9TCT_-DTm5KoxgA8ho0-k,1547
|
|
171
|
-
clearskies/input_requirements/in_the_future_at_least.py,sha256=PLVp_2Yv-1ScKnajlc9hjG7qYZhadKXHNTkRP7WKUdo,739
|
|
172
|
-
clearskies/input_requirements/in_the_future_at_most.py,sha256=L5Oz47KAHv5WL6Nu2vGkql6q8Ha9IKJMj-uxQkyuIdc,737
|
|
173
|
-
clearskies/input_requirements/in_the_past_at_least.py,sha256=ES0SgtADHcu7HZDdvIFyD9vpYTnrd4hBi03OShqUZg4,735
|
|
174
|
-
clearskies/input_requirements/in_the_past_at_most.py,sha256=hvhn_K1X4f7pbpFhjavR6Mu48JhhYcEIUx44YWfa_7E,733
|
|
175
|
-
clearskies/input_requirements/maximum_length.py,sha256=7hdGVq914BtZQwiGOLOU-t5QTDNQtCPT4TOnYTUo3Wo,689
|
|
176
|
-
clearskies/input_requirements/maximum_value.py,sha256=R9xyup70a3migJdUKmflpZnQMHShcCqyibOewh78D84,663
|
|
177
|
-
clearskies/input_requirements/minimum_length.py,sha256=qSpLjNBu6AKRoBZi3jvCMYKsHwsknbkUk86C8CMIOEU,987
|
|
178
|
-
clearskies/input_requirements/minimum_value.py,sha256=PNZShiy_cFjwoRejjZmN_INp7EtmzmX1RQp3JfyYBMg,664
|
|
179
|
-
clearskies/input_requirements/required.py,sha256=luYP527YPkQIVNVPhnNztOI0UxO67gNqn3FiLBId1YE,1133
|
|
180
|
-
clearskies/input_requirements/requirement.py,sha256=5wUywAvbEQPh9tpfwWX3gdi4dwI-Xs9ePyC30qvwPaQ,584
|
|
181
|
-
clearskies/input_requirements/time_delta.py,sha256=lqajxGEp2zZB_Rk-dG8eWgpljbuph1yqZMuylYRYJKs,1247
|
|
182
|
-
clearskies/input_requirements/unique.py,sha256=gpbm9uoXcy8WCHsuWqAotwockbjDfJOWitIbK_3ngN0,777
|
|
183
|
-
clearskies/mocks/__init__.py,sha256=T68OUB9gGCX0WoisGzsY3Bt2cCFX7ILHKPqi6XKTJM0,113
|
|
184
|
-
clearskies/mocks/input_output.py,sha256=2wD5GbUyVSkXcBg1GTZ-Oz9VzcYxNHfTlmZAODW-7CI,3898
|
|
185
|
-
clearskies/mocks/models.py,sha256=DCzsnMddBvPoBA8JwwbSOhzY7enQWrosgeYD4gx2deI,5124
|
|
186
|
-
clearskies/model.py,sha256=FBaKfbBhtBMfl0IE1Ak4aLtXZUF7pXTbuZb7B1lXu5o,13535
|
|
187
|
-
clearskies/models.py,sha256=XlNeCu6tGhyAzJ-z9cOX9PXusogljLqgZACtFiL-RnM,13037
|
|
188
|
-
clearskies/secrets/__init__.py,sha256=ctTmA_etV9G_5U21APWENI1HvThrBS4DidGWRtEDHQs,1053
|
|
189
|
-
clearskies/secrets/additional_configs/__init__.py,sha256=cFCrbtKF5nuR061S2y1iKZp349x-y8Srdwe3VZbfSFU,1119
|
|
190
|
-
clearskies/secrets/additional_configs/mysql_connection_dynamic_producer.py,sha256=fOt2eOrVtQXhnK05XuSfWw9GoX6klxXLisJcFT0ycAE,2562
|
|
191
|
-
clearskies/secrets/additional_configs/mysql_connection_dynamic_producer_via_ssh_cert_bastion.py,sha256=5vUq9_wA8kRNvaRrA-81MjtN4WhiIrZXJ-W9cK4FcnE,6159
|
|
192
|
-
clearskies/secrets/akeyless.py,sha256=_alb1k72AX1vRHFpJWDbQSlylpvpGWW5lBcL4LPoh2w,8784
|
|
193
|
-
clearskies/secrets/exceptions/__init__.py,sha256=j-SLHD-DL0CT4cZXibD9kXHk63JEl_UKX6xL_nq1EfE,32
|
|
194
|
-
clearskies/secrets/exceptions/not_found.py,sha256=_lZwovDrd18dUHDop5pF4mhexBPNr126xF2gOLA2-EA,36
|
|
195
|
-
clearskies/secrets/secrets.py,sha256=eY2cl5U6DVy2vpFTQFjSBtyU4dzQEX228BeNyMk-b7s,1439
|
|
196
|
-
clearskies/security_headers/__init__.py,sha256=rj1xEQPJQWblHYyOaBdhLQC_3lCZ-RNAL38-z8-F3wc,179
|
|
197
|
-
clearskies/security_headers/base.py,sha256=pY3CyISjbO-Sl2TNlz79qhKqQu-akvDS3FfaiDpyGUI,243
|
|
198
|
-
clearskies/security_headers/cache_control.py,sha256=nvDpObXZnJ8MuhutmuEznorjLxRzP8QDRYPPHQR3l7k,3705
|
|
199
|
-
clearskies/security_headers/cors.py,sha256=m_DXgiCtxm17cRltCRqLvZzsiqwp6eO-B7f-l2NTfUg,3706
|
|
200
|
-
clearskies/security_headers/csp.py,sha256=A9LEF87xZ_9_xplFm7dXNUYs52cTiiokAXjJpKIYGg4,4372
|
|
201
|
-
clearskies/security_headers/hsts.py,sha256=3VtHZk84SqrNRrN6iuBOVFGxqm4iXiTmFt0FNqtodWc,765
|
|
202
|
-
clearskies/security_headers/x_content_type_options.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
203
|
-
clearskies/security_headers/x_frame_options.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
204
|
-
clearskies/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
205
|
-
clearskies/tests/simple_api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
206
|
-
clearskies/tests/simple_api/models/__init__.py,sha256=nUA0W6fgXw_Bxa9CudkaDkC80tiLphNdbpp2BLgzkas,50
|
|
207
|
-
clearskies/tests/simple_api/models/status.py,sha256=PEhPbaQh5qdUNHp8O0gz91LOLENAEBtqSaHxUPXchaM,699
|
|
208
|
-
clearskies/tests/simple_api/models/user.py,sha256=5_P4Tp1tTdX7PkMJ__epPM5MA7JAeVYGas69vcWloLc,819
|
|
209
|
-
clearskies/tests/simple_api/users_api.py,sha256=KYXCgEofDxHeRdQK67txN5oYUPvxxmB8JTku7L-apk4,2344
|
|
210
|
-
clear_skies-1.22.10.dist-info/LICENSE,sha256=3Ehd0g3YOpCj8sqj0Xjq5qbOtjjgk9qzhhD9YjRQgOA,1053
|
|
211
|
-
clear_skies-1.22.10.dist-info/METADATA,sha256=9Kn8gYBykMA7LYc7EbWQ8PmMTfES_Ia7wFi2uWd6Y3g,1818
|
|
212
|
-
clear_skies-1.22.10.dist-info/WHEEL,sha256=d2fvjOD7sXsVzChCqf0Ty0JbHKBaLYwDbGQDwQTnJ50,88
|
|
213
|
-
clear_skies-1.22.10.dist-info/RECORD,,
|
clearskies/application.py
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
class Application:
|
|
2
|
-
handler_class = None
|
|
3
|
-
handler_config = None
|
|
4
|
-
di_class = None
|
|
5
|
-
bindings = None
|
|
6
|
-
binding_classes = None
|
|
7
|
-
binding_modules = None
|
|
8
|
-
additional_configs = None
|
|
9
|
-
|
|
10
|
-
def __init__(
|
|
11
|
-
self,
|
|
12
|
-
handler_class,
|
|
13
|
-
handler_config,
|
|
14
|
-
di_class=None,
|
|
15
|
-
bindings=None,
|
|
16
|
-
binding_classes=None,
|
|
17
|
-
binding_modules=None,
|
|
18
|
-
additional_configs=None,
|
|
19
|
-
):
|
|
20
|
-
"""
|
|
21
|
-
This will probably need to do more eventually, but right now this will do it
|
|
22
|
-
"""
|
|
23
|
-
self.handler_class = handler_class
|
|
24
|
-
self.handler_config = handler_config
|
|
25
|
-
self.di_class = di_class
|
|
26
|
-
self.bindings = {} if bindings is None else bindings
|
|
27
|
-
self.binding_classes = [] if binding_classes is None else binding_classes
|
|
28
|
-
self.binding_modules = [] if binding_modules is None else binding_modules
|
|
29
|
-
self.additional_configs = [] if additional_configs is None else additional_configs
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
from ..handlers.exceptions import ClientError
|
|
2
|
-
import datetime
|
|
3
|
-
from .. import autodoc
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
class Auth0JWKS:
|
|
7
|
-
is_public = False
|
|
8
|
-
can_authorize = True
|
|
9
|
-
has_dynamic_credentials = True
|
|
10
|
-
_environment = None
|
|
11
|
-
_requests = None
|
|
12
|
-
_jose_jwt = None
|
|
13
|
-
_auth0_domain = None
|
|
14
|
-
_jwks = None
|
|
15
|
-
_jwks_fetched = None
|
|
16
|
-
_algorithms = None
|
|
17
|
-
_audience = None
|
|
18
|
-
_documentation_security_name = None
|
|
19
|
-
|
|
20
|
-
def __init__(self, environment, requests, jose_jwt):
|
|
21
|
-
self._environment = environment
|
|
22
|
-
self._requests = requests
|
|
23
|
-
self._jose_jwt = jose_jwt
|
|
24
|
-
|
|
25
|
-
def configure(self, audience=None, auth0_domain=None, algorithms=None, documentation_security_name=None):
|
|
26
|
-
if auth0_domain:
|
|
27
|
-
self._auth0_domain = auth0_domain
|
|
28
|
-
if audience:
|
|
29
|
-
self._audience = audience
|
|
30
|
-
self._algorithms = ["RS256"] if algorithms is None else algorithms
|
|
31
|
-
self._documentation_security_name = documentation_security_name
|
|
32
|
-
|
|
33
|
-
def headers(self, retry_auth=False):
|
|
34
|
-
raise NotImplemented()
|
|
35
|
-
|
|
36
|
-
def authenticate(self, input_output):
|
|
37
|
-
if not self._auth0_domain:
|
|
38
|
-
raise ValueError("Must set _auth0_domain in config when using Auth0JWKS for endpoint authorization")
|
|
39
|
-
if not self._audience:
|
|
40
|
-
raise ValueError("Must set audience in config when using Auth0JWKS for endpoint authorization")
|
|
41
|
-
|
|
42
|
-
auth_header = input_output.get_request_header("authorization", True)
|
|
43
|
-
if not auth_header:
|
|
44
|
-
raise ClientError("Missing 'Authorization' header in request")
|
|
45
|
-
if auth_header[:7].lower() != "bearer ":
|
|
46
|
-
raise ClientError("Missing 'Bearer ' prefix in authorization header")
|
|
47
|
-
self.validate_jwt(auth_header[7:])
|
|
48
|
-
input_output.set_authorization_data(self.jwt_claims)
|
|
49
|
-
return True
|
|
50
|
-
|
|
51
|
-
def set_headers_for_cors(self, cors):
|
|
52
|
-
cors.add_header("Authorization")
|
|
53
|
-
|
|
54
|
-
def validate_jwt(self, raw_jwt):
|
|
55
|
-
try:
|
|
56
|
-
unverified_header = self._jose_jwt.get_unverified_header(raw_jwt)
|
|
57
|
-
except self._jose_jwt.JWTError as e:
|
|
58
|
-
raise ClientError(str(e))
|
|
59
|
-
jwks = self._get_jwks()
|
|
60
|
-
# find a matching key in the JWKS for the key in the JWT
|
|
61
|
-
rsa_key = next((key for key in jwks["keys"] if key["kid"] == unverified_header["kid"]), False)
|
|
62
|
-
if not rsa_key:
|
|
63
|
-
raise ClientError("No matching keys found")
|
|
64
|
-
|
|
65
|
-
try:
|
|
66
|
-
self.jwt_claims = self._jose_jwt.decode(
|
|
67
|
-
raw_jwt,
|
|
68
|
-
rsa_key,
|
|
69
|
-
algorithms=self._algorithms,
|
|
70
|
-
audience=self._audience,
|
|
71
|
-
issuer=f"https://{self._auth0_domain}/",
|
|
72
|
-
)
|
|
73
|
-
except self._jose_jwt.ExpiredSignatureError:
|
|
74
|
-
raise ClientError("JWT is expired")
|
|
75
|
-
except self._jose_jwt.JWTClaimsError:
|
|
76
|
-
raise ClientError("JWT has incorrect claims: double check the audience and issuer")
|
|
77
|
-
except Exception:
|
|
78
|
-
raise ClientError("Unable to parse JWT")
|
|
79
|
-
return True
|
|
80
|
-
|
|
81
|
-
def _get_jwks(self):
|
|
82
|
-
now = datetime.datetime.now()
|
|
83
|
-
if self._jwks is None or ((now - self._jwks_fetched).total_seconds() > 86400):
|
|
84
|
-
self._jwks = self._requests.get(f"https://{self._auth0_domain}/.well-known/jwks.json").json()
|
|
85
|
-
self._jwks_fetched = now
|
|
86
|
-
|
|
87
|
-
return self._jwks
|
|
88
|
-
|
|
89
|
-
def authorize(self, authorization):
|
|
90
|
-
# we're either passed in a callable, which we pass our claims to, or a dictionary with key/value pairs
|
|
91
|
-
# that we check against our claims
|
|
92
|
-
if callable(authorization):
|
|
93
|
-
return authorization(self.jwt_claims)
|
|
94
|
-
|
|
95
|
-
for key, value in authorization.items():
|
|
96
|
-
if key not in self.jwt_claims:
|
|
97
|
-
return False
|
|
98
|
-
if value != self.jwt_claims[key]:
|
|
99
|
-
return False
|
|
100
|
-
return True
|
|
101
|
-
|
|
102
|
-
def documentation_security_scheme(self):
|
|
103
|
-
return {
|
|
104
|
-
"type": "oauth2",
|
|
105
|
-
"description": "Authentication with Auth0",
|
|
106
|
-
"name": "authorization",
|
|
107
|
-
"in": "header",
|
|
108
|
-
"scheme": "bearer",
|
|
109
|
-
"bearerFormat": "JWT",
|
|
110
|
-
"flows": {"implicit": {"authorizationUrl": f"https://{self._auth0_domain}/authorize", "scopes": {}}},
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
def documentation_security_scheme_name(self):
|
|
114
|
-
return (
|
|
115
|
-
self._documentation_security_name
|
|
116
|
-
if self._documentation_security_name is not None
|
|
117
|
-
else self._auth0_domain.split(".")[0]
|
|
118
|
-
)
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import datetime
|
|
2
|
-
import json
|
|
3
|
-
|
|
4
|
-
from clearskies.authentication import JWKS
|
|
5
|
-
from clearskies.handlers.exceptions import ClientError
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
class JWKSJwCrypto(JWKS):
|
|
9
|
-
def __init__(self, environment, requests):
|
|
10
|
-
# the third parameter is supposed to be jose_jwt, but we're going to override all
|
|
11
|
-
# the functions that use it
|
|
12
|
-
super().__init__(environment, requests, {})
|
|
13
|
-
|
|
14
|
-
def validate_jwt(self, raw_jwt):
|
|
15
|
-
from jwcrypto import jws, jwk, jwt
|
|
16
|
-
from jwcrypto.common import JWException
|
|
17
|
-
|
|
18
|
-
keys = jwk.JWKSet()
|
|
19
|
-
keys.import_keyset(json.dumps(self._get_jwks()))
|
|
20
|
-
|
|
21
|
-
client_jwt = jwt.JWT()
|
|
22
|
-
try:
|
|
23
|
-
client_jwt.deserialize(raw_jwt)
|
|
24
|
-
except Exception as e:
|
|
25
|
-
raise ClientError(str(e))
|
|
26
|
-
|
|
27
|
-
try:
|
|
28
|
-
client_jwt.validate(keys)
|
|
29
|
-
self.jwt_claims = json.loads(client_jwt.claims)
|
|
30
|
-
except JWException as e:
|
|
31
|
-
raise ClientError(str(e))
|
|
32
|
-
|
|
33
|
-
if self._issuer and self.jwt_claims.get("iss") != self._issuer:
|
|
34
|
-
raise ClientError("Issuer does not match")
|
|
35
|
-
|
|
36
|
-
if self._audience:
|
|
37
|
-
jwt_audience = self.jwt_claims.get("aud")
|
|
38
|
-
if not jwt_audience:
|
|
39
|
-
raise ClientError("Audience does not match")
|
|
40
|
-
if isinstance(jwt_audience, str):
|
|
41
|
-
jwt_audience = [jwt_audience]
|
|
42
|
-
if not isinstance(jwt_audience, list):
|
|
43
|
-
raise ClientError("I don't understand the audience in that JWT")
|
|
44
|
-
has_match = False
|
|
45
|
-
for audience in jwt_audience:
|
|
46
|
-
if audience == self._audience:
|
|
47
|
-
has_match = True
|
|
48
|
-
if not has_match:
|
|
49
|
-
raise ClientError("Audience does not match")
|
|
50
|
-
|
|
51
|
-
return True
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
from .api_backend import ApiBackend
|
|
2
|
-
from typing import Any, Dict
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
class ApiGetOnlyBackend(ApiBackend):
|
|
6
|
-
_requests = None
|
|
7
|
-
_auth = None
|
|
8
|
-
_id_column_name = None
|
|
9
|
-
|
|
10
|
-
_allowed_configs = [
|
|
11
|
-
"wheres",
|
|
12
|
-
"table_name",
|
|
13
|
-
"model_columns",
|
|
14
|
-
"select_all",
|
|
15
|
-
]
|
|
16
|
-
|
|
17
|
-
def __init__(self, requests):
|
|
18
|
-
self._requests = requests
|
|
19
|
-
|
|
20
|
-
def configure(self, auth=None, origin="", id_column_name="id"):
|
|
21
|
-
self._auth = auth
|
|
22
|
-
self._origin = origin
|
|
23
|
-
self._id_column_name = id_column_name
|
|
24
|
-
|
|
25
|
-
def records_url(self, configuration):
|
|
26
|
-
if not len(configuration["wheres"]):
|
|
27
|
-
raise ValueError(
|
|
28
|
-
f"When using the {self.__class__.__name__} backend, you must search the model by the id column. A records request was executed but no search conditions were found."
|
|
29
|
-
)
|
|
30
|
-
record_id = None
|
|
31
|
-
for where in configuration["wheres"]:
|
|
32
|
-
if where["column"] == self._id_column_name:
|
|
33
|
-
record_id = where["values"][0]
|
|
34
|
-
if not record_id:
|
|
35
|
-
raise ValueError(
|
|
36
|
-
f"When using the {self.__class__.__name__} backend, you must search by the id column ('{self._id_column_name}'). A records request was executed but there was no condition set for the '{self._id_column_name}' column"
|
|
37
|
-
)
|
|
38
|
-
|
|
39
|
-
return self._origin + configuration["table_name"].strip("/") + f"/{record_id}"
|
|
40
|
-
|
|
41
|
-
def records_method(self, configuration: Dict[str, Any]) -> str:
|
|
42
|
-
return "GET"
|
|
43
|
-
|
|
44
|
-
def _map_records_response(self, json):
|
|
45
|
-
response = super()._map_records_response(json)
|
|
46
|
-
if isinstance(response, dict):
|
|
47
|
-
return [response]
|
|
48
|
-
return response
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
from . import memory_backend
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
class ExampleBackend(memory_backend.MemoryBackend):
|
|
5
|
-
_tables = None
|
|
6
|
-
_silent_on_missing_tables = False
|
|
7
|
-
data = None
|
|
8
|
-
|
|
9
|
-
def configure(self, data=None):
|
|
10
|
-
if not data:
|
|
11
|
-
raise ValueError("You must provide 'data' to the example backend configuration to use it")
|
|
12
|
-
self.data = data
|
|
13
|
-
|
|
14
|
-
def create_table(self, model):
|
|
15
|
-
model = self.cheez_model(model)
|
|
16
|
-
file_name = model.table_name()
|
|
17
|
-
if file_name in self._tables:
|
|
18
|
-
return
|
|
19
|
-
|
|
20
|
-
table_data = []
|
|
21
|
-
id_index = {}
|
|
22
|
-
record_index = 0
|
|
23
|
-
table = memory_backend.MemoryTable(model)
|
|
24
|
-
id_column_name = model.id_column_name
|
|
25
|
-
for row_index, data in enumerate(self.data):
|
|
26
|
-
record_id = data.get(id_column_name)
|
|
27
|
-
if not record_id:
|
|
28
|
-
print(
|
|
29
|
-
f"Missing id column, '{id_column_name}', for record row #{row_index+1} in file '{file_name}'. Skipping."
|
|
30
|
-
)
|
|
31
|
-
continue
|
|
32
|
-
|
|
33
|
-
table_data.append(data)
|
|
34
|
-
id_index[record_id] = record_index
|
|
35
|
-
record_index += 1
|
|
36
|
-
|
|
37
|
-
table._id_index = id_index
|
|
38
|
-
table._rows = table_data
|
|
39
|
-
self._tables[file_name] = table
|
|
40
|
-
|
|
41
|
-
def records(self, configuration, model, next_page_data=None):
|
|
42
|
-
self.create_table(model)
|
|
43
|
-
return super().records(configuration, model, next_page_data=next_page_data)
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
from . import memory_backend
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
class FileBackend(memory_backend.MemoryBackend):
|
|
5
|
-
_tables = None
|
|
6
|
-
_silent_on_missing_tables = False
|
|
7
|
-
|
|
8
|
-
def create_table(self, model):
|
|
9
|
-
model = self.cheez_model(model)
|
|
10
|
-
file_name = model.table_name()
|
|
11
|
-
if file_name in self._tables:
|
|
12
|
-
return
|
|
13
|
-
|
|
14
|
-
with open(file_name, "r") as fp:
|
|
15
|
-
records = self.transform_data_from_file(fp.read())
|
|
16
|
-
table = memory_backend.MemoryTable(model)
|
|
17
|
-
id_column_name = model.id_column_name
|
|
18
|
-
|
|
19
|
-
if type(records) != list:
|
|
20
|
-
raise ValueError(
|
|
21
|
-
f"To use the file backend, the transform_data_from_file function should return a list of dictionaries. Something else found in '{file_name}' for backend '{self.__class__.__name__}'"
|
|
22
|
-
)
|
|
23
|
-
|
|
24
|
-
table_data = []
|
|
25
|
-
id_index = {}
|
|
26
|
-
record_index = 0
|
|
27
|
-
for row_index, data in enumerate(records):
|
|
28
|
-
record_id = data.get(id_column_name)
|
|
29
|
-
if not record_id:
|
|
30
|
-
print(
|
|
31
|
-
f"Missing id column, '{id_column_name}', for record row #{row_index+1} in file '{file_name}'. Skipping."
|
|
32
|
-
)
|
|
33
|
-
continue
|
|
34
|
-
|
|
35
|
-
table_data.append(data)
|
|
36
|
-
id_index[record_id] = record_index
|
|
37
|
-
record_index += 1
|
|
38
|
-
|
|
39
|
-
table._id_index = id_index
|
|
40
|
-
table._rows = table_data
|
|
41
|
-
self._tables[file_name] = table
|
|
42
|
-
|
|
43
|
-
def transform_data_from_file(self, file_contents):
|
|
44
|
-
raise NotImplementedError("You must define how to transform the file contents to a list of dicts")
|
|
45
|
-
|
|
46
|
-
def records(self, configuration, model, next_page_data=None):
|
|
47
|
-
self.create_table(model)
|
|
48
|
-
return super().records(configuration, model, next_page_data=next_page_data)
|