Skip to main content

Civic Exchange Protocol (CEP)

PyPI Python versions License: Apache 2.0 CI Status Docs Security Policy Link Check

Interoperable data standards for describing entities, relationships, and value exchanges across civic systems.

Overview

The Civic Exchange Protocol defines a coherent, verifiable way to describe:

  • Entities (organizations, agencies, districts, people)
  • Relationships (grant awards, contracts, reporting relationships)
  • Exchanges of value (payments, disbursements, transfers)

CEP records are:

  • JSON Schema–validated
  • Fully typed
  • Deterministic and versioned
  • Extensible across jurisdictions and data ecosystems
  • Designed for cross-system interoperability

Documentation: https://civic-interconnect.github.io/civic-exchange-protocol/

Repository Structure

/
├── schema/                     # Official CEP JSON Schemas
│   ├── cep.entity.schema.json
│   ├── cep.relationship.schema.json
│   ├── cep.exchange.schema.json
│   └── cep.entity.identifier-scheme.schema.json
│
├── vocabulary/                 # Versioned controlled vocabularies
│   ├── entity-type.v1.0.0.json
│   ├── exchange-type.v1.0.0.json
│   ├── exchange-role.v1.0.0.json
│   ├── party-role.v1.0.0.json
│   ├── value-type.v1.0.0.json
│   └── resolution-method.v1.0.0.json
│
├── src/python/                 # Python reference implementation
│   ├── src/civic_exchange_protocol/
│   └── tests/
│
├── src/rust/                   # Rust reference implementation
│   ├── cep-core/
│   ├── cep-entity/
│   ├── cep-exchange/
│   └── cep-relationship/
│
├── docs/                       # MkDocs documentation site
└── .github/workflows/          # CI, Docs deploy, PyPI release

Python Reference Implementation

Install from PyPI:

pip install civic-exchange-protocol

CLI entrypoint:

cx --help

Includes:

  • Pydantic models for Entity / Relationship / Exchange
  • Deterministic record hashing
  • Attestation helpers
  • Built-in JSON Schema validator
  • Test vectors for conformance

Rust Reference Implementation

The repository includes a Rust workspace with:

  • cep-core
  • cep-entity
  • cep-exchange
  • cep-relationship

To build:

cd src/rust
cargo build

Each crate inherits version, license, and repository metadata from the workspace root.

Schemas

Official schemas live under /schema and are published with stable URLs such as:

https://raw.githubusercontent.com/civic-interconnect/civic-exchange-protocol/main/schema/cep.entity.schema.json

Documentation includes a browser-embedded validator using Ajv.

Security Policy

We support responsible disclosure through GitHub’s Private Vulnerability Report feature.

See: SECURITY.md

Contributing

Metadata

Release files for civic-exchange-protocol 0.0.4

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

Source distribution (sdist)

Source distribution for civic-exchange-protocol 0.0.4
File Size Uploaded
civic_exchange_protocol-0.0.4.tar.gz 227.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for civic-exchange-protocol 0.0.4
File Interpreter ABI Platform
civic_exchange_protocol-0.0.4-py3-none-any.whl Python 3 none any Details

Total release size: 275.7 kB

Release files / civic_exchange_protocol-0.0.4.tar.gz

Download URL civic_exchange_protocol-0.0.4.tar.gz
Size 227.1 kB
Tags Source
SHA-256 checksum
How to use checksums
f7415e4e0f7349b39518d5c919ae76b57b5222b551b8df8a031f98fc56e14c52
BLAKE2b-256 checksum
How to use checksums
a10abeab74b5636a67f134c8663a6db46eb69b32dc74190f471b4e5444da8e43
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 29, 2025.

Transparency log

Release files / civic_exchange_protocol-0.0.4-py3-none-any.whl

Download URL civic_exchange_protocol-0.0.4-py3-none-any.whl
Size 48.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5620d667c6923b342856475ead4e76336ac737d94a491a44618a2de636bdd151
BLAKE2b-256 checksum
How to use checksums
894a6d3b9c9dfe52ab40bc59a3534c804b3bbffb2ac687394795d54f3e262bce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 29, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

0.0.4 This release

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

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