semvec/pypi-packages huggingface dataset:
fedmcp 0.2.0
Federal Model Context Protocol - Python implementation
Requires Python: >=3.8

# FedMCP Python Core

Python implementation of the Federal Model Context Protocol (FedMCP) v0.2.

## Installation

```bash
pip install fedmcp
```

For development:
```bash
pip install -e ".[dev]"
```

## Quick Start

### Creating and Signing Artifacts

```python
from uuid import uuid4
from fedmcp import Artifact, ArtifactType, LocalSigner

# Create an artifact
artifact = Artifact(
    type=ArtifactType.AGENT_RECIPE,
    workspaceId=uuid4(),
    jsonBody={
        "name": "Healthcare Diagnostic Agent",
        "version": "1.0.0",
        "capabilities": ["diagnose", "recommend", "monitor"]
    }
)

# Sign it
signer = LocalSigner()
jws_token = signer.sign(artifact)
print(f"Signed artifact: {jws_token[:50]}...")
```

### Verifying Artifacts

```python
from fedmcp import Verifier

# Create verifier and add public key
verifier = Verifier()
verifier.add_public_key(signer.get_key_id(), signer.private_key.public_key())

# Verify the artifact
verified_artifact = verifier.verify(jws_token)
print(f"Verified artifact ID: {verified_artifact.id}")
```

### Using the Client

```python
from fedmcp import FedMCPClient
import asyncio

async def main():
    client = FedMCPClient(
        base_url="http://localhost:8000",
        workspace_id=uuid4(),
        signer=LocalSigner()
    )
    
    # Create an artifact
    result = await client.create_artifact(
        artifact_type=ArtifactType.LLM_COMPLETION,
        json_body={
            "model": "gpt-4",
            "prompt": "Diagnose patient symptoms",
            "completion": "Based on the symptoms..."
        }
    )
    
    print(f"Created artifact: {result['id']}")
    client.close()

asyncio.run(main())
```

### AWS KMS Integration

```python
from fedmcp import KMSSigner, KMSVerifier

# Sign with KMS
kms_signer = KMSSigner(
    kms_key_id="arn:aws:kms:us-gov-west-1:123456789012:key/abc-123",
    region="us-gov-west-1"
)
jws_token = kms_signer.sign(artifact)

# Verify with KMS
kms_verifier = KMSVerifier(region="us-gov-west-1")
kms_verifier.add_kms_key(
    key_id=kms_signer.get_key_id(),
    kms_key_id="arn:aws:kms:us-gov-west-1:123456789012:key/abc-123"
)
verified = kms_verifier.verify(jws_token)
```

## Artifact Types

Standard FedMCP artifact types:
- `SSP_FRAGMENT` - System Security Plan fragments
- `POAM_TEMPLATE` - Plan of Action & Milestones templates
- `AGENT_RECIPE` - AI agent configurations
- `BASELINE_MODULE` - Security baseline modules
- `AUDIT_SCRIPT` - Audit automation scripts

Healthcare-specific types:
- `RAG_QUERY` - Retrieval-augmented generation queries
- `LLM_COMPLETION` - Language model completions
- `TOOL_INVOCATION` - Tool/function call records

## Testing

Run tests with pytest:
```bash
pytest
```

## License

Apache 2.0 - See LICENSE file for details.
dnstester-qboxxbyh 0.2.1
This is a tester for a DNS proxy filter. Used to locally test DNS proxy filters that use a certain format of configuration file. See disciption at GitHub page.
Requires Python: >=3.8

# The Python package dnstester-qboxxbyh
This is a tester for a DNS proxy filter. It can be used locally or remotely to test DNS proxy filters that rely on a specific configuration file format below:
```ini
  [server]
  listen_address = 127.0.0.1
  listen_port = 5300
                    
  [upstream]
  dns1 = 1.1.1.1
  dns2 = 8.8.8.8
  dns3 = 8.8.4.4
                    
  [blacklist]
  yandex.ru = notfind
  ya.ru = refuse
  tutu.ru = 178.248.234.61
```

# Installation

This package is available on PyPI and can be installed with ```pip install dnstester-qboxxbyh ``` or updated with ```pip install --upgrade dnstester-qboxxbyh ```

# How to use

If the DNS proxy filter being tested is a Python script (e.g., mydnsfilter.py): 
```python
from dnstester_qboxxbyh import dnsProxyTester
tester = dnsProxyTester(sample_size_input = 200)
tester.run(app_binary = "python3 mydnsfilter.py", sample_size_input = 200,
                        ignoreUnexpected = False, ignoreTrailing = False,
                        raiseOnTruncation = False, ignoreErrors = False,
                        timeOut = None) # None for timeOut means for ever
```

Or, if the DNS proxy filter being tested is a binary (which may also require its own parameters, such as a configuration file):

```python
from dnstester_qboxxbyh import dnsProxyTester
tester = dnsProxyTester(sample_size_input = 200)
tester.run(app_binary =
  "~/dns-proxy-filter-p2B9agE1/dns_proxy_filter_p2B9agE1 ~/.config/p2B9agE1/dns-proxy-p2B9agE1.conf",
                        sample_size_input = 200, ignoreUnexpected = False, ignoreTrailing = False, cores = 16,
                        raiseOnTruncation = False, ignoreErrors = False,
                        timeOut = None) # None for timeOut means for ever
```

# How it works

The software downloads and uses a collection of 4,170,262 verified domains from https://tranco-list.eu/download/VQ92N/full. It makes a random sample without replacement from this pool of domains and randomly splits it into four subsamples. Using three of those subsamples (one for domains not to be found, one for domains to be refused service, and one for domains with randomly pre-specified IPv4 and IPv6 addresses), the software creates a test configuration file and locally launches the tested DNS proxy filter.

# The test results

The results are displayed and are dynamically updated in the terminal:

![Example screenshot](pics/updated_test_results.png)

# Constraints

This version doesn't yet support:
* Pre-specifying both IPv4 and IPv6 for the same domain in the configuration file
* Testing the handling of non-standard multi-query DNS requests by a DNS proxy filter