Skip to main content

LibreDTE: Bridge Python para la Biblioteca PHP (Core)

Bridge que expone, desde Python, las operaciones de libredte/libredte-lib-core, a través de libredte-lib-core-dispatcher, usando derafu-backbone-bridge como base.

Uso

from libredte_lib_core_bridge import Dispatcher

dispatcher = Dispatcher()  # environment='prod', debug=False por defecto

result = dispatcher.dispatch(
    'billing.identifier.caf_loader::load',
    xml=xml_base64,
)
caf = result.value
result.metadata  # ExecutionMetadata: tiempo, memoria, etc.

dispatch() nunca deja pasar un error de PHP sin tipar: lanza una excepción Python (derafu_backbone_bridge.BackboneBridgeError o una de sus subclases) en vez de una excepción PHP cruda. Esa excepción carga el Problem/ExecutionMetadata reales detrás del error (.problem, .metadata), no solo un mensaje y un nombre de clase.

Arquitectura

  • Dispatcher es una subclase de derafu_backbone_bridge.GenericDispatcher, pre-cableada con el Bootstrap::boot() de libredte-lib-core-dispatcher.

  • No sabe dónde vive el código PHP en disco: eso se resuelve vía la variable de entorno BACKBONE_DISPATCHER_AUTOLOAD (o pasando autoload_path explícito al construir Dispatcher).

  • No importa phpy en ningún punto: todo el manejo de phpy vive dentro de derafu-backbone-bridge.

Desarrollo

make install-dev
make check   # ruff + tests

Los tests requieren phpy (solo disponible dentro del contenedor docker-python3.14-caddy-server construido con PHPY_ENABLED=true) y una instalación real de libredte-lib-core-dispatcher (con sus propias dependencias de Composer) accesible en disco. No usan ningún fixture externo: generan un CAF real y válido en memoria vía el propio caf_faker::create de libredte-lib-core.

Términos y condiciones de uso

Este proyecto es software libre y puede ser redistribuido y/o modificado bajo los términos de la Licencia Pública General Affero de GNU (AGPL), versión 3 o (a elección) cualquier versión posterior. Ver COPYING.

Metadata

Release files for libredte-lib-core-bridge 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for libredte-lib-core-bridge 0.2.0
File Size Uploaded
libredte_lib_core_bridge-0.2.0.tar.gz 31.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for libredte-lib-core-bridge 0.2.0
File Interpreter ABI Platform
libredte_lib_core_bridge-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 59.7 kB

Release files / libredte_lib_core_bridge-0.2.0.tar.gz

Download URL libredte_lib_core_bridge-0.2.0.tar.gz
Size 31.0 kB
Tags Source
SHA-256 checksum
How to use checksums
c1ad5022bdde1cb3d829afa768ca1c298ac58be3e5a82a38e670b5b4984f7546
BLAKE2b-256 checksum
How to use checksums
4b858a85bc2377aa27f6c637b44a494da7b282f1a132c05126bb721378b89c77
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.3

Release files / libredte_lib_core_bridge-0.2.0-py3-none-any.whl

Download URL libredte_lib_core_bridge-0.2.0-py3-none-any.whl
Size 28.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
77820892b5f2e01f4ad5a9d593e353a897971a670b930fee330bd928952c0ab4
BLAKE2b-256 checksum
How to use checksums
cffba6af3fa80faf810cdb2c4cd236f108cdf090463635ab525621f58ffb8743
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.3

Release history Release notifications | RSS feed

0.2.1

2 release files

This release

0.2.0 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page