civic-transparency-sdk


Namecivic-transparency-sdk JSON
Version 0.1.0 PyPI version JSON
download
home_pageNone
SummaryCivic Transparency SDK - Development kit for transparency applications
upload_time2025-09-12 04:49:48
maintainerNone
docs_urlNone
authorCivic Interconnect
requires_python>=3.11
licenseNone
keywords transparency api sdk civic
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Civic Transparency Software Development Kit (SDK)

[![Docs](https://img.shields.io/badge/docs-mkdocs--material-blue)](https://civic-interconnect.github.io/civic-transparency-sdk/)
[![PyPI](https://img.shields.io/pypi/v/civic-transparency-sdk.svg)](https://pypi.org/project/civic-transparency-sdk/)
[![Python versions](https://img.shields.io/pypi/pyversions/civic-transparency-sdk.svg)](https://pypi.org/project/civic-transparency-sdk/)
[![CI Status](https://github.com/civic-interconnect/civic-transparency-sdk/actions/workflows/ci.yml/badge.svg)](https://github.com/civic-interconnect/civic-transparency-sdk/actions/workflows/ci.yml)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](./LICENSE)

A software development kit for civic transparency applications.

## Installation

```pwsh
pip install civic-transparency-sdk
```

## What This Package Provides

**Core Data Types**: Standardized structures for transparency APIs including WindowAgg aggregations, ContentHash identifiers, and content fingerprinting that enable consistent data exchange.

**Implementation Support**: Essential utilities for platforms implementing transparency APIs, including JSON serialization, database schemas, and validation helpers.

**Research Tools**: Synthetic data generation capabilities for testing transparency implementations and conducting research without exposing real user data.

**Database Integration**: Ready-to-use schemas and conversion utilities for storing transparency data in SQL databases with proper indexing and query patterns.

## Quick Start

Generate synthetic data:

```pwsh
ct-sdk generate --world A --topic-id aa55ee77 --out world_A.jsonl

ct-sdk convert --jsonl world_A.jsonl --duck world_A.duckdb --schema schema/schema.sql
```

## Use Generated Data

The generated DuckDB files are ready for analysis with any SQL-compatible tools or custom analysis scripts.

## Reproducibility

All generation is deterministic and includes:
- **Seed-based randomization**: Reproduce exact datasets
- **Version tracking**: Metadata includes package versions
- **Parameter logging**: All generation settings preserved
- **Schema versioning**: Database structures documented

**Example Seeds:**
- World A (baseline): `4242`

## Use Cases

- **Platform Implementation**: Implement transparency APIs with standardized data structures and serialization utilities.

- **Academic Research**: Generate controlled datasets for studying information dynamics with known parameters.

- **Education**: Provide realistic data for analysis exercises and transparency system understanding.

- **Testing & Validation**: Create test datasets for transparency system development without requiring real user data.

- **Algorithm Development**: Build transparency tools using standard data formats and proven utilities.

## Package Structure

```
ci.transparency.sdk/
├── cli/            # Command-line interfaces
├── digests.py      # Content fingerprinting (SimHash64, MinHashSig, Digests)
├── hash_core.py    # Content identification (HashId, ContentHash, TopHash)
├── ids.py          # ID management (WorldId, TopicId, HashId)
├── io_schema.py    # Serialization utilities (JSON conversion, dumps, loads)
└── window_agg.py   # Window aggregation data structure (WindowAgg)
```

## Security Model

This package provides foundational building blocks for transparency applications.
It does not include:
- Detection algorithms or thresholds
- Verification workflows or assessment criteria  
- Specific patterns that trigger alerts

Detection logic and verification tools are maintained separately to prevent adversarial use while enabling legitimate transparency system development.

## Documentation

Comprehensive docs are published with [MkDocs Material](https://squidfunk.github.io/mkdocs-material/):

- **[Home](https://civic-interconnect.github.io/civic-transparency-sdk/)** – project overview and installation instructions  
- **[Usage Guide](https://civic-interconnect.github.io/civic-transparency-sdk/usage/)** – quick-start workflow and common tasks  
- **[CLI Reference](https://civic-interconnect.github.io/civic-transparency-sdk/cli/)** – full command-line interface details  
- **[SDK Reference](https://civic-interconnect.github.io/civic-transparency-sdk/sdk/overview/)** – core Python APIs  
  - [Window Aggregation](https://civic-interconnect.github.io/civic-transparency-sdk/sdk/window_agg/)  
  - [Content Hashing](https://civic-interconnect.github.io/civic-transparency-sdk/sdk/hash_core/)  
  - [Content Digests](https://civic-interconnect.github.io/civic-transparency-sdk/sdk/digests/)  
  - [ID Management](https://civic-interconnect.github.io/civic-transparency-sdk/sdk/ids/)  
  - [I/O Schema](https://civic-interconnect.github.io/civic-transparency-sdk/sdk/io_schema/)  
- **[Schema Reference](https://civic-interconnect.github.io/civic-transparency-sdk/schema/)** – database schema and integration notes  
- **Related Projects**  
  - [Civic Transparency Spec](https://civic-interconnect.github.io/civic-transparency-spec/)  
  - [Civic Transparency Types](https://civic-interconnect.github.io/civic-transparency-types/)


## License

See LICENSE file for details.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "civic-transparency-sdk",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.11",
    "maintainer_email": null,
    "keywords": "transparency, api, sdk, civic",
    "author": "Civic Interconnect",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/41/4d/c5e37232d620c6516ce579bdfceb91cb2e55fc476b81689ccadbdd77fa77/civic_transparency_sdk-0.1.0.tar.gz",
    "platform": null,
    "description": "# Civic Transparency Software Development Kit (SDK)\n\n[![Docs](https://img.shields.io/badge/docs-mkdocs--material-blue)](https://civic-interconnect.github.io/civic-transparency-sdk/)\n[![PyPI](https://img.shields.io/pypi/v/civic-transparency-sdk.svg)](https://pypi.org/project/civic-transparency-sdk/)\n[![Python versions](https://img.shields.io/pypi/pyversions/civic-transparency-sdk.svg)](https://pypi.org/project/civic-transparency-sdk/)\n[![CI Status](https://github.com/civic-interconnect/civic-transparency-sdk/actions/workflows/ci.yml/badge.svg)](https://github.com/civic-interconnect/civic-transparency-sdk/actions/workflows/ci.yml)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](./LICENSE)\n\nA software development kit for civic transparency applications.\n\n## Installation\n\n```pwsh\npip install civic-transparency-sdk\n```\n\n## What This Package Provides\n\n**Core Data Types**: Standardized structures for transparency APIs including WindowAgg aggregations, ContentHash identifiers, and content fingerprinting that enable consistent data exchange.\n\n**Implementation Support**: Essential utilities for platforms implementing transparency APIs, including JSON serialization, database schemas, and validation helpers.\n\n**Research Tools**: Synthetic data generation capabilities for testing transparency implementations and conducting research without exposing real user data.\n\n**Database Integration**: Ready-to-use schemas and conversion utilities for storing transparency data in SQL databases with proper indexing and query patterns.\n\n## Quick Start\n\nGenerate synthetic data:\n\n```pwsh\nct-sdk generate --world A --topic-id aa55ee77 --out world_A.jsonl\n\nct-sdk convert --jsonl world_A.jsonl --duck world_A.duckdb --schema schema/schema.sql\n```\n\n## Use Generated Data\n\nThe generated DuckDB files are ready for analysis with any SQL-compatible tools or custom analysis scripts.\n\n## Reproducibility\n\nAll generation is deterministic and includes:\n- **Seed-based randomization**: Reproduce exact datasets\n- **Version tracking**: Metadata includes package versions\n- **Parameter logging**: All generation settings preserved\n- **Schema versioning**: Database structures documented\n\n**Example Seeds:**\n- World A (baseline): `4242`\n\n## Use Cases\n\n- **Platform Implementation**: Implement transparency APIs with standardized data structures and serialization utilities.\n\n- **Academic Research**: Generate controlled datasets for studying information dynamics with known parameters.\n\n- **Education**: Provide realistic data for analysis exercises and transparency system understanding.\n\n- **Testing & Validation**: Create test datasets for transparency system development without requiring real user data.\n\n- **Algorithm Development**: Build transparency tools using standard data formats and proven utilities.\n\n## Package Structure\n\n```\nci.transparency.sdk/\n\u251c\u2500\u2500 cli/            # Command-line interfaces\n\u251c\u2500\u2500 digests.py      # Content fingerprinting (SimHash64, MinHashSig, Digests)\n\u251c\u2500\u2500 hash_core.py    # Content identification (HashId, ContentHash, TopHash)\n\u251c\u2500\u2500 ids.py          # ID management (WorldId, TopicId, HashId)\n\u251c\u2500\u2500 io_schema.py    # Serialization utilities (JSON conversion, dumps, loads)\n\u2514\u2500\u2500 window_agg.py   # Window aggregation data structure (WindowAgg)\n```\n\n## Security Model\n\nThis package provides foundational building blocks for transparency applications.\nIt does not include:\n- Detection algorithms or thresholds\n- Verification workflows or assessment criteria  \n- Specific patterns that trigger alerts\n\nDetection logic and verification tools are maintained separately to prevent adversarial use while enabling legitimate transparency system development.\n\n## Documentation\n\nComprehensive docs are published with [MkDocs Material](https://squidfunk.github.io/mkdocs-material/):\n\n- **[Home](https://civic-interconnect.github.io/civic-transparency-sdk/)** \u2013 project overview and installation instructions  \n- **[Usage Guide](https://civic-interconnect.github.io/civic-transparency-sdk/usage/)** \u2013 quick-start workflow and common tasks  \n- **[CLI Reference](https://civic-interconnect.github.io/civic-transparency-sdk/cli/)** \u2013 full command-line interface details  \n- **[SDK Reference](https://civic-interconnect.github.io/civic-transparency-sdk/sdk/overview/)** \u2013 core Python APIs  \n  - [Window Aggregation](https://civic-interconnect.github.io/civic-transparency-sdk/sdk/window_agg/)  \n  - [Content Hashing](https://civic-interconnect.github.io/civic-transparency-sdk/sdk/hash_core/)  \n  - [Content Digests](https://civic-interconnect.github.io/civic-transparency-sdk/sdk/digests/)  \n  - [ID Management](https://civic-interconnect.github.io/civic-transparency-sdk/sdk/ids/)  \n  - [I/O Schema](https://civic-interconnect.github.io/civic-transparency-sdk/sdk/io_schema/)  \n- **[Schema Reference](https://civic-interconnect.github.io/civic-transparency-sdk/schema/)** \u2013 database schema and integration notes  \n- **Related Projects**  \n  - [Civic Transparency Spec](https://civic-interconnect.github.io/civic-transparency-spec/)  \n  - [Civic Transparency Types](https://civic-interconnect.github.io/civic-transparency-types/)\n\n\n## License\n\nSee LICENSE file for details.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Civic Transparency SDK - Development kit for transparency applications",
    "version": "0.1.0",
    "project_urls": {
        "Documentation": "https://civic-interconnect.github.io/civic-transparency-sdk/latest/",
        "Homepage": "https://github.com/civic-interconnect/civic-transparency-sdk",
        "Repository": "https://github.com/civic-interconnect/civic-transparency-sdk"
    },
    "split_keywords": [
        "transparency",
        " api",
        " sdk",
        " civic"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "70dcc21df56f7726da7fbff36b8f273bb305d91ba5307c4b528c96ea4b33d6d5",
                "md5": "a80895133dcdae229e63c98d7462f2ff",
                "sha256": "78b5e0bfa227d7277cdf7e5d4a93ac25347ce6017b592a8e7919253f66f471e4"
            },
            "downloads": -1,
            "filename": "civic_transparency_sdk-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "a80895133dcdae229e63c98d7462f2ff",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11",
            "size": 10540,
            "upload_time": "2025-09-12T04:49:47",
            "upload_time_iso_8601": "2025-09-12T04:49:47.251579Z",
            "url": "https://files.pythonhosted.org/packages/70/dc/c21df56f7726da7fbff36b8f273bb305d91ba5307c4b528c96ea4b33d6d5/civic_transparency_sdk-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "414dc5e37232d620c6516ce579bdfceb91cb2e55fc476b81689ccadbdd77fa77",
                "md5": "ba7ef53506e670a5cdd280aac07d5c2b",
                "sha256": "a22b8c98c6f84a53870aa681f2a082bbed9b796ca7028671e5d13c3fcd680390"
            },
            "downloads": -1,
            "filename": "civic_transparency_sdk-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "ba7ef53506e670a5cdd280aac07d5c2b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11",
            "size": 679710,
            "upload_time": "2025-09-12T04:49:48",
            "upload_time_iso_8601": "2025-09-12T04:49:48.817735Z",
            "url": "https://files.pythonhosted.org/packages/41/4d/c5e37232d620c6516ce579bdfceb91cb2e55fc476b81689ccadbdd77fa77/civic_transparency_sdk-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-09-12 04:49:48",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "civic-interconnect",
    "github_project": "civic-transparency-sdk",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "civic-transparency-sdk"
}
        
Elapsed time: 3.37658s