Initial commit — Performance West telecom compliance platform
Includes: API (Express/TypeScript), Astro site, Python workers, document generators, FCC compliance tools, Canada CRTC formation, Ansible infrastructure, and deployment scripts. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
commit
f8cd37ac8c
1823 changed files with 145167 additions and 0 deletions
34
scripts/workers/cdr_adapters/__init__.py
Normal file
34
scripts/workers/cdr_adapters/__init__.py
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
"""CDR format adapters.
|
||||
|
||||
Each adapter parses a switch-specific CDR file format into a normalized
|
||||
``CDRRow`` stream consumed by the ingester. Selection is driven by the
|
||||
``cdr_ingestion_profiles.format`` column (or inferred from a switch preset).
|
||||
|
||||
Contract: ``BaseCDRAdapter.iter_rows(path_or_bytes) -> Iterator[CDRRow]``
|
||||
plus ``Adapter.FORMAT_SLUG`` and required-column metadata used by the
|
||||
validator.
|
||||
"""
|
||||
|
||||
from .base import BaseCDRAdapter, CDRRow, ValidationError
|
||||
from .generic_csv import GenericCSVAdapter
|
||||
from .asterisk import AsteriskAdapter
|
||||
from .freeswitch import FreeSWITCHAdapter
|
||||
from .netsapiens import NetSapiensAdapter
|
||||
|
||||
ADAPTERS: dict[str, type[BaseCDRAdapter]] = {
|
||||
"generic_csv": GenericCSVAdapter,
|
||||
"asterisk": AsteriskAdapter,
|
||||
"freeswitch": FreeSWITCHAdapter,
|
||||
"netsapiens": NetSapiensAdapter,
|
||||
}
|
||||
|
||||
__all__ = [
|
||||
"ADAPTERS",
|
||||
"BaseCDRAdapter",
|
||||
"CDRRow",
|
||||
"ValidationError",
|
||||
"GenericCSVAdapter",
|
||||
"AsteriskAdapter",
|
||||
"FreeSWITCHAdapter",
|
||||
"NetSapiensAdapter",
|
||||
]
|
||||
Loading…
Add table
Add a link
Reference in a new issue