Civic Exchange Protocol for Python projects
Project description
Civic Exchange Protocol (CEP)
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-corecep-entitycep-exchangecep-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
- See CONTRIBUTING.md
- See DEVELOPER.md
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file civic_exchange_protocol-0.0.1.tar.gz.
File metadata
- Download URL: civic_exchange_protocol-0.0.1.tar.gz
- Upload date:
- Size: 176.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e229f38f8ed795c2b2e1b4ea130b139461d44f4ed614e555416c76f5579cbd35
|
|
| MD5 |
cd4f22f37ed17ebf46f7772fa514e316
|
|
| BLAKE2b-256 |
b653c98d5426271fbf060c7fe5fc5d22e2b0ad57c97d58fed4c4a63c37d1cecf
|
Provenance
The following attestation bundles were made for civic_exchange_protocol-0.0.1.tar.gz:
Publisher:
release-python.yml on civic-interconnect/civic-exchange-protocol
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
civic_exchange_protocol-0.0.1.tar.gz -
Subject digest:
e229f38f8ed795c2b2e1b4ea130b139461d44f4ed614e555416c76f5579cbd35 - Sigstore transparency entry: 731281180
- Sigstore integration time:
-
Permalink:
civic-interconnect/civic-exchange-protocol@7a6d63f79e6f8bff0f954a8eeefd2b660361ec94 -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/civic-interconnect
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-python.yml@7a6d63f79e6f8bff0f954a8eeefd2b660361ec94 -
Trigger Event:
push
-
Statement type:
File details
Details for the file civic_exchange_protocol-0.0.1-py3-none-any.whl.
File metadata
- Download URL: civic_exchange_protocol-0.0.1-py3-none-any.whl
- Upload date:
- Size: 34.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f1d33f5c2b1c4dce42632d3c13c633017cbde4a14ef8777ff251b80e4f80656a
|
|
| MD5 |
487e6794556c8507dfa6678081f9565d
|
|
| BLAKE2b-256 |
cb26073fb5677a057e02864a7f93dead0d34535fc76ac0aed44ec6eb65d56211
|
Provenance
The following attestation bundles were made for civic_exchange_protocol-0.0.1-py3-none-any.whl:
Publisher:
release-python.yml on civic-interconnect/civic-exchange-protocol
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
civic_exchange_protocol-0.0.1-py3-none-any.whl -
Subject digest:
f1d33f5c2b1c4dce42632d3c13c633017cbde4a14ef8777ff251b80e4f80656a - Sigstore transparency entry: 731281181
- Sigstore integration time:
-
Permalink:
civic-interconnect/civic-exchange-protocol@7a6d63f79e6f8bff0f954a8eeefd2b660361ec94 -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/civic-interconnect
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-python.yml@7a6d63f79e6f8bff0f954a8eeefd2b660361ec94 -
Trigger Event:
push
-
Statement type: