semvec/pypi-packages huggingface dataset:
nanokv 0.1.0
A minimal key-value serialization format
Requires Python: >=3.13

# nanokv

A compact(er) key-value serialization format for Python.

## Installation

```bash
pip install nanokv
```

## Usage

```python
import nanokv

# Serialize a dict to a string
s = nanokv.dumps({"name": "example", "count": 42})
# => '[name="example",count=42]'

# Parse a string to a dict
d = nanokv.loads('[name="example",count=42]')
# => {"name": "example", "count": 42}
```

## Format

```
[key="value",count=123,nested=[a=1,b=2],list={1,2,3}]
```

- Strings are quoted: `"value"`
- Integers are bare: `123`
- Booleans are bare: `true` | `false`
- Nested objects use brackets: `[key=value]`
- Lists use braces: `{1,2,3}`

## Grammar

See [GRAMMAR](GRAMMAR.ebnf) for the full specification.
arp-policy 0.1.2
Policy evaluation helpers for the ARP Standard.
Requires Python: >=3.11

# `arp-policy`

A minimal policy evaluator for the ARP Tool Registry.

## Policy format

Top-level keys:
- `Version`: optional version string.
- `Statement`: list of statements.

Statement keys:
- `Sid`: optional statement id for audit/debug.
- `Effect`: `Allow` or `Deny`.
- `Action`: string or list of strings.
- `Resource`: string or list of strings.
- `Condition`: optional map of operator to key/value map.

Supported condition operators:
- `StringEquals`
- `StringLike` (wildcards with `*`)

## Usage

```python
from arp_policy import Enforcer, Policy, emit_decision

policy = Policy.load("./config/policy/policy.dev.json")
enforcer = Enforcer(policy)

context = {
    "principal": "user:alice",
    "tenant": "acme",
    "environment": "dev",
    "request_id": "req-123",
}

decision = enforcer.authorize("tool:Invoke", "tool:finance/pay", context)
if not decision.allowed:
    raise Exception("policy denied")

# Audit event
record = emit_decision(
    decision,
    context,
    action="tool:Invoke",
    resource="tool:finance/pay",
    policy_hash=policy.policy_hash,
)
```

## Auth and identity

`arp-policy` is auth-agnostic. It does not validate credentials or issue identities.

The host service (Tool Registry, Runtime, Daemon) must:
- authenticate the caller using your chosen scheme (JWT, mTLS, API key, etc.)
- map verified identity attributes into the `context` dict (e.g., `principal`, `tenant`)
- avoid passing raw credentials into policy context

### Tool discovery filtering

```python
tools = [{"tool_id": "finance.pay", "metadata": {"labels": {"tier": "gold"}}}]
allowed = enforcer.filter_tools(tools, context)
```

## Context keys

Typical keys used in policy conditions:
- `principal`
- `tenant`
- `environment`
- `request_id`
- `tool.id`
- `tool.tags` (tool labels/annotations)
Flask-FlatPages 0.9.0
Provides flat static pages to a Flask application
Requires Python: >=3.8

===============
Flask-FlatPages
===============

.. image:: https://github.com/flask-FlatPages/flask-FlatPages/actions/workflows/test.yml/badge.svg?branch=master
    :target: https://github.com/flask-FlatPages/flask-FlatPages/actions/workflows/test.yml/

.. image:: https://img.shields.io/pypi/v/Flask-FlatPages.svg
    :target: https://pypi.python.org/pypi/Flask-FlatPages

Provides flat static pages to a Flask_ application, based on text files
as opposed to a relational database.

* Works on Python 3.8+
* BSD licensed
* Latest documentation `on Read the Docs`_
* Source, issues and pull requests `on Github`_
* Releases `on PyPI`_
* Install with ``pip install Flask-FlatPages``

.. _Flask: http://flask.pocoo.org/
.. _on Read the Docs: http://flask-flatpages.readthedocs.org/
.. _on Github: https://github.com/SimonSapin/Flask-FlatPages/
.. _on PyPI: http://pypi.python.org/pypi/Flask-FlatPages
arp-llm 0.1.1
Shared helper for calling LLM providers across the ARP/JARVIS stack.
Requires Python: >=3.11

# ARP LLM (`arp-llm`)

Shared helper for calling LLM providers across the ARP/JARVIS stack.

