semvec/pypi-packages huggingface dataset:
pqdict 1.4.1
A Pythonic indexed priority queue.
License: MIT
Requires Python: >=3.7
Keywords: data structures, dict, heap, priority queue, scheduler

Priority Queue Dictionary (pqdict)
==================================

A priority queue dictionary maps hashable objects (keys) to priority-determining values. It provides a hybrid dictionary/priority queue API. 

.. image:: https://github.com/nvictus/priority-queue-dictionary/actions/workflows/ci.yml/badge.svg
    :target: https://github.com/nvictus/priority-queue-dictionary/actions/workflows/ci.yml
    :alt: CI

.. image:: https://readthedocs.org/projects/pqdict/badge/?version=latest
    :target: https://readthedocs.org/projects/pqdict/
    :alt: Documentation Status

.. image:: https://img.shields.io/pypi/v/pqdict.svg
    :target: https://pypi.python.org/pypi/pqdict

The priority queue itself is implemented as a binary heap of (key, priority value) elements, which supports:

- O(1) search for the item with highest priority

- O(log n) removal of the item with highest priority

- O(log n) insertion of a new item

Additionally, an index maps each key to its element's location in the heap and is kept
up to date as the heap is manipulated. As a result, ``pqdict`` also supports:

- O(1) lookup of any item by key

- O(log n) removal of any item

- O(log n) updating of any item's priority level


Documentation
-------------

Documentation is available at http://pqdict.readthedocs.org/.


License 
-------

This module is released under the MIT license. The augmented heap implementation was adapted from the ``heapq`` module in the Python standard library, which was written by Kevin O'Connor and augmented by Tim Peters and Raymond Hettinger.
bizteam-smcp 1.13.1
Secure Model Context Protocol - Security layers for MCP servers
License: MIT
Requires Python: >=3.8

# SMCP - Secure Model Context Protocol

A security-focused wrapper library for MCP (Model Context Protocol) servers, providing multiple layers of protection through conditional guards that activate only when needed.

## Features

- **Conditional Security Guards**: Each security layer activates only when its required configuration is present
- **Mutual TLS Support**: Automatic certificate-based authentication
- **Host Allowlisting**: Outbound connection validation
- **Input Sanitization**: Prompt and parameter filtering
- **Destructive Action Confirmation**: Queue-based approval system for dangerous operations
- **Tamper-proof Logging**: SHA-chained append-only audit logs
- **Universal Coverage**: Same decorator factory works for tools, prompts, and retrieval

## Quick Start

```python
from smcp import FastSMCP as FastMCP
from smcp import tool, prompt

# Configure security features (all optional)
cfg = {
    "ca_path": "ca.pem",
    "cert_path": "server.pem", 
    "key_path": "server.key",
    "ALLOWED_HOSTS": ["api.internal.local", "10.0.0.5"],
    "SAFE_RE": r"^[\w\s.,:;!?-]{1,2048}$",
    "LOG_PATH": "/var/log/smcp.log"
}

app = FastMCP("myserver", smcp_cfg=cfg)

@tool(confirm=True)  # Requires approval
def delete_user(uid: str):
    ...

@prompt()  # Auto-filtered if SAFE_RE present
def chat(prompt: str):
    ...
```

## Security Guards

| Feature | Activation Trigger | Purpose |
|---------|-------------------|---------|
| Mutual TLS | `ca_path`, `cert_path`, `key_path` in config | Certificate-based authentication |
| Host Allowlist | Non-empty `ALLOWED_HOSTS` | Outbound connection validation |
| Input Filtering | `SAFE_RE` or `MAX_LEN` defined | Sanitize prompts and parameters |
| Action Confirmation | `confirm=True` on decorator | Queue destructive operations for approval |
| Audit Logging | `LOG_PATH` set | Tamper-proof operation logging |

## CLI Tools

```bash
# Generate certificates
smcp-mkcert --ca-name "MyCA" --server-name "myserver.local"

# Approve queued actions  
smcp-approve <action-id>
```

## Installation

### From PyPI.org (Public)

```bash
pip install bizteam-smcp
```

### From Private PyPI Server

```bash
# Using private PyPI server
pip install --extra-index-url https://bizteamai.com/pypi/simple/ bizteam-smcp
```

### Upgrading to Business Edition

For additional features and enterprise support, a business edition is available:

```bash
pip install --extra-index-url https://bizteamai.com/pypi/simple/ bizteam-smcp-biz
```

**Contact**: [business@bizteamai.com](mailto:business@bizteamai.com) for more information.

## License

MIT License
hasse 0.2.0
Python library for representing Partially Ordered sets via Hasse Diagrams.
License: MIT
Requires Python: <4.0,>=3.9

# hasse
Python library for representing Partially Ordered sets via Hasse Diagrams.

[![Build Status](https://cloud.drone.io/api/badges/mvcisback/hasse/status.svg)](https://cloud.drone.io/mvcisback/hasse)
[![PyPI version](https://badge.fury.io/py/hasse.svg)](https://badge.fury.io/py/hasse)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

**Table of Contents**

- [Installation](#installation)
- [Usage](#usage)

# Installation

If you just need to use `hasse`, you can just run:

`$ pip install hasse`

For developers, note that this project uses the
[poetry](https://poetry.eustace.io/) python package/dependency
management tool. Please familarize yourself with it and then
run:

`$ poetry install`

# Usage

`hasse` is centered around the `hasse.PoSet` class.  An example is
given below.

```python
import hasse

poset = hasse.PoSet.from_chains(
    [1, 2, 4],  # 1 < 2 < 4
    [1, 3, 4],  # 1 < 3 < 4
)

# Test membership and size.
assert 2 in poset
assert len(poset) == 4
assert set(poset) == {1,2,3,4}

# Perform pair wise comparison.
assert poset.compare(1, 1) == '='
assert poset.compare(1, 4) == '<'
assert poset.compare(4, 2) == '>'
assert poset.compare(2, 3) == '||'

# Add an edge.
poset2 = poset.add([2, 1])
poset2.compare(1, 2) == '='
```
PoSet must be a DAG.  For large posets we encourage batching via from_chains over many small add() calls.