tina4-python 3.13.155__tar.gz → 3.13.157__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.
- {tina4_python-3.13.155 → tina4_python-3.13.157}/PKG-INFO +1 -1
- {tina4_python-3.13.155 → tina4_python-3.13.157}/pyproject.toml +1 -1
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/.tina4-metrics.json +8 -8
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/__init__.py +1 -1
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/cli/__init__.py +2 -2
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/core/middleware.py +18 -8
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/core/router.py +17 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/core/server.py +6 -1
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/frond/engine.py +6 -1
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/migration/runner.py +30 -20
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/queue/__init__.py +18 -5
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/queue/kafka_backend.py +8 -1
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/queue/lite_backend.py +12 -1
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/queue/mongo_backend.py +12 -1
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/queue/rabbitmq_backend.py +12 -1
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/queue_backends/kafka_backend.py +31 -5
- {tina4_python-3.13.155 → tina4_python-3.13.157}/.gitignore +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/COMMERCIAL-LICENSE.md +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/LICENSE +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/NOTICE +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/README.md +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/CLAUDE.md +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/HtmlElement.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/Testing.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/_import_helper.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/ai/__init__.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/ai/client.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/api/__init__.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/auth/__init__.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/cache/__init__.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/container/__init__.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/context/__init__.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/context/chunker.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/core/__init__.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/core/cache.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/core/constants.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/core/csp.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/core/events.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/core/port_takeover.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/core/rate_limiter.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/core/request.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/core/response.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/crud/__init__.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/crud/page.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/crud/page_render.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/database/__init__.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/database/adapter.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/database/async_api.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/database/connection.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/database/database_url.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/database/firebird.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/database/mongodb.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/database/mssql.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/database/mysql.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/database/odbc.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/database/pool.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/database/postgres.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/database/sql_translator.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/database/sqlite.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/debug/__init__.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/debug/error_overlay.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/dev_admin/__init__.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/dev_admin/metrics.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/dev_admin/plan.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/dev_admin/project_index.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/docs.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/docstore/__init__.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/dotenv/__init__.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/env.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/frond/FROND.md +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/frond/__init__.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/frond/compiler.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/frond/parser.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/gallery/auth/meta.json +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/gallery/auth/src/routes/api/gallery_auth.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/gallery/database/meta.json +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/gallery/database/src/routes/api/gallery_db.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/gallery/error-overlay/meta.json +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/gallery/error-overlay/src/routes/api/gallery_crash.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/gallery/orm/meta.json +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/gallery/orm/src/orm/Product.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/gallery/orm/src/routes/api/gallery_products.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/gallery/queue/meta.json +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/gallery/queue/src/routes/api/gallery_queue.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/gallery/rest-api/meta.json +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/gallery/rest-api/src/routes/api/gallery_hello.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/gallery/templates/meta.json +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/gallery/templates/src/routes/gallery_page.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/gallery/templates/src/templates/gallery_page.twig +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/graph/__init__.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/graph/adapter.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/graph/adapters/__init__.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/graph/adapters/arango.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/graph/adapters/bolt.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/graph/adapters/ultipa.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/graph/graph_url.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/graphql/__init__.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/i18n/__init__.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/mcp/__init__.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/mcp/protocol.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/mcp/tools.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/messenger/__init__.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/migration/__init__.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/mqtt/__init__.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/mqtt/message.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/orm/__init__.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/orm/async_api.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/orm/collection.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/orm/fields.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/orm/model.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/orm/point.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/public/THIRD-PARTY-NOTICES.md +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/public/__feedback/widget.js +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/public/bundled-component-provenance.json +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/public/css/tina4.css +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/public/css/tina4.min.css +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/public/favicon.ico +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/public/images/logo.svg +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/public/images/tina4-logo-icon.webp +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/public/js/frond.js +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/public/js/frond.min.js +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/public/js/tina4-dev-admin-split.html +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/public/js/tina4-dev-admin.min.js +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/public/js/tina4.min.js +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/public/js/tina4js.min.js +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/public/licenses/swagger-ui-3.10.0-original-notice.txt +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/public/licenses/swagger-ui-5.17.14-NOTICE.txt +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/public/licenses/swagger-ui-Apache-2.0.txt +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/public/licenses/tina4-css-MIT.txt +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/public/licenses/tina4-dev-admin-components.json +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/public/licenses/tina4-dev-admin-third-party.txt +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/public/licenses/tina4-js-MIT.txt +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/public/swagger/index.html +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/public/swagger/oauth2-redirect.html +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/push/__init__.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/push/_base.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/push/_cryptography.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/push/_libcrypto.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/query_builder/__init__.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/queue/amqp_url.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/queue/job.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/queue/topic_dead_letter.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/queue_backends/__init__.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/queue_backends/mongo_backend.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/queue_backends/rabbitmq_backend.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/realtime/__init__.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/realtime/models/Attachment.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/realtime/models/Channel.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/realtime/models/ChannelMember.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/realtime/models/Message.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/realtime/models/Workspace.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/realtime/models/__init__.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/realtime/s3_client.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/realtime/storage.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/seeder/__init__.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/service/__init__.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/session/__init__.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/session_handlers/__init__.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/session_handlers/memcached_handler.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/session_handlers/mongodb_handler.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/session_handlers/redis_handler.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/session_handlers/valkey_handler.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/sso.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/ssrf.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/swagger/__init__.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/templates/components/crud.twig +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/templates/crud/form.twig +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/templates/crud/modals.twig +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/templates/crud/page.twig +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/templates/crud/table.twig +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/templates/docker/distroless/Dockerfile +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/templates/docker/poetry/Dockerfile +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/templates/docker/python/Dockerfile +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/templates/docker/uv/Dockerfile +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/templates/errors/302.twig +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/templates/errors/401.twig +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/templates/errors/403.twig +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/templates/errors/404.twig +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/templates/errors/500.twig +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/templates/errors/502.twig +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/templates/errors/503.twig +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/templates/errors/base.twig +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/templates/frontend/README.md +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/templates/readme.md +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/test/__init__.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/test_client/__init__.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/translations/af/LC_MESSAGES/messages.mo +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/translations/af/LC_MESSAGES/messages.po +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/translations/en/LC_MESSAGES/messages.mo +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/translations/en/LC_MESSAGES/messages.po +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/translations/es/LC_MESSAGES/messages.mo +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/translations/es/LC_MESSAGES/messages.po +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/translations/fr/LC_MESSAGES/messages.mo +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/translations/fr/LC_MESSAGES/messages.po +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/translations/ja/LC_MESSAGES/messages.mo +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/translations/ja/LC_MESSAGES/messages.po +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/translations/zh/LC_MESSAGES/messages.mo +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/translations/zh/LC_MESSAGES/messages.po +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/validator/__init__.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/websocket/__init__.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/websocket/backplane.py +0 -0
- {tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/wsdl/__init__.py +0 -0
|
@@ -1868,14 +1868,14 @@
|
|
|
1868
1868
|
"duplicate_lines": 0
|
|
1869
1869
|
},
|
|
1870
1870
|
"queue_backends/kafka_backend.py": {
|
|
1871
|
-
"offenders":
|
|
1871
|
+
"offenders": 4,
|
|
1872
1872
|
"worst_cc": 13,
|
|
1873
|
-
"maintainability": 12.
|
|
1874
|
-
"loc":
|
|
1875
|
-
"complexity":
|
|
1876
|
-
"avg_complexity": 3.
|
|
1877
|
-
"functions":
|
|
1878
|
-
"halstead_volume":
|
|
1873
|
+
"maintainability": 12.4,
|
|
1874
|
+
"loc": 523,
|
|
1875
|
+
"complexity": 111,
|
|
1876
|
+
"avg_complexity": 3.26,
|
|
1877
|
+
"functions": 34,
|
|
1878
|
+
"halstead_volume": 9657.57,
|
|
1879
1879
|
"has_referencing_test": true,
|
|
1880
1880
|
"dep_count": 8,
|
|
1881
1881
|
"coupling_efferent": 0,
|
|
@@ -35785,4 +35785,4 @@
|
|
|
35785
35785
|
}
|
|
35786
35786
|
}
|
|
35787
35787
|
]
|
|
35788
|
-
}
|
|
35788
|
+
}
|
|
@@ -1397,8 +1397,8 @@ def _next_steps_for(target: str, name: str, resolution: dict, flags: dict) -> li
|
|
|
1397
1397
|
if target == "migration":
|
|
1398
1398
|
return [
|
|
1399
1399
|
"Apply it: tina4 migrate",
|
|
1400
|
-
"Roll back last batch: tina4 migrate
|
|
1401
|
-
"Inspect the pending: tina4 migrate
|
|
1400
|
+
"Roll back last batch: tina4 migrate:rollback",
|
|
1401
|
+
"Inspect the pending: tina4 migrate:status",
|
|
1402
1402
|
]
|
|
1403
1403
|
|
|
1404
1404
|
if target == "middleware":
|
|
@@ -669,15 +669,18 @@ class SecurityHeadersMiddleware:
|
|
|
669
669
|
class CsrfMiddleware:
|
|
670
670
|
"""CSRF token validation middleware.
|
|
671
671
|
|
|
672
|
-
|
|
673
|
-
environment and the framework auto-attaches this middleware at boot
|
|
674
|
-
``attach_csrf_from_env``); or register it explicitly via
|
|
675
|
-
``Router.use(CsrfMiddleware)``. Once attached
|
|
676
|
-
``0``/``no``) is
|
|
672
|
+
Not attached by default. Set ``TINA4_CSRF=true`` (or ``1``/``yes``/``on``)
|
|
673
|
+
in the environment and the framework auto-attaches this middleware at boot
|
|
674
|
+
(see ``attach_csrf_from_env``); or register it explicitly via
|
|
675
|
+
``Router.use(CsrfMiddleware)``. Once attached it enforces unless the kill
|
|
676
|
+
switch ``TINA4_CSRF=false`` (or ``0``/``no``) is set — so with the middleware
|
|
677
|
+
attached but ``TINA4_CSRF`` unset, enforcement is ON (the attach is the opt-in).
|
|
677
678
|
|
|
678
679
|
Behaviour:
|
|
679
680
|
- Skips GET, HEAD, OPTIONS requests.
|
|
680
|
-
- Skips routes
|
|
681
|
+
- Skips routes that opt out with @no_csrf() (server-to-server webhooks).
|
|
682
|
+
@noauth() does NOT skip CSRF (#265): a public form can be open to
|
|
683
|
+
anonymous visitors AND still be protected against cross-site posts.
|
|
681
684
|
- Fails CLOSED: with TINA4_SECRET unset the signing secret resolves to
|
|
682
685
|
blank (there is NO built-in default), and a blank HMAC key is
|
|
683
686
|
publicly reproducible — so no token can be trusted and every write is
|
|
@@ -710,9 +713,16 @@ class CsrfMiddleware:
|
|
|
710
713
|
if method in ("GET", "HEAD", "OPTIONS"):
|
|
711
714
|
return request, response
|
|
712
715
|
|
|
713
|
-
# Skip routes
|
|
716
|
+
# Skip routes that explicitly opt OUT of CSRF with @no_csrf() — the
|
|
717
|
+
# escape hatch for server-to-server endpoints (webhooks, callbacks) that
|
|
718
|
+
# carry no browser session and so have no cross-site-forgery surface.
|
|
719
|
+
# @noauth() no longer skips CSRF (#265): a PUBLIC form must be able to be
|
|
720
|
+
# both open to anonymous visitors AND protected against cross-site posts,
|
|
721
|
+
# so a form token is still validated on an anonymous write route. @noauth
|
|
722
|
+
# controls IDENTITY (who), CSRF controls ORIGIN (did our own form send
|
|
723
|
+
# it) — they are orthogonal, and a webhook opts out of CSRF explicitly.
|
|
714
724
|
handler = getattr(request, "_handler", None)
|
|
715
|
-
if handler and getattr(handler, "
|
|
725
|
+
if handler and getattr(handler, "_no_csrf", False):
|
|
716
726
|
return request, response
|
|
717
727
|
|
|
718
728
|
# Resolve the signing secret ONCE, fail-closed (blank when TINA4_SECRET
|
|
@@ -897,6 +897,23 @@ def secured():
|
|
|
897
897
|
return decorator
|
|
898
898
|
|
|
899
899
|
|
|
900
|
+
def no_csrf():
|
|
901
|
+
"""Opt a route out of CSRF form-token validation.
|
|
902
|
+
|
|
903
|
+
For server-to-server endpoints — webhooks, payment callbacks, API clients
|
|
904
|
+
that already authenticate with a Bearer token — which carry no browser
|
|
905
|
+
session and so have no cross-site-request-forgery surface. Without this a
|
|
906
|
+
public ``@noauth()`` write route is still CSRF-checked when ``TINA4_CSRF`` is
|
|
907
|
+
enabled (#265), which is correct for a browser form but wrong for a webhook.
|
|
908
|
+
CSRF (origin) and auth (identity) are orthogonal: pair ``@no_csrf()`` with
|
|
909
|
+
``@noauth()`` for a public webhook, or use it alone on an authenticated one.
|
|
910
|
+
"""
|
|
911
|
+
def decorator(fn):
|
|
912
|
+
fn._no_csrf = True
|
|
913
|
+
return fn
|
|
914
|
+
return decorator
|
|
915
|
+
|
|
916
|
+
|
|
900
917
|
# ── RBAC guards (Feature 138 / ADR-0058) ──────────────────────
|
|
901
918
|
# Claim-first authorization on top of the JWT auth gate. @role reads the verified
|
|
902
919
|
# `roles` claim, @can reads `permissions`. Multiple args are OR; stack guards for
|
|
@@ -4172,8 +4172,13 @@ def _auto_migrate_on_startup(migration_folder: str = "migrations") -> None:
|
|
|
4172
4172
|
from pathlib import Path
|
|
4173
4173
|
from tina4_python.dotenv import is_truthy
|
|
4174
4174
|
|
|
4175
|
+
from tina4_python.migration.runner import _migration_source_files
|
|
4176
|
+
|
|
4175
4177
|
folder = Path(migration_folder)
|
|
4176
|
-
|
|
4178
|
+
# Both .sql AND .py migrations count — the runner applies both, so a .py-only
|
|
4179
|
+
# migrations folder must still trigger startup auto-migration (#268). Reuse
|
|
4180
|
+
# the one discovery helper so this gate and the runner never disagree.
|
|
4181
|
+
if not folder.is_dir() or not _migration_source_files(folder):
|
|
4177
4182
|
return # no migrations → nothing to do (silent)
|
|
4178
4183
|
if not is_truthy(os.environ.get("TINA4_AUTO_MIGRATE", "true")):
|
|
4179
4184
|
Log.debug("TINA4_AUTO_MIGRATE is off — skipping startup migrations")
|
|
@@ -2333,7 +2333,12 @@ class Frond:
|
|
|
2333
2333
|
next_close = block_close.search(source, scan)
|
|
2334
2334
|
|
|
2335
2335
|
if next_close is None:
|
|
2336
|
-
|
|
2336
|
+
# Malformed — no matching {% endblock %}. Advance past this open
|
|
2337
|
+
# tag (the same as the loop's `else` when the scan runs off the
|
|
2338
|
+
# end) so the outer loop makes progress instead of re-finding this
|
|
2339
|
+
# very block forever and hanging the render (tina4#271).
|
|
2340
|
+
pos = content_start
|
|
2341
|
+
break
|
|
2337
2342
|
|
|
2338
2343
|
if next_open and next_open.start() < next_close.start():
|
|
2339
2344
|
depth += 1
|
|
@@ -676,6 +676,26 @@ def _migration_sort_key(name: str):
|
|
|
676
676
|
return (0, int(m.group(1)), name) if m else (1, 0, name)
|
|
677
677
|
|
|
678
678
|
|
|
679
|
+
def _migration_source_files(folder: Path) -> list:
|
|
680
|
+
"""Every migration file the runner APPLIES — ``.sql`` and ``.py`` — sorted by
|
|
681
|
+
the apply order (numeric/timestamp prefix). Excludes ``.down.sql`` rollback
|
|
682
|
+
files and dunder ``.py`` helpers (``__init__`` etc.).
|
|
683
|
+
|
|
684
|
+
The single source of truth so migrate(), get_files() and status() can never
|
|
685
|
+
disagree on what is pending. They used to each glob ``*.sql`` separately while
|
|
686
|
+
only migrate() also ran ``*.py``, so a pending ``.py`` migration was applied by
|
|
687
|
+
migrate() yet never shown by status() and never triggered startup
|
|
688
|
+
auto-migration (tina4-python#268).
|
|
689
|
+
"""
|
|
690
|
+
if not folder.is_dir():
|
|
691
|
+
return []
|
|
692
|
+
return sorted(
|
|
693
|
+
[f for f in folder.glob("*.sql") if not f.name.endswith(".down.sql")]
|
|
694
|
+
+ [f for f in folder.glob("*.py") if not f.name.startswith("__")],
|
|
695
|
+
key=lambda f: _migration_sort_key(f.name),
|
|
696
|
+
)
|
|
697
|
+
|
|
698
|
+
|
|
679
699
|
# CREATE TABLE <name> — name may be quoted ("x"), bracketed ([x] MSSQL), or bare.
|
|
680
700
|
_CREATE_TABLE_RE = re.compile(
|
|
681
701
|
r"^\s*CREATE\s+TABLE\s+(?:IF\s+NOT\s+EXISTS\s+)?"
|
|
@@ -900,15 +920,9 @@ def _run_pending(db, migration_folder: str = "migrations", delimiter: str = ";")
|
|
|
900
920
|
batch = _get_next_batch(db)
|
|
901
921
|
ran = []
|
|
902
922
|
|
|
903
|
-
# Collect both .sql and .py migration files
|
|
904
|
-
#
|
|
905
|
-
|
|
906
|
-
# prefix sort after the numbered ones, then lexically.
|
|
907
|
-
migration_files = sorted(
|
|
908
|
-
[f for f in folder.glob("*.sql") if not f.name.endswith(".down.sql")]
|
|
909
|
-
+ [f for f in folder.glob("*.py") if not f.name.startswith("__")],
|
|
910
|
-
key=lambda f: _migration_sort_key(f.name),
|
|
911
|
-
)
|
|
923
|
+
# Collect both .sql and .py migration files, in apply order — the one
|
|
924
|
+
# discovery helper that get_files() and status() also use (#268).
|
|
925
|
+
migration_files = _migration_source_files(folder)
|
|
912
926
|
# Warn (once) about filenames without a recognized NNNNNN_/timestamp prefix —
|
|
913
927
|
# their ordering relative to numbered migrations is undefined, a silent
|
|
914
928
|
# out-of-order-apply footgun.
|
|
@@ -1200,11 +1214,9 @@ class Migration:
|
|
|
1200
1214
|
return self.status()["pending"]
|
|
1201
1215
|
|
|
1202
1216
|
def get_files(self) -> list[str]:
|
|
1203
|
-
"""
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
return []
|
|
1207
|
-
return sorted(f.name for f in folder.glob("*.sql") if not f.name.endswith(".down.sql"))
|
|
1217
|
+
"""Sorted migration filenames on disk — both .sql and .py (the two the
|
|
1218
|
+
runner applies), excluding .down.sql and dunder .py (#268)."""
|
|
1219
|
+
return [f.name for f in _migration_source_files(Path(self._dir))]
|
|
1208
1220
|
|
|
1209
1221
|
def record_migration(self, name: str, batch: int, passed: int = 1) -> None:
|
|
1210
1222
|
"""Insert a record into the migration tracking table.
|
|
@@ -1245,11 +1257,9 @@ def _status(db, migration_folder: str = "migrations") -> dict:
|
|
|
1245
1257
|
|
|
1246
1258
|
executed = _get_executed(db)
|
|
1247
1259
|
|
|
1248
|
-
#
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
if not f.name.endswith(".down.sql")
|
|
1252
|
-
)
|
|
1260
|
+
# Every migration the runner would apply — .sql AND .py — so a pending .py
|
|
1261
|
+
# migration shows up here instead of being invisible until it runs (#268).
|
|
1262
|
+
migration_files = _migration_source_files(folder)
|
|
1253
1263
|
|
|
1254
1264
|
# Build completed list from the database with execution metadata
|
|
1255
1265
|
result = db.fetch(
|
|
@@ -1268,7 +1278,7 @@ def _status(db, migration_folder: str = "migrations") -> dict:
|
|
|
1268
1278
|
|
|
1269
1279
|
# Build pending list from files not yet executed
|
|
1270
1280
|
pending = []
|
|
1271
|
-
for sql_file in
|
|
1281
|
+
for sql_file in migration_files:
|
|
1272
1282
|
migration_name = sql_file.stem
|
|
1273
1283
|
if migration_name not in executed:
|
|
1274
1284
|
desc = re.sub(r"^\d+_", "", migration_name, count=1).replace("_", " ")
|
|
@@ -124,9 +124,19 @@ class Queue:
|
|
|
124
124
|
self.retry_backoff, self.visibility_timeout,
|
|
125
125
|
)
|
|
126
126
|
|
|
127
|
-
def push(self, data: dict, priority: int = 0, delay_seconds: int = 0
|
|
128
|
-
|
|
129
|
-
|
|
127
|
+
def push(self, data: dict, priority: int = 0, delay_seconds: int = 0,
|
|
128
|
+
raw: bool = False):
|
|
129
|
+
"""Add a job to the queue. Returns job ID.
|
|
130
|
+
|
|
131
|
+
``raw=True`` is a Kafka-only option (#264): it produces the value with
|
|
132
|
+
NO Tina4 envelope ({payload, priority, attempts}) and no injected id, so
|
|
133
|
+
a non-Tina4 service consuming the topic receives the exact schema it
|
|
134
|
+
expects. On the file/rabbitmq/mongodb backends the envelope is internal
|
|
135
|
+
bookkeeping that pop(), retries and dead-lettering depend on, so there is
|
|
136
|
+
nothing to omit — those backends refuse raw=True by name rather than
|
|
137
|
+
silently ignore it.
|
|
138
|
+
"""
|
|
139
|
+
return self._backend.push(data, priority, delay_seconds, raw)
|
|
130
140
|
|
|
131
141
|
def pop(self) -> Job | None:
|
|
132
142
|
"""Atomically claim the next available job. Returns None if empty."""
|
|
@@ -303,9 +313,12 @@ class Queue:
|
|
|
303
313
|
self._backend.close()
|
|
304
314
|
|
|
305
315
|
def produce(self, topic: str, data: dict, priority: int = 0,
|
|
306
|
-
delay_seconds: int = 0, delay_until: datetime | None = None
|
|
316
|
+
delay_seconds: int = 0, delay_until: datetime | None = None,
|
|
317
|
+
raw: bool = False):
|
|
307
318
|
"""Produce a message onto a topic. Convenience wrapper around push().
|
|
308
319
|
|
|
320
|
+
``raw`` behaves exactly as on push() — Kafka-only, un-enveloped (#264).
|
|
321
|
+
|
|
309
322
|
Either ``delay_seconds`` (integer offset) or ``delay_until``
|
|
310
323
|
(absolute ``datetime``) may be passed for scheduled jobs. ``delay_until``
|
|
311
324
|
takes precedence when both are set — naive datetimes are interpreted
|
|
@@ -322,7 +335,7 @@ class Queue:
|
|
|
322
335
|
old_topic = self.topic
|
|
323
336
|
self._retarget(topic)
|
|
324
337
|
try:
|
|
325
|
-
return self.push(data, priority, delay_seconds)
|
|
338
|
+
return self.push(data, priority, delay_seconds, raw)
|
|
326
339
|
finally:
|
|
327
340
|
self._retarget(old_topic)
|
|
328
341
|
|
|
@@ -32,7 +32,8 @@ class KafkaBackend(TopicDeadLetterMixin):
|
|
|
32
32
|
self._topic = topic
|
|
33
33
|
self._max_retries = max_retries
|
|
34
34
|
|
|
35
|
-
def push(self, data: dict, priority: int = 0, delay_seconds: int = 0
|
|
35
|
+
def push(self, data: dict, priority: int = 0, delay_seconds: int = 0,
|
|
36
|
+
raw: bool = False) -> str:
|
|
36
37
|
if priority > 0:
|
|
37
38
|
raise NotImplementedError(
|
|
38
39
|
"The kafka queue backend cannot honour push(priority): Kafka has "
|
|
@@ -48,6 +49,12 @@ class KafkaBackend(TopicDeadLetterMixin):
|
|
|
48
49
|
"every record behind it. Use the file or mongodb backend for "
|
|
49
50
|
"delayed jobs, or schedule the push itself."
|
|
50
51
|
)
|
|
52
|
+
if raw:
|
|
53
|
+
# Emit the value exactly as given — no {payload, priority, attempts}
|
|
54
|
+
# envelope and no injected id — so a non-Tina4 consumer reading the
|
|
55
|
+
# topic gets the schema it expects (#264). The symmetric unwrap is
|
|
56
|
+
# already on pop(): result.get("payload", result).
|
|
57
|
+
return self._backend.enqueue(self._topic, data, add_id=False)
|
|
51
58
|
msg = {"payload": data, "priority": priority, "attempts": 0}
|
|
52
59
|
return self._backend.enqueue(self._topic, msg)
|
|
53
60
|
|
|
@@ -93,7 +93,18 @@ class LiteBackend:
|
|
|
93
93
|
self._seq += 1
|
|
94
94
|
return f"{int(time.time() * 1000)}-{self._seq:06d}"
|
|
95
95
|
|
|
96
|
-
def push(self, data: dict, priority: int = 0, delay_seconds: int = 0
|
|
96
|
+
def push(self, data: dict, priority: int = 0, delay_seconds: int = 0,
|
|
97
|
+
raw: bool = False) -> str:
|
|
98
|
+
if raw:
|
|
99
|
+
raise NotImplementedError(
|
|
100
|
+
"The file queue backend cannot honour push(raw=True): raw emits "
|
|
101
|
+
"the message with no Tina4 envelope, which only a message bus "
|
|
102
|
+
"consumed by non-Tina4 systems (Kafka) needs. This backend stores "
|
|
103
|
+
"an internal envelope (id/status/attempts/available_at) that "
|
|
104
|
+
"pop(), the retry lifecycle and dead-lettering depend on, so there "
|
|
105
|
+
"is nothing to omit. Use the kafka backend for raw external "
|
|
106
|
+
"messages."
|
|
107
|
+
)
|
|
97
108
|
job_id = str(uuid.uuid4())
|
|
98
109
|
available = _now() if delay_seconds == 0 else _future(delay_seconds)
|
|
99
110
|
job = {
|
|
@@ -41,7 +41,18 @@ class MongoBackend:
|
|
|
41
41
|
self._topic = topic
|
|
42
42
|
self._max_retries = max_retries
|
|
43
43
|
|
|
44
|
-
def push(self, data: dict, priority: int = 0, delay_seconds: int = 0
|
|
44
|
+
def push(self, data: dict, priority: int = 0, delay_seconds: int = 0,
|
|
45
|
+
raw: bool = False) -> str:
|
|
46
|
+
if raw:
|
|
47
|
+
raise NotImplementedError(
|
|
48
|
+
"The mongodb queue backend cannot honour push(raw=True): raw "
|
|
49
|
+
"emits the message with no Tina4 envelope, which only a message "
|
|
50
|
+
"bus consumed by non-Tina4 systems (Kafka) needs. This backend "
|
|
51
|
+
"stores an internal envelope (payload/priority/attempts) that "
|
|
52
|
+
"pop(), the retry lifecycle and dead-lettering depend on, so there "
|
|
53
|
+
"is nothing to omit. Use the kafka backend for raw external "
|
|
54
|
+
"messages."
|
|
55
|
+
)
|
|
45
56
|
msg = {"payload": data, "priority": priority, "attempts": 0}
|
|
46
57
|
return self._backend.enqueue(self._topic, msg, delay_seconds)
|
|
47
58
|
|
|
@@ -31,7 +31,18 @@ class RabbitMQBackend(TopicDeadLetterMixin):
|
|
|
31
31
|
self._max_retries = max_retries
|
|
32
32
|
self._jobs: dict = {} # track jobs by id for complete/fail/retry
|
|
33
33
|
|
|
34
|
-
def push(self, data: dict, priority: int = 0, delay_seconds: int = 0
|
|
34
|
+
def push(self, data: dict, priority: int = 0, delay_seconds: int = 0,
|
|
35
|
+
raw: bool = False) -> str:
|
|
36
|
+
if raw:
|
|
37
|
+
raise NotImplementedError(
|
|
38
|
+
"The rabbitmq queue backend cannot honour push(raw=True): raw "
|
|
39
|
+
"emits the message with no Tina4 envelope, which only a message "
|
|
40
|
+
"bus consumed by non-Tina4 systems (Kafka) needs. This backend "
|
|
41
|
+
"stores an internal envelope (payload/priority/attempts) that "
|
|
42
|
+
"pop(), the retry lifecycle and dead-lettering depend on, so there "
|
|
43
|
+
"is nothing to omit. Use the kafka backend for raw external "
|
|
44
|
+
"messages."
|
|
45
|
+
)
|
|
35
46
|
if priority > 0:
|
|
36
47
|
raise NotImplementedError(
|
|
37
48
|
"The rabbitmq queue backend cannot honour push(priority): "
|
{tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/queue_backends/kafka_backend.py
RENAMED
|
@@ -12,6 +12,13 @@ Kafka wire protocol over TCP sockets (zero dependencies).
|
|
|
12
12
|
Environment variables:
|
|
13
13
|
TINA4_KAFKA_BROKERS — comma-separated broker list (default: localhost:9092)
|
|
14
14
|
TINA4_KAFKA_GROUP_ID — consumer group ID (default: tina4_consumer_group)
|
|
15
|
+
TINA4_KAFKA_AUTO_OFFSET_RESET — where a NEW consumer group starts when it has
|
|
16
|
+
no committed offset: 'earliest' (default, unchanged behaviour) or 'latest'.
|
|
17
|
+
Read as TINA4_KAFKA_AUTO_OFFSET_RESET first, then bare KAFKA_AUTO_OFFSET_RESET
|
|
18
|
+
(the librdkafka-convention name many deployments already set). Takes effect
|
|
19
|
+
on the confluent-kafka consume path; the zero-dependency raw fallback always
|
|
20
|
+
reads from the earliest retained offset (it tracks offsets from 0 and has no
|
|
21
|
+
offset-reset concept).
|
|
15
22
|
|
|
16
23
|
TLS/SASL (each read as TINA4_KAFKA_<NAME> first, then bare KAFKA_<NAME>):
|
|
17
24
|
TINA4_KAFKA_SECURITY_PROTOCOL — e.g. SSL / SASL_SSL (default: PLAINTEXT)
|
|
@@ -90,11 +97,23 @@ class KafkaConnector:
|
|
|
90
97
|
else:
|
|
91
98
|
self._connect_raw()
|
|
92
99
|
|
|
93
|
-
def enqueue(self, topic: str, message: dict) -> str:
|
|
94
|
-
"""Push a message onto a Kafka topic. Returns the message ID.
|
|
100
|
+
def enqueue(self, topic: str, message: dict, add_id: bool = True) -> str:
|
|
101
|
+
"""Push a message onto a Kafka topic. Returns the message ID.
|
|
102
|
+
|
|
103
|
+
``add_id`` (default True) stamps a generated ``id`` into the message
|
|
104
|
+
value so a Tina4 consumer can acknowledge it. For a RAW produce
|
|
105
|
+
(``Queue.push(raw=True)``, #264) it is False: the value is serialized
|
|
106
|
+
exactly as given — no ``id`` injected and the caller's dict is not
|
|
107
|
+
mutated — so a non-Tina4 consumer receives the bytes it expects. A
|
|
108
|
+
record key is still generated for partitioning; the key is never part
|
|
109
|
+
of the value.
|
|
110
|
+
"""
|
|
95
111
|
self._ensure_connected()
|
|
96
|
-
|
|
97
|
-
|
|
112
|
+
if add_id:
|
|
113
|
+
msg_id = message.get("id", secrets.token_hex(8))
|
|
114
|
+
message["id"] = msg_id
|
|
115
|
+
else:
|
|
116
|
+
msg_id = secrets.token_hex(8) # record key only; never written into the value
|
|
98
117
|
body = json.dumps(message, default=str)
|
|
99
118
|
|
|
100
119
|
if self._use_confluent:
|
|
@@ -233,12 +252,19 @@ class KafkaConnector:
|
|
|
233
252
|
"bootstrap.servers": self._brokers,
|
|
234
253
|
"client.id": self._client_id,
|
|
235
254
|
"group.id": self._group_id,
|
|
236
|
-
"auto.offset.reset":
|
|
255
|
+
"auto.offset.reset": self._offset_reset(),
|
|
237
256
|
"enable.auto.commit": False,
|
|
238
257
|
**security,
|
|
239
258
|
}
|
|
240
259
|
self._consumer = self._confluent.Consumer(consumer_conf)
|
|
241
260
|
|
|
261
|
+
@staticmethod
|
|
262
|
+
def _offset_reset() -> str:
|
|
263
|
+
"""Consumer auto.offset.reset from env: TINA4_KAFKA_AUTO_OFFSET_RESET,
|
|
264
|
+
then bare KAFKA_AUTO_OFFSET_RESET, default 'earliest' (#263)."""
|
|
265
|
+
return (os.environ.get("TINA4_KAFKA_AUTO_OFFSET_RESET")
|
|
266
|
+
or os.environ.get("KAFKA_AUTO_OFFSET_RESET") or "earliest")
|
|
267
|
+
|
|
242
268
|
@staticmethod
|
|
243
269
|
def _security_config() -> dict:
|
|
244
270
|
"""Build SSL/SASL client config from env (for a TLS broker/proxy).
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{tina4_python-3.13.155 → tina4_python-3.13.157}/tina4_python/gallery/error-overlay/meta.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|