Skip to main content

GASPAR

GenAI-powered System for Privacy incident Analysis and Recovery

GASPAR is a comprehensive system designed to:

  • Extract privacy-related fields from assessment documents
  • Model data distributions and sample input data based on extracted fields
  • Detect anomalous values in sampled data batches
  • Create code filters to exclude anomalous data
  • Safely deploy filters to quarantine problematic data

Features

  • Privacy rule extraction from IPA documents
  • Adaptive data sampling based on distribution modeling
  • Statistical and distribution-based anomaly detection
  • Automatic filter generation for anomalous data
  • Safe deployment with monitoring capabilities
  • Support for multiple LLM providers (OpenAI, Anthropic, Mistral)
  • Azure integration for cloud deployment

Installation

Local installation can be done using uv:

$ uv python install 3.10
$ uv python pin 3.10
$ uv venv -p python3.10
$ source .venv/bin/activate
$ uv pip install -e .

For development mode:

$ pip install -e ".[dev]"

For Databricks deployment

pip install -e ".[databricks]"

Usage

Basic Usage

from gaspar.config import load_config
from gaspar.pipeline.executor import PipelineExecutor
import asyncio

async def main():
    # Load configuration from file
    config = load_config("config.yaml")
    
    # Initialize pipeline
    executor = PipelineExecutor(config)
    
    # Process IPA document
    result = await executor.execute("documents/privacy_assessment.txt")
    
    if result.success:
        print("Privacy rules extracted successfully")
        print(f"Generated {len(result.outputs['filters'])} filters")

if __name__ == "__main__":
    asyncio.run(main())

Command Line Usage

After installation, the gaspar command-line tool is available:

$ gaspar document.txt
# Process IPA document and start monitoring

$ gaspar -c config.yaml document.txt
# Use custom configuration

$ gaspar -v document.txt
# Enable verbose logging

Configuration

GASPAR can be configured via YAML files. Example configuration:

# LLM Model Configuration
model:
  provider: "openai"
  model_name: "gpt-4"
  api_key: ${OPENAI_API_KEY}

# Storage Configuration
storage:
  type: "local"
  local_path: "./data"

# Pipeline Configuration
pipeline:
  batch_size: 100
  max_retries: 3
  temp_directory: "./temp"

Note

For the configuration to be used in the repo, it was adapted to use a locally deployed version of GPT-4 To use Openai API or any other LLM API provider, update openai_model.py or create a new one

Development

Testing

Running the tests can be done using tox:

$ tox -p

Building Packages

Building the packages:

$ tox -e packages
$ ls dist/

License

MIT

Metadata

Release files for amadeus-os-gaspar 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for amadeus-os-gaspar 0.0.1
File Size Uploaded Provenance Actions
amadeus_os_gaspar-0.0.1.tar.gz 46.0 kB With provenance Details for amadeus_os_gaspar-0.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for amadeus-os-gaspar 0.0.1
File Interpreter ABI Platform Actions
amadeus_os_gaspar-0.0.1-py3-none-any.whl Python 3 none any Details for amadeus_os_gaspar-0.0.1-py3-none-any.whl

Total release size: 98.0 kB

Release files / amadeus_os_gaspar-0.0.1.tar.gz

Download URL amadeus_os_gaspar-0.0.1.tar.gz
Size 46.0 kB
Tags Source
SHA-256 checksum
How to use checksums
f4ff22f9de0c43a208c4b9c2658b60efa36ad74f465541aab423ff05e589d25d
BLAKE2b-256 checksum
How to use checksums
9a9511f2299cf2666887f053f3ab25cda81e53b382c2f96ed0acea1d7ba08d04
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 15, 2025.

Transparency log

Release files / amadeus_os_gaspar-0.0.1-py3-none-any.whl

Download URL amadeus_os_gaspar-0.0.1-py3-none-any.whl
Size 52.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bd66485bf3abe215bd5d370a98d8b5c504813c3d3895b350485202f7c6519b3d
BLAKE2b-256 checksum
How to use checksums
28d5b4d45f7fc6f040d0f00a46fc0984f943dd60bc30a391f9cbc5dcef971d96
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 15, 2025.

Transparency log

Security for amadeus-os-gaspar 0.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for amadeus_os_gaspar-0.0.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 15, 2025.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page