semvec/pypi-packages huggingface dataset:
asn1cpython-support 0.0.2
CMake support files for ASN.1 C extension bindings
Keywords: asn1, asn1c, pyasn1

# ASN.1c Python Bndings Support Files

`asn1cpython-support` is a small Python helper package that provides build-time
support utilities for Python packages using the modified
[asn1c](https://github.com/MatrixEditor/asn1c-bindings) compiler to generate C
sources from ASN.1 specifications. Documentation is here:
[matrixeditor.github.io/asn1c-bindings](https://matrixeditor.github.io/asn1c-bindings/).

Its primary purpose is to bridge Python packaging tools (such as
[scikit-build-core](https://scikit-build-core.readthedocs.io/en/latest/)) with
the asn1c-bindings CMake package, ensuring that ASN.1 source files can be
compiled into Python extension modules seamlessly.

## Usage in CMake

When building a Python extension module that uses ASN.1 specifications, you can
retrieve the CMake package path like this:

```cmake
execute_process(
    COMMAND "${Python_EXECUTABLE}" -m asn1cpython_support --cmake-dir
    OUTPUT_STRIP_TRAILING_WHITESPACE
    OUTPUT_VARIABLE asn1c-bindings_ROOT
)
find_package(asn1c-bindings CONFIG REQUIRED)
```

## Installation

```bash
pip install asn1cpython-support
```

### Example

A typical `pyproject.toml` snippet using this package with *scikit-build-core*:

```toml
[build-system]
# This requirement will make all required files available at build time
requires = ["scikit-build-core~=0.9.0", "asn1cpython-support"]
build-backend = "scikit_build_core.build"

[tool.scikit-build]
cmake.minimum-version = "3.15"
# ...
```

## License

MIT License — see LICENSE for details.
liman-openapi 0.1.0a1
Liman AgentOps OpenAPI Library
Requires Python: >=3.10

# Liman OpenAPI plugin

[![codecov](https://codecov.io/gh/gurobokum/liman/graph/badge.svg?token=PMKWXNBF1K&component=python/liman_openapi)](https://codecov.io/gh/gurobokum/liman?components[0]=python/liman_openapi)

Allows to generate ToolNode based on OpenAPI specification.

```python
spec = load_openapi(file_path) # or url, yaml, json

tool_nodes = create_nodes(spec)
```
httpx-secure 1.2.0
Drop-in SSRF protection for httpx
Requires Python: >=3.9
Keywords: anyio, async, asyncio, client, dns, dns-cache, http, httpx, security, ssrf, ssrf-protection, trio, web-security

# httpx-secure

[![PyPI - Python Version](https://shields.monicz.dev/pypi/pyversions/httpx-secure)](https://pypi.org/p/httpx-secure)
[![Liberapay Patrons](https://shields.monicz.dev/liberapay/patrons/Zaczero?logo=liberapay&label=Patrons)](https://liberapay.com/Zaczero/)
[![GitHub Sponsors](https://shields.monicz.dev/github/sponsors/Zaczero?logo=github&label=Sponsors&color=%23db61a2)](https://github.com/sponsors/Zaczero)

Drop-in SSRF protection for httpx.

## Why Use This?

- **SSRF Protection**: Block requests to private/internal IP addresses
- **Custom Validation**: Extend with your own validation logic
- **Minimal Overhead**: Efficient implementation with built-in DNS caching
- **Broad Python Support**: Compatible with Python 3.9+
- [**Semantic Versioning**](https://semver.org): Predictable, reliable updates
- [**Zero-Clause BSD**](https://choosealicense.com/licenses/0bsd/): Public domain, use freely anywhere

## Installation

```bash
pip install httpx-secure
```

## Quick Start

```python
import httpx
from httpx_secure import httpx_ssrf_protection

client = httpx_ssrf_protection(
    httpx.AsyncClient(),
    dns_cache_size=1000,  # Cache up to 1000 DNS resolutions
    dns_cache_ttl=600,    # Cache for 10 minutes
)

await client.get("https://public.domain")   # Allowed
await client.get("https://private.domain")  # Blocked
```

## Custom Validation

For example, implement a simple domain whitelist to restrict requests to specific hosts:

```python
import httpx
from httpx_secure import httpx_ssrf_protection
from ipaddress import IPv4Address, IPv6Address

def custom_validator(
    hostname: str,
    ip: IPv4Address | IPv6Address,
    port: int
) -> bool:
    return hostname in {
        "whitelisted.domain",
        "webhook.partner.com",
    }

client = httpx_ssrf_protection(
    httpx.AsyncClient(),
    custom_validator=custom_validator,
)

await client.get("https://whitelisted.domain")  # Allowed
await client.get("https://unknown.domain")      # Blocked
```

## How It Works

1. **Cache Lookup**: First checks if the host has been recently validated and cached
2. **DNS Resolution**: If not cached, resolves the hostname to an IP address
3. **Validation**: Verifies the IP is globally routable, blocking private/internal addresses
4. **Custom Validation**: If provided, your custom validator is called for additional checks
5. **Request Modification**: Rewrites the request to use the validated IP directly

The DNS cache significantly reduces latency for repeated requests, while per-host locking ensures efficient concurrent resolution of parallel requests.

> [!TIP]
> The SSRF protection applies to all HTTP methods (GET, POST, PUT, DELETE, etc.) and automatically validates redirects to prevent SSRF attacks through redirect chains.