Metadata-Version: 2.4
Name: vclient
Version: 0.2.0
Summary: Auto-discover API schemas and generate type-safe clients in 6 languages
Home-page: https://github.com/yc-trails/dynamic-api-adapter
Author: Dynamic API Adapter
Author-email: Dynamic API Adapter <dev@example.com>
License: MIT
Project-URL: Homepage, https://github.com/yc-trails/dynamic-api-adapter
Project-URL: Repository, https://github.com/yc-trails/dynamic-api-adapter
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: httpx>=0.27.0
Requires-Dist: aiohttp>=3.9.5
Requires-Dist: pydantic>=2.7.0
Requires-Dist: click>=8.1.7
Requires-Dist: jinja2>=3.1.2
Requires-Dist: jsonschema>=4.21.1
Provides-Extra: dev
Requires-Dist: pytest>=7.4.4; extra == "dev"
Requires-Dist: pytest-asyncio>=0.23.0; extra == "dev"
Requires-Dist: pytest-cov>=4.1.0; extra == "dev"
Requires-Dist: pyinstaller>=6.0.0; extra == "dev"
Requires-Dist: wheel>=0.42.0; extra == "dev"
Dynamic: author
Dynamic: home-page
Dynamic: requires-python

# vclient — Auto-Generate API Clients

Auto-discover OpenAPI endpoints and generate **type-safe client libraries in 6 languages** instantly.

## Features

✨ **Single Command:** 
```bash
vclient infer https://api.example.com
```

Generates:
- 🐍 **Python** (httpx + Pydantic models)
- 📘 **TypeScript** (Fetch API + Zod validation)
- 🐹 **Go** (net/http)
- 🦀 **Rust** (reqwest + serde)
- ☕ **Java** (HttpClient)
- 💎 **Ruby** (Faraday)

## How It Works

1. **Discover** — Probe API endpoints and extract OpenAPI specs
2. **Infer** — Analyze responses → infer complete JSON schemas
3. **Cache** — Store schemas, detect drift on next run
4. **Generate** — Produce idiomatic clients for all 6 languages

## Installation

```bash
# via PyPI
pip install vclient

# via Homebrew (after setup)
brew install yc-trails/vclient/vclient
```

## Quick Start

```bash
# Infer schema from live API
vclient infer https://be.vyonica.com --max-endpoints 25 \
  --gen-python --gen-typescript --gen-go --gen-rust --gen-java --gen-ruby

# Generates: schema.json + client.py + client.ts + client.go + client.rs + Client.java + client.rb
```

## Generate from Existing Schema

```bash
vclient codegen schema.json \
  --python client.py \
  --typescript client.ts \
  --go client.go \
  --rust client.rs \
  --java Client.java \
  --ruby client.rb
```

## Architecture

```
vclient/
├── src/
│   ├── cli.py           # Command-line interface
│   ├── sampler.py       # Endpoint discovery + HTTP sampling
│   ├── inferrer.py      # Schema inference from responses
│   ├── codegen.py       # 6-language code generation
│   └── cache.py         # SQLite schema caching + drift detection
├── tests/               # 55+ unit tests
├── test-clients/        # Generated examples (153 Vyonica endpoints)
└── Formula/vclient.rb   # Homebrew formula
```

## Testing

All generators tested on real-world APIs:

```bash
# Run test suite
pytest tests/ -v

# Test with Vyonica API (153 endpoints)
vclient infer https://be.vyonica.com --no-cache
```

## What's Next

- [ ] Windows binary (Windows Subsystem for Linux compatible)
- [ ] Kotlin support (JVM ecosystem)
- [ ] GraphQL support
- [ ] API documentation generation

---

**Made for:** AI agents, SaaS integrators, enterprises calling legacy APIs without OpenAPI specs.
