ul-api-utils 9.4.0__tar.gz → 10.0.0.dev2__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.
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/PKG-INFO +48 -13
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/README.md +6 -6
- ul_api_utils-10.0.0.dev2/pyproject.toml +106 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/commands/cmd_start.py +3 -10
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils.egg-info/PKG-INFO +49 -14
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils.egg-info/SOURCES.txt +1 -21
- ul_api_utils-10.0.0.dev2/ul_api_utils.egg-info/requires.txt +38 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils.egg-info/top_level.txt +0 -1
- ul_api_utils-9.4.0/example/conf.py +0 -35
- ul_api_utils-9.4.0/example/main.py +0 -28
- ul_api_utils-9.4.0/example/permissions.py +0 -6
- ul_api_utils-9.4.0/example/pure_flask_example.py +0 -65
- ul_api_utils-9.4.0/example/rate_limit_load.py +0 -10
- ul_api_utils-9.4.0/example/redis_repository.py +0 -22
- ul_api_utils-9.4.0/example/routes/api_some.py +0 -335
- ul_api_utils-9.4.0/example/sockets/on_connect.py +0 -16
- ul_api_utils-9.4.0/example/sockets/on_disconnect.py +0 -14
- ul_api_utils-9.4.0/example/sockets/on_json.py +0 -10
- ul_api_utils-9.4.0/example/sockets/on_message.py +0 -13
- ul_api_utils-9.4.0/example/sockets/on_open.py +0 -16
- ul_api_utils-9.4.0/example/workers/worker.py +0 -28
- ul_api_utils-9.4.0/setup.py +0 -94
- ul_api_utils-9.4.0/ul_api_utils/commands/start/gunicorn.conf.gevent.local.py +0 -10
- ul_api_utils-9.4.0/ul_api_utils/commands/start/gunicorn.conf.gevent.py +0 -37
- ul_api_utils-9.4.0/ul_api_utils/utils/jinja/__init__.py +0 -0
- ul_api_utils-9.4.0/ul_api_utils/utils/memory_db/__init__.py +0 -0
- ul_api_utils-9.4.0/ul_api_utils/utils/memory_db/__tests__/__init__.py +0 -0
- ul_api_utils-9.4.0/ul_api_utils/validators/__init__.py +0 -0
- ul_api_utils-9.4.0/ul_api_utils/validators/__tests__/__init__.py +0 -0
- ul_api_utils-9.4.0/ul_api_utils.egg-info/requires.txt +0 -34
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/LICENSE +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/setup.cfg +0 -0
- {ul_api_utils-9.4.0/example → ul_api_utils-10.0.0.dev2/ul_api_utils}/__init__.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/access/__init__.py +0 -0
- {ul_api_utils-9.4.0/example/models → ul_api_utils-10.0.0.dev2/ul_api_utils/api_resource}/__init__.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/api_resource/api_request.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/api_resource/api_resource.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/api_resource/api_resource_config.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/api_resource/api_resource_error_handling.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/api_resource/api_resource_fn_typing.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/api_resource/api_resource_type.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/api_resource/api_response.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/api_resource/api_response_db.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/api_resource/api_response_payload_alias.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/api_resource/db_types.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/api_resource/signature_check.py +0 -0
- {ul_api_utils-9.4.0/example/routes → ul_api_utils-10.0.0.dev2/ul_api_utils/commands}/__init__.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/commands/cmd_enc_keys.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/commands/cmd_gen_api_user_token.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/commands/cmd_gen_new_api_user.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/commands/cmd_generate_api_docs.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/commands/cmd_worker_start.py +0 -0
- {ul_api_utils-9.4.0/example/sockets → ul_api_utils-10.0.0.dev2/ul_api_utils/commands/start}/__init__.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/commands/start/gunicorn.conf.local.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/commands/start/gunicorn.conf.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/commands/start/wsgi.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/conf/ul-debugger-main.js +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/conf/ul-debugger-ui.js +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/conf.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/const.py +0 -0
- {ul_api_utils-9.4.0/example/workers → ul_api_utils-10.0.0.dev2/ul_api_utils/debug}/__init__.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/debug/debugger.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/debug/malloc.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/debug/stat.py +0 -0
- {ul_api_utils-9.4.0/ul_api_utils → ul_api_utils-10.0.0.dev2/ul_api_utils/encrypt}/__init__.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/encrypt/encrypt_decrypt_abstract.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/encrypt/encrypt_decrypt_aes_xtea.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/errors.py +0 -0
- {ul_api_utils-9.4.0/ul_api_utils/api_resource → ul_api_utils-10.0.0.dev2/ul_api_utils/internal_api}/__init__.py +0 -0
- {ul_api_utils-9.4.0/ul_api_utils/commands → ul_api_utils-10.0.0.dev2/ul_api_utils/internal_api/__tests__}/__init__.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/internal_api/__tests__/internal_api.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/internal_api/__tests__/internal_api_content_type.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/internal_api/internal_api.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/internal_api/internal_api_check_context.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/internal_api/internal_api_error.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/internal_api/internal_api_response.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/main.py +0 -0
- {ul_api_utils-9.4.0/ul_api_utils/commands/start → ul_api_utils-10.0.0.dev2/ul_api_utils/modules}/__init__.py +0 -0
- {ul_api_utils-9.4.0/ul_api_utils/debug → ul_api_utils-10.0.0.dev2/ul_api_utils/modules/__tests__}/__init__.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/modules/__tests__/test_api_sdk_jwt.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/modules/api_sdk.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/modules/api_sdk_config.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/modules/api_sdk_jwt.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/modules/intermediate_state.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/modules/worker_context.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/modules/worker_sdk.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/modules/worker_sdk_config.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/py.typed +0 -0
- {ul_api_utils-9.4.0/ul_api_utils/encrypt → ul_api_utils-10.0.0.dev2/ul_api_utils/resources}/__init__.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/resources/caching.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/resources/debugger_scripts.py +0 -0
- {ul_api_utils-9.4.0/ul_api_utils/internal_api → ul_api_utils-10.0.0.dev2/ul_api_utils/resources/health_check}/__init__.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/resources/health_check/const.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/resources/health_check/health_check.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/resources/health_check/health_check_template.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/resources/health_check/resource.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/resources/not_implemented.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/resources/permissions.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/resources/rate_limitter.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/resources/socketio.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/resources/swagger.py +0 -0
- {ul_api_utils-9.4.0/ul_api_utils/internal_api/__tests__ → ul_api_utils-10.0.0.dev2/ul_api_utils/resources/web_forms}/__init__.py +0 -0
- {ul_api_utils-9.4.0/ul_api_utils/modules → ul_api_utils-10.0.0.dev2/ul_api_utils/resources/web_forms/custom_fields}/__init__.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/resources/web_forms/custom_fields/custom_checkbox_select.py +0 -0
- {ul_api_utils-9.4.0/ul_api_utils/modules/__tests__ → ul_api_utils-10.0.0.dev2/ul_api_utils/resources/web_forms/custom_widgets}/__init__.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/resources/web_forms/custom_widgets/custom_select_widget.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/resources/web_forms/custom_widgets/custom_text_input_widget.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/resources/web_forms/uni_form.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/sentry.py +0 -0
- {ul_api_utils-9.4.0/ul_api_utils/resources → ul_api_utils-10.0.0.dev2/ul_api_utils/utils}/__init__.py +0 -0
- {ul_api_utils-9.4.0/ul_api_utils/resources/health_check → ul_api_utils-10.0.0.dev2/ul_api_utils/utils/__tests__}/__init__.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/utils/__tests__/api_path_version.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/utils/__tests__/unwrap_typing.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/utils/api_encoding.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/utils/api_format.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/utils/api_method.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/utils/api_pagination.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/utils/api_path_version.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/utils/api_request_info.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/utils/avro.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/utils/broker_topics_message_count.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/utils/cached_per_request.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/utils/colors.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/utils/constants.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/utils/decode_base64.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/utils/deprecated.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/utils/flags.py +0 -0
- {ul_api_utils-9.4.0/ul_api_utils/resources/web_forms → ul_api_utils-10.0.0.dev2/ul_api_utils/utils/flask_swagger_generator}/__init__.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/utils/flask_swagger_generator/conf.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/utils/flask_swagger_generator/exceptions.py +0 -0
- {ul_api_utils-9.4.0/ul_api_utils/resources/web_forms/custom_fields → ul_api_utils-10.0.0.dev2/ul_api_utils/utils/flask_swagger_generator/specifiers}/__init__.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/utils/flask_swagger_generator/specifiers/swagger_models.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/utils/flask_swagger_generator/specifiers/swagger_specifier.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/utils/flask_swagger_generator/specifiers/swagger_three_specifier.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/utils/flask_swagger_generator/specifiers/swagger_version.py +0 -0
- {ul_api_utils-9.4.0/ul_api_utils/resources/web_forms/custom_widgets → ul_api_utils-10.0.0.dev2/ul_api_utils/utils/flask_swagger_generator/utils}/__init__.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/utils/flask_swagger_generator/utils/input_type.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/utils/flask_swagger_generator/utils/parameter_type.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/utils/flask_swagger_generator/utils/replace_in_dict.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/utils/flask_swagger_generator/utils/request_type.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/utils/flask_swagger_generator/utils/schema_type.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/utils/flask_swagger_generator/utils/security_type.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/utils/imports.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/utils/instance_checks.py +0 -0
- {ul_api_utils-9.4.0/ul_api_utils/utils → ul_api_utils-10.0.0.dev2/ul_api_utils/utils/jinja}/__init__.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/utils/jinja/t_url_for.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/utils/jinja/to_pretty_json.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/utils/json_encoder.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/utils/load_modules.py +0 -0
- {ul_api_utils-9.4.0/ul_api_utils/utils/__tests__ → ul_api_utils-10.0.0.dev2/ul_api_utils/utils/memory_db}/__init__.py +0 -0
- {ul_api_utils-9.4.0/ul_api_utils/utils/flask_swagger_generator → ul_api_utils-10.0.0.dev2/ul_api_utils/utils/memory_db/__tests__}/__init__.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/utils/memory_db/errors.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/utils/memory_db/repository.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/utils/token_check.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/utils/token_check_through_request.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/utils/unwrap_typing.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/utils/uuid_converter.py +0 -0
- {ul_api_utils-9.4.0/ul_api_utils/utils/flask_swagger_generator/specifiers → ul_api_utils-10.0.0.dev2/ul_api_utils/validators}/__init__.py +0 -0
- {ul_api_utils-9.4.0/ul_api_utils/utils/flask_swagger_generator/utils → ul_api_utils-10.0.0.dev2/ul_api_utils/validators/__tests__}/__init__.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/validators/__tests__/test_custom_fields.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/validators/custom_fields.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/validators/validate_empty_object.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils/validators/validate_uuid.py +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils.egg-info/dependency_links.txt +0 -0
- {ul_api_utils-9.4.0 → ul_api_utils-10.0.0.dev2}/ul_api_utils.egg-info/entry_points.txt +0 -0
|
@@ -1,20 +1,55 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: ul_api_utils
|
|
3
|
-
Version:
|
|
3
|
+
Version: 10.0.0.dev2
|
|
4
4
|
Summary: Python api utils
|
|
5
5
|
Author: Unic-lab
|
|
6
|
-
Author-email:
|
|
7
6
|
License: MIT
|
|
8
|
-
Platform: any
|
|
9
7
|
Classifier: Intended Audience :: Developers
|
|
10
8
|
Classifier: License :: OSI Approved :: MIT License
|
|
11
9
|
Classifier: Programming Language :: Python
|
|
12
|
-
Classifier: Programming Language :: Python :: 3.
|
|
13
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
14
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
10
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
15
11
|
Classifier: Operating System :: OS Independent
|
|
12
|
+
Requires-Python: >=3.14
|
|
16
13
|
Description-Content-Type: text/markdown
|
|
17
14
|
License-File: LICENSE
|
|
15
|
+
Requires-Dist: ul-db-utils==6.0.0.dev0
|
|
16
|
+
Requires-Dist: ul-py-tool==3.0.2.dev1
|
|
17
|
+
Requires-Dist: ul-unipipeline>=3.0.1.dev1
|
|
18
|
+
Requires-Dist: frozendict>=2.4.4
|
|
19
|
+
Requires-Dist: jinja2>=3.1.6
|
|
20
|
+
Requires-Dist: flask>=3.1.0
|
|
21
|
+
Requires-Dist: flask-wtf>=1.2.2
|
|
22
|
+
Requires-Dist: flask-limiter>=3.10.1
|
|
23
|
+
Requires-Dist: flask-swagger-ui>=4.11.1
|
|
24
|
+
Requires-Dist: flask-monitoringdashboard>=3.3.2
|
|
25
|
+
Requires-Dist: flask-caching>=2.3.1
|
|
26
|
+
Requires-Dist: pycryptodome>=3.21.0
|
|
27
|
+
Requires-Dist: pyjwt>=2.10.1
|
|
28
|
+
Requires-Dist: gunicorn>=23.0.0
|
|
29
|
+
Requires-Dist: gevent>=25.9.1
|
|
30
|
+
Requires-Dist: gevent-websocket>=0.10.1
|
|
31
|
+
Requires-Dist: flask-socketio>=5.5.1
|
|
32
|
+
Requires-Dist: pyyaml>=6.0
|
|
33
|
+
Requires-Dist: requests>=2.31.0
|
|
34
|
+
Requires-Dist: cryptography>=44.0.2
|
|
35
|
+
Requires-Dist: colored>=1.4.3
|
|
36
|
+
Requires-Dist: factory-boy>=3.3.0
|
|
37
|
+
Requires-Dist: faker>=37.0.0
|
|
38
|
+
Requires-Dist: ormsgpack>=1.11.0
|
|
39
|
+
Requires-Dist: msgpack>=1.1.2
|
|
40
|
+
Requires-Dist: msgpack-types>=0.5.0
|
|
41
|
+
Requires-Dist: fastavro>=1.11.1
|
|
42
|
+
Requires-Dist: xlsxwriter>=3.2.2
|
|
43
|
+
Requires-Dist: sentry-sdk[flask]>=2.22.0
|
|
44
|
+
Requires-Dist: pathvalidate>=3.2.3
|
|
45
|
+
Requires-Dist: types-requests>=2.32.0.20250306
|
|
46
|
+
Requires-Dist: types-jinja2>=2.11.9
|
|
47
|
+
Requires-Dist: werkzeug>=3.1.3
|
|
48
|
+
Requires-Dist: wtforms>=3.0.1
|
|
49
|
+
Requires-Dist: wtforms-alchemy>=0.18.0
|
|
50
|
+
Provides-Extra: dev
|
|
51
|
+
Requires-Dist: uv-script>=0.1.9; extra == "dev"
|
|
52
|
+
Dynamic: license-file
|
|
18
53
|
|
|
19
54
|
# Generic library api-utils
|
|
20
55
|
|
|
@@ -218,11 +253,11 @@ def validate_empty_object(obj_id: str, model: Any) -> Any:
|
|
|
218
253
|
|
|
219
254
|
> Check this library for deprecation, does it have enough maintenance, library dependencies.
|
|
220
255
|
> If all above satisfies you, perform next steps:
|
|
221
|
-
> 1. Add the package name and version to **
|
|
222
|
-
> 2. Run ```
|
|
223
|
-
> 3.
|
|
256
|
+
> 1. Add the package name and version to **pyproject.toml** under ```[project].dependencies``` section. Example: ```alembic>=1.8.1```.
|
|
257
|
+
> 2. Run ```uv lock && uv sync --frozen```.
|
|
258
|
+
> 3. Verify command aliases in **pyproject.toml** under ```[tool.uvs.scripts]``` if needed.
|
|
224
259
|
> 4. Commit changes. ```git commit -m "Add dependency *library-name*"```.
|
|
225
|
-
> 5. Run version patch: ```
|
|
260
|
+
> 5. Run version patch: ```uv run uvs version_patch```.
|
|
226
261
|
> 6. Push changes directly to dev ```git push origin dev --tags``` or raise MR for your changes to be reviewed.
|
|
227
262
|
|
|
228
263
|
|
|
@@ -238,9 +273,9 @@ FLASK_DEBUG=1 FLASK_ENV=development FLASK_APP=example.example_app APPLICATION_DI
|
|
|
238
273
|
## How to create keys
|
|
239
274
|
|
|
240
275
|
```bash
|
|
241
|
-
|
|
276
|
+
uv run uvs enc_keys --algorithm=RS256 --service-name some --follower-services foo bar --jwt-permissions-module example.permissions --jwt-user-id 03670a66-fb50-437e-96ae-b42bb83e3d04 --jwt-environment=local
|
|
242
277
|
```
|
|
243
278
|
|
|
244
279
|
```bash
|
|
245
|
-
|
|
280
|
+
uv run uvs enc_keys --algorithm ES256 --service-name some --follower-services foo bar --jwt-permissions-module example.permissions --jwt-user-id 03670a66-fb50-437e-96ae-b42bb83e3d04 --jwt-environment=local
|
|
246
281
|
```
|
|
@@ -200,11 +200,11 @@ def validate_empty_object(obj_id: str, model: Any) -> Any:
|
|
|
200
200
|
|
|
201
201
|
> Check this library for deprecation, does it have enough maintenance, library dependencies.
|
|
202
202
|
> If all above satisfies you, perform next steps:
|
|
203
|
-
> 1. Add the package name and version to **
|
|
204
|
-
> 2. Run ```
|
|
205
|
-
> 3.
|
|
203
|
+
> 1. Add the package name and version to **pyproject.toml** under ```[project].dependencies``` section. Example: ```alembic>=1.8.1```.
|
|
204
|
+
> 2. Run ```uv lock && uv sync --frozen```.
|
|
205
|
+
> 3. Verify command aliases in **pyproject.toml** under ```[tool.uvs.scripts]``` if needed.
|
|
206
206
|
> 4. Commit changes. ```git commit -m "Add dependency *library-name*"```.
|
|
207
|
-
> 5. Run version patch: ```
|
|
207
|
+
> 5. Run version patch: ```uv run uvs version_patch```.
|
|
208
208
|
> 6. Push changes directly to dev ```git push origin dev --tags``` or raise MR for your changes to be reviewed.
|
|
209
209
|
|
|
210
210
|
|
|
@@ -220,9 +220,9 @@ FLASK_DEBUG=1 FLASK_ENV=development FLASK_APP=example.example_app APPLICATION_DI
|
|
|
220
220
|
## How to create keys
|
|
221
221
|
|
|
222
222
|
```bash
|
|
223
|
-
|
|
223
|
+
uv run uvs enc_keys --algorithm=RS256 --service-name some --follower-services foo bar --jwt-permissions-module example.permissions --jwt-user-id 03670a66-fb50-437e-96ae-b42bb83e3d04 --jwt-environment=local
|
|
224
224
|
```
|
|
225
225
|
|
|
226
226
|
```bash
|
|
227
|
-
|
|
227
|
+
uv run uvs enc_keys --algorithm ES256 --service-name some --follower-services foo bar --jwt-permissions-module example.permissions --jwt-user-id 03670a66-fb50-437e-96ae-b42bb83e3d04 --jwt-environment=local
|
|
228
228
|
```
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = [
|
|
3
|
+
"setuptools>=69.5.1",
|
|
4
|
+
"wheel>=0.43.0",
|
|
5
|
+
]
|
|
6
|
+
build-backend = "setuptools.build_meta"
|
|
7
|
+
|
|
8
|
+
[project]
|
|
9
|
+
name = "ul_api_utils"
|
|
10
|
+
version = "10.0.0.dev2"
|
|
11
|
+
description = "Python api utils"
|
|
12
|
+
readme = "README.md"
|
|
13
|
+
license = { text = "MIT" }
|
|
14
|
+
authors = [{ name = "Unic-lab" }]
|
|
15
|
+
requires-python = ">=3.14"
|
|
16
|
+
classifiers = [
|
|
17
|
+
"Intended Audience :: Developers",
|
|
18
|
+
"License :: OSI Approved :: MIT License",
|
|
19
|
+
"Programming Language :: Python",
|
|
20
|
+
"Programming Language :: Python :: 3.14",
|
|
21
|
+
"Operating System :: OS Independent",
|
|
22
|
+
]
|
|
23
|
+
dependencies = [
|
|
24
|
+
"ul-db-utils==6.0.0.dev0",
|
|
25
|
+
"ul-py-tool==3.0.2.dev1",
|
|
26
|
+
"ul-unipipeline>=3.0.1.dev1",
|
|
27
|
+
"frozendict>=2.4.4",
|
|
28
|
+
"jinja2>=3.1.6",
|
|
29
|
+
"flask>=3.1.0",
|
|
30
|
+
"flask-wtf>=1.2.2",
|
|
31
|
+
"flask-limiter>=3.10.1",
|
|
32
|
+
"flask-swagger-ui>=4.11.1",
|
|
33
|
+
"flask-monitoringdashboard>=3.3.2",
|
|
34
|
+
"flask-caching>=2.3.1",
|
|
35
|
+
"pycryptodome>=3.21.0",
|
|
36
|
+
"pyjwt>=2.10.1",
|
|
37
|
+
"gunicorn>=23.0.0",
|
|
38
|
+
"gevent>=25.9.1",
|
|
39
|
+
"gevent-websocket>=0.10.1",
|
|
40
|
+
"flask-socketio>=5.5.1",
|
|
41
|
+
"pyyaml>=6.0",
|
|
42
|
+
"requests>=2.31.0",
|
|
43
|
+
"cryptography>=44.0.2",
|
|
44
|
+
"colored>=1.4.3",
|
|
45
|
+
"factory-boy>=3.3.0",
|
|
46
|
+
"faker>=37.0.0",
|
|
47
|
+
"ormsgpack>=1.11.0",
|
|
48
|
+
"msgpack>=1.1.2",
|
|
49
|
+
"msgpack-types>=0.5.0",
|
|
50
|
+
"fastavro>=1.11.1",
|
|
51
|
+
"xlsxwriter>=3.2.2",
|
|
52
|
+
"sentry-sdk[flask]>=2.22.0",
|
|
53
|
+
"pathvalidate>=3.2.3",
|
|
54
|
+
"types-requests>=2.32.0.20250306",
|
|
55
|
+
"types-jinja2>=2.11.9",
|
|
56
|
+
"werkzeug>=3.1.3",
|
|
57
|
+
"wtforms>=3.0.1",
|
|
58
|
+
"wtforms-alchemy>=0.18.0",
|
|
59
|
+
]
|
|
60
|
+
|
|
61
|
+
[project.optional-dependencies]
|
|
62
|
+
dev = [
|
|
63
|
+
"uv-script>=0.1.9",
|
|
64
|
+
]
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
[project.scripts]
|
|
68
|
+
ulapiutls = "ul_api_utils.main:main"
|
|
69
|
+
|
|
70
|
+
[tool.uvs.scripts]
|
|
71
|
+
prepare = "uv build"
|
|
72
|
+
ci-smoke = '''sh -lc "uv lock --check && rm -rf .venv-smoke && uv venv .venv-smoke && uv pip install --python .venv-smoke/bin/python dist/*.whl && .venv-smoke/bin/unipipeline --help"'''
|
|
73
|
+
lint = "ulpytool lint --check-imports=0 --dockercomposefiles-ignore example/**"
|
|
74
|
+
test = "ulpytool test"
|
|
75
|
+
version_minor = "ulpytool minor"
|
|
76
|
+
version_patch = "ulpytool patch"
|
|
77
|
+
version_major = "ulpytool major"
|
|
78
|
+
start = "bash -c 'APPLICATION_GUNICORN_WORKERS=12 python3 ./ul_api_utils/main.py start --app-dir ./example --env=staging --port=5000 --debug=0 --freeze=gc=True'"
|
|
79
|
+
start_socket = "bash -c 'APPLICATION_GUNICORN_WORKERS=1 python3 ./ul_api_utils/main.py start --app-dir ./example --env=staging --port=5000 --debug=0 --worker-class=geventwebsocket.gunicorn.workers.GeventWebSocketWorker'"
|
|
80
|
+
start_debug = "bash -c 'APPLICATION_GUNICORN_WORKERS=12 FLASK_MONITORING_DASHBOARD_CONFIG=./example/fmd.cfg python3 ./ul_api_utils/main.py start --app-dir ./example --env=local --port=5000 --debug=1'"
|
|
81
|
+
start_1 = "bash -c 'APPLICATION_GUNICORN_WORKERS=1 PROFILE_MEM=1 python3 ./ul_api_utils/main.py start --app-dir ./example --env=staging --port=5000 --debug=0'"
|
|
82
|
+
start_flask = "bash -c 'FLASK_DEBUG=0 FLASK_ENV=production FLASK_APP=example.main APPLICATION_DIR=$(pwd)/example APPLICATION_DEBUG=0 flask run --port 5000'"
|
|
83
|
+
start_help = "python3 ./ul_api_utils/main.py start --help"
|
|
84
|
+
start_rate_limit_load = "python3 ./example/rate_limit_load.py"
|
|
85
|
+
enc_keys = "python3 ./ul_api_utils/main.py enc_keys"
|
|
86
|
+
gen_new_api_user = "python3 ./ul_api_utils/main.py gen_new_api_user"
|
|
87
|
+
gen_api_user_token = "python3 ./ul_api_utils/main.py gen_api_user_token"
|
|
88
|
+
|
|
89
|
+
[tool.setuptools]
|
|
90
|
+
include-package-data = true
|
|
91
|
+
|
|
92
|
+
[tool.setuptools.packages.find]
|
|
93
|
+
include = ["ul_api_utils*"]
|
|
94
|
+
|
|
95
|
+
[tool.setuptools.package-data]
|
|
96
|
+
ul_api_utils = [
|
|
97
|
+
"py.typed",
|
|
98
|
+
"utils/flask_swagger_ui/templates/*.html",
|
|
99
|
+
"utils/flask_swagger_ui/static/*.html",
|
|
100
|
+
"utils/flask_swagger_ui/static/*.js",
|
|
101
|
+
"utils/flask_swagger_ui/static/*.css",
|
|
102
|
+
"utils/flask_swagger_ui/static/*.png",
|
|
103
|
+
"utils/flask_swagger_ui/static/*.map",
|
|
104
|
+
"conf/ul-debugger-main.js",
|
|
105
|
+
"conf/ul-debugger-ui.js",
|
|
106
|
+
]
|
|
@@ -55,7 +55,7 @@ class CmdStart(Cmd):
|
|
|
55
55
|
parser.add_argument('--debug', dest='debug', type=arg_str2bool, default=False, required=False)
|
|
56
56
|
parser.add_argument('--max-requests', dest='max_requests', type=int, default=1000, required=False)
|
|
57
57
|
parser.add_argument('--max-requests-jitter', dest='max_requests_jitter', type=int, default=50, required=False)
|
|
58
|
-
parser.add_argument('--worker-class', dest='worker_class', type=str, default='
|
|
58
|
+
parser.add_argument('--worker-class', dest='worker_class', type=str, default='sync', required=False)
|
|
59
59
|
parser.add_argument('--statsd_endpoint', dest='statsd_endpoint', type=str, default=None, required=False)
|
|
60
60
|
parser.add_argument('--statsd_prefix', dest='statsd_prefix', type=str, default=None, required=False)
|
|
61
61
|
parser.add_argument('--freeze-gc', dest='freeze_gc', type=bool, default=False, required=False)
|
|
@@ -77,15 +77,8 @@ class CmdStart(Cmd):
|
|
|
77
77
|
assert len(APPLICATION_GUNICORN_WORKERS) > 0
|
|
78
78
|
|
|
79
79
|
debug = (self.debug and self.env == ENV_LOCAL)
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
if is_gevent:
|
|
83
|
-
local_conf = os.path.abspath(os.path.normpath(os.path.join(THIS_LIB_CWD, "commands", "start", "gunicorn.conf.gevent.local.py")))
|
|
84
|
-
prod_conf = os.path.abspath(os.path.normpath(os.path.join(THIS_LIB_CWD, "commands", "start", "gunicorn.conf.gevent.py")))
|
|
85
|
-
else:
|
|
86
|
-
local_conf = os.path.abspath(os.path.normpath(os.path.join(THIS_LIB_CWD, "commands", "start", "gunicorn.conf.local.py")))
|
|
87
|
-
prod_conf = os.path.abspath(os.path.normpath(os.path.join(THIS_LIB_CWD, "commands", "start", "gunicorn.conf.py")))
|
|
88
|
-
|
|
80
|
+
local_conf = os.path.abspath(os.path.normpath(os.path.join(THIS_LIB_CWD, "commands", "start", "gunicorn.conf.local.py")))
|
|
81
|
+
prod_conf = os.path.abspath(os.path.normpath(os.path.join(THIS_LIB_CWD, "commands", "start", "gunicorn.conf.py")))
|
|
89
82
|
gunicorn_config = prod_conf if self.freeze_gc and not debug else local_conf
|
|
90
83
|
|
|
91
84
|
args = [
|
|
@@ -1,20 +1,55 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
2
|
-
Name:
|
|
3
|
-
Version:
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: ul_api_utils
|
|
3
|
+
Version: 10.0.0.dev2
|
|
4
4
|
Summary: Python api utils
|
|
5
5
|
Author: Unic-lab
|
|
6
|
-
Author-email:
|
|
7
6
|
License: MIT
|
|
8
|
-
Platform: any
|
|
9
7
|
Classifier: Intended Audience :: Developers
|
|
10
8
|
Classifier: License :: OSI Approved :: MIT License
|
|
11
9
|
Classifier: Programming Language :: Python
|
|
12
|
-
Classifier: Programming Language :: Python :: 3.
|
|
13
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
14
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
10
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
15
11
|
Classifier: Operating System :: OS Independent
|
|
12
|
+
Requires-Python: >=3.14
|
|
16
13
|
Description-Content-Type: text/markdown
|
|
17
14
|
License-File: LICENSE
|
|
15
|
+
Requires-Dist: ul-db-utils==6.0.0.dev0
|
|
16
|
+
Requires-Dist: ul-py-tool==3.0.2.dev1
|
|
17
|
+
Requires-Dist: ul-unipipeline>=3.0.1.dev1
|
|
18
|
+
Requires-Dist: frozendict>=2.4.4
|
|
19
|
+
Requires-Dist: jinja2>=3.1.6
|
|
20
|
+
Requires-Dist: flask>=3.1.0
|
|
21
|
+
Requires-Dist: flask-wtf>=1.2.2
|
|
22
|
+
Requires-Dist: flask-limiter>=3.10.1
|
|
23
|
+
Requires-Dist: flask-swagger-ui>=4.11.1
|
|
24
|
+
Requires-Dist: flask-monitoringdashboard>=3.3.2
|
|
25
|
+
Requires-Dist: flask-caching>=2.3.1
|
|
26
|
+
Requires-Dist: pycryptodome>=3.21.0
|
|
27
|
+
Requires-Dist: pyjwt>=2.10.1
|
|
28
|
+
Requires-Dist: gunicorn>=23.0.0
|
|
29
|
+
Requires-Dist: gevent>=25.9.1
|
|
30
|
+
Requires-Dist: gevent-websocket>=0.10.1
|
|
31
|
+
Requires-Dist: flask-socketio>=5.5.1
|
|
32
|
+
Requires-Dist: pyyaml>=6.0
|
|
33
|
+
Requires-Dist: requests>=2.31.0
|
|
34
|
+
Requires-Dist: cryptography>=44.0.2
|
|
35
|
+
Requires-Dist: colored>=1.4.3
|
|
36
|
+
Requires-Dist: factory-boy>=3.3.0
|
|
37
|
+
Requires-Dist: faker>=37.0.0
|
|
38
|
+
Requires-Dist: ormsgpack>=1.11.0
|
|
39
|
+
Requires-Dist: msgpack>=1.1.2
|
|
40
|
+
Requires-Dist: msgpack-types>=0.5.0
|
|
41
|
+
Requires-Dist: fastavro>=1.11.1
|
|
42
|
+
Requires-Dist: xlsxwriter>=3.2.2
|
|
43
|
+
Requires-Dist: sentry-sdk[flask]>=2.22.0
|
|
44
|
+
Requires-Dist: pathvalidate>=3.2.3
|
|
45
|
+
Requires-Dist: types-requests>=2.32.0.20250306
|
|
46
|
+
Requires-Dist: types-jinja2>=2.11.9
|
|
47
|
+
Requires-Dist: werkzeug>=3.1.3
|
|
48
|
+
Requires-Dist: wtforms>=3.0.1
|
|
49
|
+
Requires-Dist: wtforms-alchemy>=0.18.0
|
|
50
|
+
Provides-Extra: dev
|
|
51
|
+
Requires-Dist: uv-script>=0.1.9; extra == "dev"
|
|
52
|
+
Dynamic: license-file
|
|
18
53
|
|
|
19
54
|
# Generic library api-utils
|
|
20
55
|
|
|
@@ -218,11 +253,11 @@ def validate_empty_object(obj_id: str, model: Any) -> Any:
|
|
|
218
253
|
|
|
219
254
|
> Check this library for deprecation, does it have enough maintenance, library dependencies.
|
|
220
255
|
> If all above satisfies you, perform next steps:
|
|
221
|
-
> 1. Add the package name and version to **
|
|
222
|
-
> 2. Run ```
|
|
223
|
-
> 3.
|
|
256
|
+
> 1. Add the package name and version to **pyproject.toml** under ```[project].dependencies``` section. Example: ```alembic>=1.8.1```.
|
|
257
|
+
> 2. Run ```uv lock && uv sync --frozen```.
|
|
258
|
+
> 3. Verify command aliases in **pyproject.toml** under ```[tool.uvs.scripts]``` if needed.
|
|
224
259
|
> 4. Commit changes. ```git commit -m "Add dependency *library-name*"```.
|
|
225
|
-
> 5. Run version patch: ```
|
|
260
|
+
> 5. Run version patch: ```uv run uvs version_patch```.
|
|
226
261
|
> 6. Push changes directly to dev ```git push origin dev --tags``` or raise MR for your changes to be reviewed.
|
|
227
262
|
|
|
228
263
|
|
|
@@ -238,9 +273,9 @@ FLASK_DEBUG=1 FLASK_ENV=development FLASK_APP=example.example_app APPLICATION_DI
|
|
|
238
273
|
## How to create keys
|
|
239
274
|
|
|
240
275
|
```bash
|
|
241
|
-
|
|
276
|
+
uv run uvs enc_keys --algorithm=RS256 --service-name some --follower-services foo bar --jwt-permissions-module example.permissions --jwt-user-id 03670a66-fb50-437e-96ae-b42bb83e3d04 --jwt-environment=local
|
|
242
277
|
```
|
|
243
278
|
|
|
244
279
|
```bash
|
|
245
|
-
|
|
280
|
+
uv run uvs enc_keys --algorithm ES256 --service-name some --follower-services foo bar --jwt-permissions-module example.permissions --jwt-user-id 03670a66-fb50-437e-96ae-b42bb83e3d04 --jwt-environment=local
|
|
246
281
|
```
|
|
@@ -1,24 +1,6 @@
|
|
|
1
1
|
LICENSE
|
|
2
2
|
README.md
|
|
3
|
-
|
|
4
|
-
example/__init__.py
|
|
5
|
-
example/conf.py
|
|
6
|
-
example/main.py
|
|
7
|
-
example/permissions.py
|
|
8
|
-
example/pure_flask_example.py
|
|
9
|
-
example/rate_limit_load.py
|
|
10
|
-
example/redis_repository.py
|
|
11
|
-
example/models/__init__.py
|
|
12
|
-
example/routes/__init__.py
|
|
13
|
-
example/routes/api_some.py
|
|
14
|
-
example/sockets/__init__.py
|
|
15
|
-
example/sockets/on_connect.py
|
|
16
|
-
example/sockets/on_disconnect.py
|
|
17
|
-
example/sockets/on_json.py
|
|
18
|
-
example/sockets/on_message.py
|
|
19
|
-
example/sockets/on_open.py
|
|
20
|
-
example/workers/__init__.py
|
|
21
|
-
example/workers/worker.py
|
|
3
|
+
pyproject.toml
|
|
22
4
|
ul_api_utils/__init__.py
|
|
23
5
|
ul_api_utils/conf.py
|
|
24
6
|
ul_api_utils/const.py
|
|
@@ -53,8 +35,6 @@ ul_api_utils/commands/cmd_generate_api_docs.py
|
|
|
53
35
|
ul_api_utils/commands/cmd_start.py
|
|
54
36
|
ul_api_utils/commands/cmd_worker_start.py
|
|
55
37
|
ul_api_utils/commands/start/__init__.py
|
|
56
|
-
ul_api_utils/commands/start/gunicorn.conf.gevent.local.py
|
|
57
|
-
ul_api_utils/commands/start/gunicorn.conf.gevent.py
|
|
58
38
|
ul_api_utils/commands/start/gunicorn.conf.local.py
|
|
59
39
|
ul_api_utils/commands/start/gunicorn.conf.py
|
|
60
40
|
ul_api_utils/commands/start/wsgi.py
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
ul-db-utils==6.0.0.dev0
|
|
2
|
+
ul-py-tool==3.0.2.dev1
|
|
3
|
+
ul-unipipeline>=3.0.1.dev1
|
|
4
|
+
frozendict>=2.4.4
|
|
5
|
+
jinja2>=3.1.6
|
|
6
|
+
flask>=3.1.0
|
|
7
|
+
flask-wtf>=1.2.2
|
|
8
|
+
flask-limiter>=3.10.1
|
|
9
|
+
flask-swagger-ui>=4.11.1
|
|
10
|
+
flask-monitoringdashboard>=3.3.2
|
|
11
|
+
flask-caching>=2.3.1
|
|
12
|
+
pycryptodome>=3.21.0
|
|
13
|
+
pyjwt>=2.10.1
|
|
14
|
+
gunicorn>=23.0.0
|
|
15
|
+
gevent>=25.9.1
|
|
16
|
+
gevent-websocket>=0.10.1
|
|
17
|
+
flask-socketio>=5.5.1
|
|
18
|
+
pyyaml>=6.0
|
|
19
|
+
requests>=2.31.0
|
|
20
|
+
cryptography>=44.0.2
|
|
21
|
+
colored>=1.4.3
|
|
22
|
+
factory-boy>=3.3.0
|
|
23
|
+
faker>=37.0.0
|
|
24
|
+
ormsgpack>=1.11.0
|
|
25
|
+
msgpack>=1.1.2
|
|
26
|
+
msgpack-types>=0.5.0
|
|
27
|
+
fastavro>=1.11.1
|
|
28
|
+
xlsxwriter>=3.2.2
|
|
29
|
+
sentry-sdk[flask]>=2.22.0
|
|
30
|
+
pathvalidate>=3.2.3
|
|
31
|
+
types-requests>=2.32.0.20250306
|
|
32
|
+
types-jinja2>=2.11.9
|
|
33
|
+
werkzeug>=3.1.3
|
|
34
|
+
wtforms>=3.0.1
|
|
35
|
+
wtforms-alchemy>=0.18.0
|
|
36
|
+
|
|
37
|
+
[dev]
|
|
38
|
+
uv-script>=0.1.9
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import os
|
|
2
|
-
|
|
3
|
-
from ul_db_utils.modules.postgres_modules.db import DbConfig
|
|
4
|
-
|
|
5
|
-
from ul_api_utils.modules.api_sdk import ApiSdk
|
|
6
|
-
from ul_api_utils.modules.api_sdk_config import ApiSdkConfig, ApiSdkIdentifyTypeEnum, \
|
|
7
|
-
ApiSdkFlaskDebuggingPluginsEnabled
|
|
8
|
-
from example.permissions import permissions
|
|
9
|
-
from ul_api_utils.resources.socketio import SocketIOConfigType, SocketIOConfig
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
sdk = ApiSdk(ApiSdkConfig(
|
|
13
|
-
socket_config=SocketIOConfig(
|
|
14
|
-
app_type=SocketIOConfigType.EXTERNAL_PROCESS,
|
|
15
|
-
message_queue='redis://localhost:16379',
|
|
16
|
-
logs_enabled=True,
|
|
17
|
-
engineio_logs_enabled=False,
|
|
18
|
-
),
|
|
19
|
-
service_name='example_service',
|
|
20
|
-
permissions=permissions,
|
|
21
|
-
cache_storage_uri='redis://localhost:16379',
|
|
22
|
-
cache_default_ttl=60,
|
|
23
|
-
rate_limit_storage_uri='redis://localhost:16379',
|
|
24
|
-
rate_limit_identify=ApiSdkIdentifyTypeEnum.JWT_USER_ID,
|
|
25
|
-
flask_debugging_plugins=ApiSdkFlaskDebuggingPluginsEnabled(
|
|
26
|
-
flask_monitoring_dashboard=True,
|
|
27
|
-
),
|
|
28
|
-
web_error_template='error.html.jinja2',
|
|
29
|
-
))
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
fake_models_dir = os.path.join(os.path.dirname(__file__), 'models')
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
db_config = DbConfig(uri='postgresql://admin:admin@localhost:45432/example', models_path=fake_models_dir)
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
# NOTE: monkey patching is handled automatically by gunicorn gevent configs
|
|
2
|
-
# (see ul_api_utils/commands/start/gunicorn.conf.gevent.*.py)
|
|
3
|
-
# Only uncomment below if running outside gunicorn (e.g. direct python execution):
|
|
4
|
-
# from gevent import monkey
|
|
5
|
-
# monkey.patch_all()
|
|
6
|
-
# try:
|
|
7
|
-
# from psycogreen.gevent import patch_psycopg
|
|
8
|
-
# patch_psycopg()
|
|
9
|
-
# except ImportError:
|
|
10
|
-
# pass
|
|
11
|
-
|
|
12
|
-
import os
|
|
13
|
-
|
|
14
|
-
if int(os.environ.get('PROFILE_MEM', '0')):
|
|
15
|
-
from ul_api_utils.debug.malloc import trace_malloc
|
|
16
|
-
|
|
17
|
-
with trace_malloc(show_all=True):
|
|
18
|
-
from example.conf import sdk, db_config
|
|
19
|
-
|
|
20
|
-
flask_app = sdk.init_with_flask(__name__, db_config=db_config)
|
|
21
|
-
else:
|
|
22
|
-
from example.conf import sdk, db_config
|
|
23
|
-
|
|
24
|
-
flask_app = sdk.init_with_flask(__name__, db_config=db_config)
|
|
25
|
-
|
|
26
|
-
__all__ = (
|
|
27
|
-
'flask_app',
|
|
28
|
-
)
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
from ul_api_utils.access import PermissionRegistry
|
|
2
|
-
|
|
3
|
-
permissions = PermissionRegistry('example-debug-log', 111, 222)
|
|
4
|
-
|
|
5
|
-
SOME_PERMISSION = permissions.add('SOME', 1, 'Param pam Pam', 'test')
|
|
6
|
-
SOME_PERMISSION2 = permissions.add('SOME2', 2, 'Param pam Pam2', 'test', flags='123,234')
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
# import os.path
|
|
2
|
-
# from tempfile import NamedTemporaryFile
|
|
3
|
-
#
|
|
4
|
-
# from flask import Flask, send_file, after_this_request, Response
|
|
5
|
-
#
|
|
6
|
-
# app = Flask(__name__)
|
|
7
|
-
#
|
|
8
|
-
#
|
|
9
|
-
# files = []
|
|
10
|
-
#
|
|
11
|
-
#
|
|
12
|
-
# # def _clean_files():
|
|
13
|
-
# # print('_clean_files')
|
|
14
|
-
# #
|
|
15
|
-
# #
|
|
16
|
-
# # @app.after_request
|
|
17
|
-
# # def _after(resp):
|
|
18
|
-
# # print('_after', resp)
|
|
19
|
-
# # return resp
|
|
20
|
-
# #
|
|
21
|
-
# #
|
|
22
|
-
# # def _after_this(resp):
|
|
23
|
-
# # print('_after_this', resp)
|
|
24
|
-
# # return resp
|
|
25
|
-
#
|
|
26
|
-
#
|
|
27
|
-
# @app.route('/test')
|
|
28
|
-
# def donwload_test():
|
|
29
|
-
# resp = Response("some")
|
|
30
|
-
#
|
|
31
|
-
# after_this_request(_after_this)
|
|
32
|
-
# resp.call_on_close(_clean_files)
|
|
33
|
-
#
|
|
34
|
-
# return resp, 200
|
|
35
|
-
#
|
|
36
|
-
#
|
|
37
|
-
# # @app.teardown_request
|
|
38
|
-
# # def _teardown(exc):
|
|
39
|
-
# # print('_teardown', str(exc))
|
|
40
|
-
#
|
|
41
|
-
#
|
|
42
|
-
# @app.route('/test-file')
|
|
43
|
-
# def donwload_test_file():
|
|
44
|
-
# f = NamedTemporaryFile()
|
|
45
|
-
# for ff in files:
|
|
46
|
-
# print(f'{ff} = {os.path.exists(ff)}')
|
|
47
|
-
# files.append(str(f.name))
|
|
48
|
-
# # f.seek(0)
|
|
49
|
-
# f.write(b'test\n')
|
|
50
|
-
# f.write(b'test\n')
|
|
51
|
-
# f.write(b'test\n')
|
|
52
|
-
# f.write(b'test\n')
|
|
53
|
-
#
|
|
54
|
-
# with open(f.name, 'w+t') as ff:
|
|
55
|
-
# ff.write('SOME\n')
|
|
56
|
-
# ff.write('SOME\n')
|
|
57
|
-
# ff.write('SOME\n')
|
|
58
|
-
# ff.write('SOME\n')
|
|
59
|
-
#
|
|
60
|
-
# resp = send_file(f, mimetype='application/javascript')
|
|
61
|
-
#
|
|
62
|
-
# # after_this_request(_after_this)
|
|
63
|
-
# # resp.call_on_close(_clean_files)
|
|
64
|
-
#
|
|
65
|
-
# return resp
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
from typing import Any
|
|
2
|
-
|
|
3
|
-
import redis
|
|
4
|
-
from pydantic import BaseModel, UUID4
|
|
5
|
-
from uuid import uuid4
|
|
6
|
-
from ul_api_utils.utils.memory_db.repository import BaseMemoryDbRepository
|
|
7
|
-
|
|
8
|
-
redis_client: Any = redis.StrictRedis.from_url("redis://172.19.0.2:6379")
|
|
9
|
-
redis_db = BaseMemoryDbRepository(redis_client=redis_client)
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
class Person(BaseModel):
|
|
13
|
-
id: UUID4
|
|
14
|
-
name: str = 'Slava'
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
slava = Person(id=uuid4())
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
redis_db['slava'] = 35
|
|
21
|
-
value = redis_db['slava', Person]
|
|
22
|
-
value2 = redis_db.get('slava', default=1)
|