civic-transparency-cwe-types


Namecivic-transparency-cwe-types JSON
Version 0.0.12 PyPI version JSON
download
home_pageNone
SummaryImmutable datatype library for Common Weakness Enumeration (CWE) analysis and validation workflows
upload_time2025-10-11 16:26:48
maintainerNone
docs_urlNone
authorCivic Interconnect
requires_python>=3.12
licenseNone
keywords civic transparency cwe security vulnerability dataclasses types validation
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Civic Transparency CWE Types

[![Docs](https://img.shields.io/badge/docs-mkdocs--material-blue)](https://civic-interconnect.github.io/civic-transparency-py-cwe-types/)
[![PyPI](https://img.shields.io/pypi/v/civic-transparency-py-cwe-types.svg)](https://pypi.org/project/civic-transparency-py-cwe-types/)
[![Python 3.12+](https://img.shields.io/badge/python-3.12%2B-blue?logo=python)](#)
[![CI Status](https://github.com/civic-interconnect/civic-transparency-py-cwe-types/actions/workflows/ci.yml/badge.svg)](https://github.com/civic-interconnect/civic-transparency-py-cwe-types/actions/workflows/ci.yml)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](./LICENSE)
[![security: bandit](https://img.shields.io/badge/security-bandit-yellow.svg)](https://github.com/PyCQA/bandit)

**Immutable, typed result objects for CWE, Standards, and Schema workflows.**

Provides strongly-typed Python models for Common Weakness Enumeration (CWE) analysis, standards framework mappings, and schema validation workflows.

## Features

- **Zero Dependencies** - Pure Python with no external requirements
- **Immutable Design** - Functional-style helpers return new instances
- **Type Safety** - Full static typing with `py.typed` marker
- **Composable** - Small building blocks for complex workflows
- **Memory Efficient** - Frozen dataclasses for better performance

## Installation

```bash
pip install civic-transparency-py-cwe-types
```

**Requirements:** Python 3.12+

## Quick Start

```python
from ci.transparency.cwe.types.cwe.results import CweLoadingResult, add_cwe

# Create immutable result objects
result = CweLoadingResult()
result = add_cwe(result, "CWE-79", {
    "id": "CWE-79",
    "name": "Cross-site Scripting",
    "category": "injection"
})

print(f"Loaded CWEs: {result.cwe_count}")
print(f"Has errors: {result.messages.has_errors}")
```

## What's Included

| Domain         | Purpose                               | Key Results                                                        |
| -------------- | ------------------------------------- | ------------------------------------------------------------------ |
| **CWE**        | Load, validate, analyze CWE data      | `CweLoadingResult`, `CweValidationResult`, `CweRelationshipResult` |
| **Standards**  | Framework loading & CWE mappings      | `StandardsLoadingResult`, `StandardsMappingResult`                 |
| **Schema**     | Generic schema operations             | `SchemaLoadingResult`, `SchemaValidationResult`                    |
| **CWE Schema** | Domain-specific CWE schema validation | `CweSchemaLoadingResult`, `CweSchemaValidationResult`              |

## Documentation

- **[Usage Guide](https://civic-interconnect.github.io/civic-transparency-py-cwe-types/usage/)** - Detailed examples and patterns
- **[API Reference](https://civic-interconnect.github.io/civic-transparency-py-cwe-types/api/)** - Complete module documentation
- **[Contributing](./CONTRIBUTING.md)** - Development guidelines

## Development

```bash
git clone https://github.com/civic-interconnect/civic-transparency-py-cwe-types
cd civic-transparency-py-cwe-types
uv venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate
uv sync --extra dev --extra docs
```

Run tests:

```bash
uv run pytest
uv run pyright src/
```

## Versioning

This specification follows semantic versioning.
See [CHANGELOG.md](./CHANGELOG.md) for version history.

## License

MIT © [Civic Interconnect](https://github.com/civic-interconnect)

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "civic-transparency-cwe-types",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.12",
    "maintainer_email": null,
    "keywords": "civic, transparency, cwe, security, vulnerability, dataclasses, types, validation",
    "author": "Civic Interconnect",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/82/d3/654835dadcc8834deb35b654bd215f9d9e781edf9a29f07545a8ea254627/civic_transparency_cwe_types-0.0.12.tar.gz",
    "platform": null,
    "description": "# Civic Transparency CWE Types\n\n[![Docs](https://img.shields.io/badge/docs-mkdocs--material-blue)](https://civic-interconnect.github.io/civic-transparency-py-cwe-types/)\n[![PyPI](https://img.shields.io/pypi/v/civic-transparency-py-cwe-types.svg)](https://pypi.org/project/civic-transparency-py-cwe-types/)\n[![Python 3.12+](https://img.shields.io/badge/python-3.12%2B-blue?logo=python)](#)\n[![CI Status](https://github.com/civic-interconnect/civic-transparency-py-cwe-types/actions/workflows/ci.yml/badge.svg)](https://github.com/civic-interconnect/civic-transparency-py-cwe-types/actions/workflows/ci.yml)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](./LICENSE)\n[![security: bandit](https://img.shields.io/badge/security-bandit-yellow.svg)](https://github.com/PyCQA/bandit)\n\n**Immutable, typed result objects for CWE, Standards, and Schema workflows.**\n\nProvides strongly-typed Python models for Common Weakness Enumeration (CWE) analysis, standards framework mappings, and schema validation workflows.\n\n## Features\n\n- **Zero Dependencies** - Pure Python with no external requirements\n- **Immutable Design** - Functional-style helpers return new instances\n- **Type Safety** - Full static typing with `py.typed` marker\n- **Composable** - Small building blocks for complex workflows\n- **Memory Efficient** - Frozen dataclasses for better performance\n\n## Installation\n\n```bash\npip install civic-transparency-py-cwe-types\n```\n\n**Requirements:** Python 3.12+\n\n## Quick Start\n\n```python\nfrom ci.transparency.cwe.types.cwe.results import CweLoadingResult, add_cwe\n\n# Create immutable result objects\nresult = CweLoadingResult()\nresult = add_cwe(result, \"CWE-79\", {\n    \"id\": \"CWE-79\",\n    \"name\": \"Cross-site Scripting\",\n    \"category\": \"injection\"\n})\n\nprint(f\"Loaded CWEs: {result.cwe_count}\")\nprint(f\"Has errors: {result.messages.has_errors}\")\n```\n\n## What's Included\n\n| Domain         | Purpose                               | Key Results                                                        |\n| -------------- | ------------------------------------- | ------------------------------------------------------------------ |\n| **CWE**        | Load, validate, analyze CWE data      | `CweLoadingResult`, `CweValidationResult`, `CweRelationshipResult` |\n| **Standards**  | Framework loading & CWE mappings      | `StandardsLoadingResult`, `StandardsMappingResult`                 |\n| **Schema**     | Generic schema operations             | `SchemaLoadingResult`, `SchemaValidationResult`                    |\n| **CWE Schema** | Domain-specific CWE schema validation | `CweSchemaLoadingResult`, `CweSchemaValidationResult`              |\n\n## Documentation\n\n- **[Usage Guide](https://civic-interconnect.github.io/civic-transparency-py-cwe-types/usage/)** - Detailed examples and patterns\n- **[API Reference](https://civic-interconnect.github.io/civic-transparency-py-cwe-types/api/)** - Complete module documentation\n- **[Contributing](./CONTRIBUTING.md)** - Development guidelines\n\n## Development\n\n```bash\ngit clone https://github.com/civic-interconnect/civic-transparency-py-cwe-types\ncd civic-transparency-py-cwe-types\nuv venv\nsource .venv/bin/activate  # On Windows: .venv\\Scripts\\activate\nuv sync --extra dev --extra docs\n```\n\nRun tests:\n\n```bash\nuv run pytest\nuv run pyright src/\n```\n\n## Versioning\n\nThis specification follows semantic versioning.\nSee [CHANGELOG.md](./CHANGELOG.md) for version history.\n\n## License\n\nMIT \u00a9 [Civic Interconnect](https://github.com/civic-interconnect)\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Immutable datatype library for Common Weakness Enumeration (CWE) analysis and validation workflows",
    "version": "0.0.12",
    "project_urls": {
        "Bug Tracker": "https://github.com/civic-interconnect/civic-transparency-py-cwe-types/issues",
        "Documentation": "https://civic-interconnect.github.io/civic-transparency-py-cwe-types/latest/",
        "Homepage": "https://github.com/civic-interconnect/civic-transparency-py-cwe-types",
        "Repository": "https://github.com/civic-interconnect/civic-transparency-py-cwe-types"
    },
    "split_keywords": [
        "civic",
        " transparency",
        " cwe",
        " security",
        " vulnerability",
        " dataclasses",
        " types",
        " validation"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "22c923496433cb25a5771fedf10e5f8147f21401adb23e6ad286e104c7a517e7",
                "md5": "520b5e891ae966c83fea81665740ac30",
                "sha256": "2e1945ca3335c8c6926bbf32b43042e7a9409f5feae7cdd774c9542658003d18"
            },
            "downloads": -1,
            "filename": "civic_transparency_cwe_types-0.0.12-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "520b5e891ae966c83fea81665740ac30",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.12",
            "size": 53185,
            "upload_time": "2025-10-11T16:26:47",
            "upload_time_iso_8601": "2025-10-11T16:26:47.087238Z",
            "url": "https://files.pythonhosted.org/packages/22/c9/23496433cb25a5771fedf10e5f8147f21401adb23e6ad286e104c7a517e7/civic_transparency_cwe_types-0.0.12-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "82d3654835dadcc8834deb35b654bd215f9d9e781edf9a29f07545a8ea254627",
                "md5": "dc7023a22120382ace6d8e8ee11591e2",
                "sha256": "53fc6eac7d8038ebb08c5ef713218f79a81f18c9dcf30d10e6a28077cb07ebd9"
            },
            "downloads": -1,
            "filename": "civic_transparency_cwe_types-0.0.12.tar.gz",
            "has_sig": false,
            "md5_digest": "dc7023a22120382ace6d8e8ee11591e2",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.12",
            "size": 781188,
            "upload_time": "2025-10-11T16:26:48",
            "upload_time_iso_8601": "2025-10-11T16:26:48.915919Z",
            "url": "https://files.pythonhosted.org/packages/82/d3/654835dadcc8834deb35b654bd215f9d9e781edf9a29f07545a8ea254627/civic_transparency_cwe_types-0.0.12.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-10-11 16:26:48",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "civic-interconnect",
    "github_project": "civic-transparency-py-cwe-types",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "civic-transparency-cwe-types"
}
        
Elapsed time: 2.28775s