semvec/pypi-packages huggingface dataset:
zeroquant-sdk 0.3.3
Python SDK for ZeroQuant agentic DeFi vaults
License: MIT
Requires Python: >=3.10
Keywords: zeroquant, defi, ethereum, ai, agents, web3

# ZeroQuant Python SDK

Python SDK for ZeroQuant agentic DeFi vaults with built-in LangChain support.

## Installation

```bash
pip install zeroquant
```

### With LangChain support

```bash
pip install zeroquant[langchain]
```

## Quick Start

```python
import asyncio
from zeroquant import ZeroQuantClient
from zeroquant.models import VaultConfig

async def main():
    client = ZeroQuantClient(
        provider="https://sepolia.infura.io/v3/YOUR_KEY",
        config=VaultConfig(
            owner="0x...",
            permission_manager="0x...",
            factory_address="0x..."
        ),
        private_key="0x..."
    )

    # Create vault
    vault_address = await client.create_vault(salt=12345)
    print(f"Vault created: {vault_address}")

    # Check balance
    balance = await client.get_balance()
    print(f"Balance: {balance / 10**18} ETH")

asyncio.run(main())
```

## LangChain Integration

```python
from langchain.agents import initialize_agent, AgentType
from langchain.chat_models import ChatOpenAI
from zeroquant.langchain import CreateVaultTool, ExecuteSwapTool, GetVaultBalanceTool

tools = [
    CreateVaultTool(client=client),
    ExecuteSwapTool(client=client, swap_intent=swap_intent),
    GetVaultBalanceTool(client=client)
]

agent = initialize_agent(
    tools,
    ChatOpenAI(model="gpt-4"),
    agent=AgentType.OPENAI_FUNCTIONS
)

result = agent.run("Create a vault and swap 1 ETH for USDC")
```

## Authentication Modes

### 1. Agent Wallet
```python
client = ZeroQuantClient(
    provider="https://...",
    config=config,
    private_key="0x..."  # Agent's private key
)
```

### 2. Delegated Signing
```python
client = ZeroQuantClient(
    provider="https://...",
    config=config,
    session_key="0x...",
    delegation_proof="0x..."
)
```

### 3. API Key
```python
client = ZeroQuantClient(
    provider="https://...",
    config=config,
    api_key="zq_live_...",
    api_url="https://api.zeroquant.io"
)
```

## Features

- **Async-first** - Built with asyncio for efficient I/O
- **Type-safe** - Full Pydantic models with validation
- **LangChain tools** - Built-in tools for AI agents
- **Multi-modal auth** - Wallet, delegated, or API key
- **Comprehensive** - Feature parity with TypeScript SDK

## Examples

See `examples/` directory for complete examples:
- `basic_swap.py` - Create vault and execute swap
- `langchain_agent.py` - LangChain agent with ZeroQuant tools

## Documentation

Full documentation: https://docs.zeroquant.io

## License

MIT
cmsbx-code-interpreter 0.0.1
cmsbx Code Interpreter - Stateful code execution
License: MIT
Requires Python: <4.0,>=3.9

<p align="center">
  <img width="100" src="https://raw.githubusercontent.com/e2b-dev/E2B/refs/heads/main/readme-assets/logo-circle.png" alt="e2b logo">
</p>

<h4 align="center">
  <a href="https://pypi.org/project/e2b/">
    <img alt="Last 1 month downloads for the Python SDK" loading="lazy" width="200" height="20" decoding="async" data-nimg="1"
    style="color:transparent;width:auto;height:100%" src="https://img.shields.io/pypi/dm/e2b?label=PyPI%20Downloads">
  </a>  
</h4>

<!---
<img width="100%" src="/readme-assets/preview.png" alt="Cover image">
--->
## What is E2B?
[E2B](https://www.e2b.dev/) is an open-source infrastructure that allows you run to AI-generated code in secure isolated sandboxes in the cloud. To start and control sandboxes, use our [JavaScript SDK](https://www.npmjs.com/package/@e2b/code-interpreter) or [Python SDK](https://pypi.org/project/e2b_code_interpreter).

## Run your first Sandbox

### 1. Install SDK

```
pip install e2b-code-interpreter
```

### 2. Get your E2B API key
1. Sign up to E2B [here](https://e2b.dev).
2. Get your API key [here](https://e2b.dev/dashboard?tab=keys).
3. Set environment variable with your API key.
```
E2B_API_KEY=e2b_***
```     

### 3. Execute code with code interpreter inside Sandbox

```py
from e2b_code_interpreter import Sandbox

with Sandbox.create() as sandbox:
    sandbox.run_code("x = 1")
    execution = sandbox.run_code("x+=1; x")
    print(execution.text)  # outputs 2
```

### 4. Check docs
Visit [E2B documentation](https://e2b.dev/docs).

### 5. E2B cookbook
Visit our [Cookbook](https://github.com/e2b-dev/e2b-cookbook/tree/main) to get inspired by examples with different LLMs and AI frameworks.