This package provides:
- `ChatModel.response(...)` (chat/text + optional JSON Schema structured output)
- `Embedder.embed(...)` (embeddings)
- `load_chat_model_from_env(...)` / `load_embedder_from_env(...)` profile-based configuration

## Install

```bash
pip install arp-llm
```

## Quickstart (OpenAI default)

```bash
export ARP_LLM_API_KEY=...
export ARP_LLM_CHAT_MODEL=gpt-4.1-mini
# Optional (OpenAI is the default profile):
# export ARP_LLM_PROFILE=openai
```

```python
import asyncio

from arp_llm import Message, load_chat_model_from_env

async def main() -> None:
    model = load_chat_model_from_env()
    resp = await model.response([Message.user("hello")])
    print(resp.text)

asyncio.run(main())
```

## Dev mock (optional; no network)

```bash
export ARP_LLM_PROFILE=dev-mock
# Optional: provide deterministic fixtures
# export ARP_LLM_DEV_MOCK_FIXTURES_PATH=./fixtures.json
```

## Configuration (OpenAI)

```bash
# ARP_LLM_PROFILE=openai is optional (default)
export ARP_LLM_API_KEY=...
export ARP_LLM_CHAT_MODEL=gpt-4.1-mini
# Optional overrides:
export ARP_LLM_BASE_URL=https://api.openai.com
```

## API

- `ChatModel.response(messages, *, response_schema=None, temperature=None, timeout_seconds=None, metadata=None) -> Response`
  - If `response_schema` is provided, `Response.parsed` will be a JSON-like `dict`.
- `Embedder.embed(texts, *, timeout_seconds=None, metadata=None) -> EmbeddingResponse`

## Direct construction (advanced)

The `load_*_from_env*()` helpers are optional. For multi-provider routing/fallback inside a single process, construct provider clients directly (and route per call), for example:

```python
from arp_llm.providers.openai import OpenAIChatModel

model = OpenAIChatModel(model="gpt-4.1-mini", api_key="...", base_url="https://api.openai.com")
```

See `https://github.com/AgentRuntimeProtocol/BusinessDocs/blob/main/Business_Docs/JARVIS/LLMProvider/HLD.md` and `https://github.com/AgentRuntimeProtocol/BusinessDocs/blob/main/Business_Docs/JARVIS/LLMProvider/LLD.md` for the design intent.
arp-auth 0.2.1
Auth helpers for ARP components (OIDC client credentials and token exchange).
Requires Python: >=3.11

# ARP Auth

Auth helpers for ARP components. This package provides a small, dependency-free
OIDC client for client-credentials and token-exchange flows (Keycloak-friendly).

## Install

```bash
pip install arp-auth
```

## Quick start (client credentials)

```python
from arp_auth import AuthClient, AuthClientConfig

config = AuthClientConfig(
    issuer="http://localhost:8080/realms/arp-dev",
    client_id="arp-run-gateway",
    client_secret="arp-run-gateway-secret",
)
client = AuthClient(config)

token = client.client_credentials(audience="arp-run-coordinator")
print(token.access_token)
```

## Token exchange

```python
from arp_auth import AuthClient, AuthClientConfig

client = AuthClient(
    AuthClientConfig(
        issuer="http://localhost:8080/realms/arp-dev",
        client_id="arp-run-gateway",
        client_secret="arp-run-gateway-secret",
    )
)

exchanged = client.exchange_token(
    subject_token="<incoming-user-jwt>",
    audience="arp-run-coordinator",
)
print(exchanged.access_token)
```

## Environment-based config

Use `AuthClient.from_env()` with:

- `ARP_AUTH_ISSUER` (example: `http://localhost:8080/realms/arp-dev`)
- `ARP_AUTH_CLIENT_ID`
- `ARP_AUTH_CLIENT_SECRET`
- `ARP_AUTH_TOKEN_ENDPOINT` (optional override; defaults to issuer + `/protocol/openid-connect/token`)
- `ARP_AUTH_AUDIENCE` or `ARP_AUTH_SERVICE_ID` (optional default audience)
- `ARP_AUTH_TIMEOUT_SECS` (optional; default `10`)

## Notes

- This library does not cache or refresh tokens automatically; callers should cache tokens
  and refresh based on `expires_in` in `TokenResponse`.
- For local dev, use `arp-sts-keycloak` to stand up a Keycloak realm with ARP clients.