Skip to content

civic-interconnect/civic-exchange-protocol

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

/
├── schemas/                    # 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
cx validate-json examples/entity/school_district_01.json --schema entity
cx validate-json examples/entity --schema entity
cx validate-json examples/exchange --schema exchange --recursive

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 /schemas and are published with stable URLs such as:

https://raw.githubusercontent.com/civic-interconnect/civic-exchange-protocol/main/schemas/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

About

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

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •