aeat.application.live._session module

Live AEAT session acquisition helpers.

This module is the shared read-only entry gate for application-live services. It loads Settings, enforces aeat.core.access_gate.AeatAccessGate.require_live_read(), and only then returns an authenticated AeatSession. It never calls require_live_write and never performs AEAT-side mutations.

See also

AeatAccessGate

Core gate that authorizes pytest live reads and refuses all live writes.

ensure_authenticated_aeat_session()

Auth service called only after the read gate passes.

aeat.application.live

Public read-only live facade that routes remote acquisition helpers through this session boundary.

async active_verified_session(*, operation='live-filed-read', target_url=None)[source]

Return an AeatSession and Settings after the live-read gate.

The operation and optional target_url are forwarded to the authentication service for diagnostics and provider routing after AeatAccessGate has authorized a read-only live operation.

Return type:

tuple[AeatSession, Settings]

Parameters:
  • operation (str)

  • target_url (str | None)