Civic Transparency SDK - Development kit for transparency applications
Project description
Civic Transparency Software Development Kit (SDK)
Synthetic data generation toolkit for civic transparency research and testing.
Installation
pip install civic-transparency-sdk
What This Package Provides
- Synthetic Data Generation: Create realistic transparency data for testing and research without requiring real user data. Generate controlled datasets with reproducible seeds for studying information dynamics.
- Internal Data Structures: Simulation-specific types (
WindowAgg,ContentHash,TopHash) for generating and manipulating synthetic transparency data. - Database Integration: Convert generated data to DuckDB/SQL databases for analysis with ready-to-use schemas and indexing patterns.
- CLI Tools: Command-line utilities for generating worlds, converting formats, and managing synthetic datasets.
Note: This SDK generates synthetic data for research/testing. For implementing the PTag API specification, see civic-transparency-ptag-types, which provides the official API response types.
Quick Start
Generate synthetic data:
# Activate environment
source .venv/bin/activate # Linux/Mac
# or
.venv\Scripts\activate # Windows
# Generate baseline world
ct-sdk generate --world A --topic-id aa55ee77 --out world_A.jsonl
# Convert to database
ct-sdk convert --jsonl world_A.jsonl --duck world_A.duckdb --schema schema/schema.sql
The generated DuckDB files are ready for analysis with any SQL-compatible tools or custom analysis scripts.
Use Cases
- Academic Research: Generate controlled datasets with known parameters for studying information dynamics, coordination patterns, and transparency system behaviors.
- Algorithm Development: Build and test transparency tools using synthetic data that mimics real-world patterns without privacy concerns.
- Testing & Validation: Create reproducible test datasets for developing transparency systems without requiring real user data.
- Education: Provide realistic datasets for teaching transparency concepts, data analysis, and system design.
Reproducibility
All generation is deterministic:
- Seed-based randomization: Same seed produces identical datasets
- Version tracking: Metadata includes package versions
- Parameter logging: All generation settings preserved in output
- Schema versioning: Database structures fully documented
Example seeds:
- World A (baseline):
4242 - World B (influenced):
8484
Package Structure
ci.transparency.sdk/
├── cli/ # Command-line interface (ct-sdk)
├── digests.py # Content fingerprinting (SimHash64, MinHashSig)
├── hash_core.py # Content identification (HashId, ContentHash, TopHash)
├── ids.py # ID management (WorldId, TopicId)
├── io_schema.py # JSON serialization utilities
└── window_agg.py # Window aggregation structure (WindowAgg)
Related Projects
- Civic Transparency PTag Spec - Official API specification
- Civic Transparency PTag Types - Python types for PTag API responses (use this for API implementation)
- Civic Transparency Verify - Statistical verification tools (private)
Security Model
This package provides synthetic data generation for research and testing. It does not include:
- Detection algorithms or thresholds
- Verification workflows or assessment criteria
- Operational patterns or alerting rules
These are maintained separately to prevent adversarial reverse-engineering while enabling legitimate transparency research.
Documentation
Full documentation at: civic-interconnect.github.io/civic-transparency-py-sdk/
- Usage Guide - Getting started and common workflows
- CLI Reference - Command-line interface details
- SDK Reference - Core Python APIs
- Schema Reference - Database schemas and integration
Development
See CONTRIBUTING.md for development setup and guidelines.
Versioning
This specification follows semantic versioning. See CHANGELOG.md for version history.
License
MIT © Civic Interconnect
Project details
Release history Release notifications | RSS feed
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_transparency_sdk-0.1.2.tar.gz.
File metadata
- Download URL: civic_transparency_sdk-0.1.2.tar.gz
- Upload date:
- Size: 102.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4f8e75b0667974d4b7c88779bc4e9e918505d8354d15988c6d77b83e9d21a411
|
|
| MD5 |
c09435f5f0d82887c4e3ac2b570697c3
|
|
| BLAKE2b-256 |
aba184a33c8a385c35781af665e908f2806a857092d1642092f7da8da4da92d1
|
Provenance
The following attestation bundles were made for civic_transparency_sdk-0.1.2.tar.gz:
Publisher:
release.yml on civic-interconnect/civic-transparency-py-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
civic_transparency_sdk-0.1.2.tar.gz -
Subject digest:
4f8e75b0667974d4b7c88779bc4e9e918505d8354d15988c6d77b83e9d21a411 - Sigstore transparency entry: 634036172
- Sigstore integration time:
-
Permalink:
civic-interconnect/civic-transparency-py-sdk@fa8b8bcccc8d474985fb93aae6de0a3b47ad5865 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/civic-interconnect
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@fa8b8bcccc8d474985fb93aae6de0a3b47ad5865 -
Trigger Event:
push
-
Statement type:
File details
Details for the file civic_transparency_sdk-0.1.2-py3-none-any.whl.
File metadata
- Download URL: civic_transparency_sdk-0.1.2-py3-none-any.whl
- Upload date:
- Size: 15.1 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 |
e9b7d846126e0e06d70d291cf5e85333de205659ca15aecabd9dc5051f75676b
|
|
| MD5 |
e6f2f1f1283b7390410806fdd1c38e41
|
|
| BLAKE2b-256 |
0c01566edae1cd51ba01e55f6b23b1602ad7730eed06fe081f2d114be8714674
|
Provenance
The following attestation bundles were made for civic_transparency_sdk-0.1.2-py3-none-any.whl:
Publisher:
release.yml on civic-interconnect/civic-transparency-py-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
civic_transparency_sdk-0.1.2-py3-none-any.whl -
Subject digest:
e9b7d846126e0e06d70d291cf5e85333de205659ca15aecabd9dc5051f75676b - Sigstore transparency entry: 634036190
- Sigstore integration time:
-
Permalink:
civic-interconnect/civic-transparency-py-sdk@fa8b8bcccc8d474985fb93aae6de0a3b47ad5865 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/civic-interconnect
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@fa8b8bcccc8d474985fb93aae6de0a3b47ad5865 -
Trigger Event:
push
-
Statement type: