semvec/pypi-packages huggingface dataset:
pandas-contract 0.11.4
Define input and output columns for functions working on pandas dataframes.
Requires Python: >=3.9
Keywords: contract, dependencies, pandas, pandera, validation

# pandas-contract
Provide decorators to check functions arguments and return values using pandas DataFrame.

The decorators utilize the [pandera.io](https://pandera.readthedocs.io/) library to validate
data types and constraints of the input arguments and output values of functions.

## Documentation
Documentation on [pandas-contract.readthedocs.io](https://pandas-contract.readthedocs.io/en/latest/)

## Installation
```bash
pip install pandas-contract
```
## Setup

See [Setup](https://pandas-contract.readthedocs.io/en/latest/module-mode.html) for first-time setup information.

## Usage
> ℹ️ **Info:** Generally, the standard abbreviations for the package imports are
> ```python
> import pandas as pd
> import pandas_contract as pc
> import pandera.pandas as pa
> ```


### Check Dataframe structure
The following defines a function that takes a DataFrame with a column `'x'` of type
integer as input and returns a DataFrame with the column `'x'` of type string as output.

The [Pandera.io documentation](http://pandera.readthedocs.io) provides a full overview of the DataFrame/DataSeries
checks.

```python
@pc.argument("df", pa.DataFrameSchema({"x": pa.Int}))
@pc.result(pa.DataFrameSchema({"x": pa.String}))
def col_x_to_string(df: pd.DataFrame) -> pd.DataFrame:
    """Convert column x to string"""
    return df.assign(x=df["x"].astype(str))
```

### Dynamic Arguments and return values
Required columns and arguments can also be specified dynamically using a function that returns a schema.
```python
@pc.argument("df", pa.DataFrameSchema(
    {pc.from_arg("col"): pa.Column()})
)
@pc.result(pa.DataFrameSchema({pc.from_arg("col"): pa.String}))
def col_to_string(df: pd.DataFrame, col: str) -> pd.DataFrame:
    return df.assign(**{col: df[col].astype(str)})
```
#### Multiple columns in function argument
The decorator also supports multiple columns from the function argument.
```python
@pc.argument("df", pa.DataFrameSchema(
        {pc.from_arg("cols"): pa.Column()}
    )
)
@pc.result(pa.DataFrameSchema({pc.from_arg("cols"): pa.String}))
def cols_to_string(df: pd.DataFrame, cols: list[str]) -> pd.DataFrame:
    return df.assign(**{col: df[col].astype(str) for col in cols})
```

### Retrieve dataframes from a more complex argument
Sometimes the dataframe is not a direct argument of the function, but is part of a more complex argument.
In this case, the decorator argument `key` can be used to specify the key of the dataframe in the argument.

If `key` is a callable, it will be called with the argument and the result will be used as the dataframe.
Otherwise, it will be used as a key to retrieve the dataframe from the argument, i.e. `arg[key]`.

#### Dataframe result is wrapped within another object
```python
@pc.result(key="data")
def into_dict():
    """Dataframe wrapped in a dict"""
    return dict(data=pd.DataFrame())
```

See [Key Type](https://pandas-contract.readthedocs.io/en/latest/public-api.html#pandas_contract._decorator.KeyT) for 
more information and examples.
mcp-server-did-jis 1.0.0
MCP Server implementing did:jis - The Intent-Centric Web. Bilateral intent DID method where no resolution happens without mutual consent.
Requires Python: >=3.10
Keywords: ai, bilateral-intent, decentralized-identity, did, humotica, intent-centric-web, jis, llm, mcp, provenance, tibet, trust

# mcp-server-did-jis

[![PyPI](https://img.shields.io/pypi/v/mcp-server-did-jis.svg)](https://pypi.org/project/mcp-server-did-jis/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

**The Intent-Centric Web: MCP Server for did:jis bilateral intent identity.**

> *"The web was built for documents. Then it evolved for applications.
> Now it must evolve for intent — where every interaction begins with 'why'."*

Part of the [HumoticaOS](https://humotica.com) ecosystem.

## What is did:jis?

`did:jis` is the first DID (Decentralized Identifier) method implementing **bilateral intent verification**. Unlike traditional identity systems where anyone can look up your information, did:jis requires **mutual consent** before any identity exchange.

**Traditional DID:**
```
Requester → resolve(did:web:example.com) → DID Document
Anyone can resolve. No consent needed.
```

**did:jis:**
```
Requester → intent request → Subject accepts → DID Document
No resolution without mutual consent.
```

📄 **Full Specification:** [DOI: 10.5281/zenodo.18374703](https://zenodo.org/records/18374703)

## Installation

```bash
pip install mcp-server-did-jis
```

## Usage

### With Claude Desktop

Add to your `claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "did-jis": {
      "command": "mcp-server-did-jis",
      "env": {
        "JIS_IDENTITY": "did:jis:yourdomain.com:your-id",
        "JIS_SECRET": "your-signing-secret"
      }
    }
  }
}
```

### Environment Variables

| Variable | Required | Description |
|----------|----------|-------------|
| `JIS_IDENTITY` | No | Your did:jis identifier |
| `JIS_SECRET` | No | Your signing secret for proofs |
| `HUMOTICA_JIS_ENDPOINT` | No | Custom JIS endpoint (default: humotica.com) |

## Available Tools

### `jis_whoami`
Show your current JIS identity configuration.

### `jis_verify`
Verify a did:jis identifier and get public information.

```
jis_verify did:jis:humotica.com:jasper
```

### `jis_request_intent`
Request bilateral intent from a did:jis identity. The core of the Intent-Centric Web.

```
jis_request_intent
  target: did:jis:humotica.com:jasper
  purpose: authentication
  reason: "Login to my application"
```

### `jis_send_verified`
Send a JIS-verified message with bilateral intent confirmation.

### `ask_humotica`
Ask a verified question to Humotica about TIBET, JIS, or the Intent-Centric Web.

```
ask_humotica "What is bilateral intent?"
```

### `jis_trust_score`
Get the trust score for a did:jis identity based on TIBET audit history.

### `jis_spec`
Get information about the did:jis specification sections.

## Example Session

```
User: Verify the Humotica founder's identity