Skip to main content

Financial Data Protocol

Financial Data Protocol (FDP) is infrastructure for registering and tracing exact financial source materials across business systems.

FDP answers questions such as:

  • What exact bytes were registered?
  • Which business Artifact refers to those bytes?
  • Which immutable Package Revision was used?
  • Which system declared a transfer, disclosure, or use?
  • Can the retrieved bytes still be verified against their registered identity?

FDP records structure, identity, integrity, provenance, visibility, and immutable history. The business system that declares a material remains responsible for its business meaning and truth.

Current deployment profile

The current FDP product provides Central FDP: a shared service with Registry Spaces, PostgreSQL Registry storage, S3-compatible Content custody, authenticated transports, and a typed client. The previously described Embedded/local warehouse profile is not part of the current product surface.

The Central capability milestones are incremental:

C0 protocol records and schemas
  -> C1 custody and transaction contract
  -> C2 durable Registry, object custody, and typed client
  -> C3 immutable finance handoffs
  -> C4 disclosure and evidence references
  -> C5 one-writer Space authority cutover
  -> C6 global physical Blob deduplication

See docs/central-capabilities.md for the implementation details of these milestones. Version history belongs in CHANGELOG.md.

Current Central interface

The current packaged command is fdp-central. Its commands are:

fdp-central serve
fdp-central init-db
fdp-central blob-sweep --month 2026-08

The Central HTTP service exposes health/readiness/version endpoints, Content staging and finalization, verified Content retrieval, Artifact and Package Revision registration, declarations, finance handoffs, disclosure operations, and authority operations.

Start the configured service with:

uv sync --locked --extra dev
uv run fdp-central init-db
uv run fdp-central serve

init-db initializes an empty configured MongoDB Registry or upgrades a canonical revision 6 Registry to revision 7. Collections whose names start with _ are ignored when checking an empty database; other unknown or inconsistent application collections are rejected. blob-sweep reconciles final Blob objects for one UTC month, for example --month 2026-08; it runs as a dry-run unless --apply is supplied.

The service reads the root config.yaml. Configure MongoDB, S3-compatible storage, HTTP settings, and the global admin identity there. Non-admin tokens are managed in the web console and stored in the Registry. Protect the configuration because it contains deployment credentials. Deployment prerequisites and examples are documented in docs/central-deployment.md.

The Docker image also builds and serves the Vue viewer. After starting the container, open the same HTTP origin at http://127.0.0.1:18080/; no separate frontend deployment is required.

Python client

CentralClient sends strict typed requests through a CentralTransport. For an in-process test, use deterministic in-memory custody implementations:

from financial_data_protocol import (
    CentralClient,
    CentralService,
    ContextSpaceAuthorizer,
    InMemoryContentCustody,
    InMemoryRegistryCustody,
    InProcessCentralTransport,
    StaticMachineTokenAuthenticator,
    StaticMachineTokenBinding,
)

transport = InProcessCentralTransport(
    CentralService(
        registry=InMemoryRegistryCustody(),
        content_custody=InMemoryContentCustody(),
        authorizer=ContextSpaceAuthorizer(),
    ),
    StaticMachineTokenAuthenticator((
        StaticMachineTokenBinding(
            "legal-api", "development-token", frozenset({"legal"})
        ),
    )),
)
client = CentralClient(
    transport,
    machine_token="development-token",
    caller_id="legal-api",
    registry_space_id="legal",
)

For a deployed service, use the same CentralClient API with HttpCentralTransport:

from financial_data_protocol import CentralClient, HttpCentralTransport

client = CentralClient(
    HttpCentralTransport("https://central.example", "machine-token", "legal-api"),
    machine_token="machine-token",
    caller_id="legal-api",
    registry_space_id="legal",
)

All writes require a stable idempotency key. Repeating the same canonical request replays its original result; reusing a key for a different request returns a conflict. Content uploads and retrievals verify the declared size and SHA-256.

Central schema revision 6 introduced separation between Space-local Content registration and global physical Blob custody. central_contents keeps each Space's Content identity, while content_blobs stores one physical object for each global (sha256, size_bytes) identity and tracks its reference count. The upload/finalize path performs Blob discovery internally, so clients never need cross-Space catalog access. Identical bytes registered in different Spaces share one object-store key:

central/<UTC creation date>/<blob_id>

Temporary staged objects are removed after successful finalization, and provisional Blob objects are removed if the Registry transaction rejects the finalize request. PostgreSQL and MongoDB both support the C6 model. Schema revision 7 adds durable scoped machine tokens and can upgrade a canonical revision 6 Registry. See the C6 section in docs/central-capabilities.md for the complete identity, idempotency, and migration semantics.

Scope

FDP does not decide whether a contract is approved or compliant, whether a payment is allowed, whether an invoice is valid, or whether an accounting entry is correct. It does not provide IAM, Registry federation, a queue, a general RAG system, or downstream workflow and output management. See docs/product-definition.md for the complete product boundary.

Documentation

Development checks

uv sync --locked --extra dev
uv run python -m pytest -q
uv run python -m ruff check .
uv run python -m mypy
uv run python -m build

Metadata

Release files for financial-data-protocol 0.3.3

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

Source distribution (sdist)

Source distribution for financial-data-protocol 0.3.3
File Size Uploaded Provenance Actions
financial_data_protocol-0.3.3.tar.gz 135.9 kB Without provenance Details for financial_data_protocol-0.3.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for financial-data-protocol 0.3.3
File Interpreter ABI Platform Actions
financial_data_protocol-0.3.3-py3-none-any.whl Python 3 none any Details for financial_data_protocol-0.3.3-py3-none-any.whl

Total release size: 256.2 kB

Release files / financial_data_protocol-0.3.3.tar.gz

Download URL financial_data_protocol-0.3.3.tar.gz
Size 135.9 kB
Tags Source
SHA-256 checksum
How to use checksums
5a9dc27fc1a655b5940e4b559016219ecac7c9f5795ecf7ab464a962f2e67a62
BLAKE2b-256 checksum
How to use checksums
6a588b75a63ca88604ebd6ba34d48c2c6ef837e0d0b7c21d7f75695e379e71c9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.0 {"installer":{"name":"uv","version":"0.12.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / financial_data_protocol-0.3.3-py3-none-any.whl

Download URL financial_data_protocol-0.3.3-py3-none-any.whl
Size 120.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1334776f8f867382959913d4070109f30d0b3981645d065699795d3c3de181fc
BLAKE2b-256 checksum
How to use checksums
c13a3587533b85cc51cc9f21589cdbd05303c20cf71e7a5a2c9771bbe261ac09
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.0 {"installer":{"name":"uv","version":"0.12.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for financial-data-protocol 0.3.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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