- копирую модуль upload/ из drhider (слои 1-2) - blueprint: параметр sink (drhider-сессия по умолчанию, сверка — DB+парсинг) - upload_bp: contracts_upload_sink = _store_and_parse - routes: регистрирую create_upload_refs_blueprint(cfg, sink=...) - app.py: корень репо в sys.path (для import upload) - History: план переиспользования + ревью Соннета
21 lines
607 B
Python
21 lines
607 B
Python
"""Слой 2 (бэк): переиспользуемый Blueprint закачки через ВМ.
|
|
|
|
Использование:
|
|
from upload.backend.upload_refs import create_upload_refs_blueprint
|
|
app.register_blueprint(create_upload_refs_blueprint(cfg))
|
|
"""
|
|
|
|
from .blueprint import create_upload_refs_blueprint
|
|
from .safe_name import safe_name
|
|
from .pull_file import pull_file
|
|
from .config import PULL_RETRIES, PULL_RETRY_DELAY, VM_UPLOAD_PREFIX
|
|
|
|
__all__ = [
|
|
"create_upload_refs_blueprint",
|
|
"safe_name",
|
|
"pull_file",
|
|
"PULL_RETRIES",
|
|
"PULL_RETRY_DELAY",
|
|
"VM_UPLOAD_PREFIX",
|
|
]
|