A modern, pythonic Katana Manufacturing ERP API client with automatic retries, rate limiting, and smart pagination
Project description
Katana Manufacturing ERP - API Ecosystem
Multi-language client ecosystem for the Katana Manufacturing ERP API. Production-ready clients with automatic resilience, rate limiting, and pagination.
Packages
| Package | Language | Version | Description |
|---|---|---|---|
| katana-openapi-client | Python | 0.41.0 | Full-featured API client with transport-layer resilience |
| katana-mcp-server | Python | 0.25.0 | Model Context Protocol server for AI assistants |
| katana-openapi-client | TypeScript | 0.0.1 | TypeScript/JavaScript client with full type safety |
Features Comparison
| Feature | Python Client | TypeScript Client | MCP Server |
|---|---|---|---|
| Automatic retries | Yes | Yes | Yes (via Python client) |
| Rate limit handling | Yes | Yes | Yes |
| Auto-pagination | Yes | Yes | Yes |
| Type safety | Full (Pydantic) | Full (TypeScript) | Full (Pydantic) |
| Sync + Async | Yes | Async only | Async only |
| Browser support | No | Yes | No |
| AI Integration | - | - | Claude, Cursor, etc. |
Quick Start
Python Client
pip install katana-openapi-client
import asyncio
from katana_public_api_client import KatanaClient
from katana_public_api_client.api.product import get_all_products
async def main():
async with KatanaClient() as client:
response = await get_all_products.asyncio_detailed(client=client)
products = response.parsed.data
print(f"Found {len(products)} products")
asyncio.run(main())
TypeScript Client
npm install katana-openapi-client
import { KatanaClient } from 'katana-openapi-client';
const client = await KatanaClient.create();
const response = await client.get('/products');
const { data } = await response.json();
console.log(`Found ${data.length} products`);
MCP Server (Claude Desktop)
pip install katana-mcp-server
Add to Claude Desktop config
(~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"katana": {
"command": "uvx",
"args": ["katana-mcp-server"],
"env": {
"KATANA_API_KEY": "your-api-key-here"
}
}
}
}
Configuration
All packages support the same authentication methods:
- Environment variable:
KATANA_API_KEY .envfile: Create withKATANA_API_KEY=your-key- Direct parameter: Pass
api_keyto client constructor
# .env file
KATANA_API_KEY=your-api-key-here
KATANA_BASE_URL=https://api.katanamrp.com/v1 # Optional
API Coverage
All clients provide access to the complete Katana API:
| Category | Endpoints | Description |
|---|---|---|
| Products & Inventory | 25+ | Products, variants, materials, stock levels |
| Orders | 20+ | Sales orders, purchase orders, fulfillment |
| Manufacturing | 15+ | BOMs, manufacturing orders, operations |
| Business Relations | 10+ | Customers, suppliers, addresses |
| Configuration | 6+ | Locations, webhooks, custom fields |
Total: 76+ endpoints with 150+ fully-typed data models
Project Structure
katana-openapi-client/ # Monorepo root
├── pyproject.toml # Workspace configuration (uv)
├── uv.lock # Unified lock file
├── docs/
│ ├── katana-openapi.yaml # OpenAPI 3.1.0 specification
│ ├── adr/ # Shared architecture decisions
│ └── *.md # Shared documentation
├── katana_public_api_client/ # Python client package
│ ├── katana_client.py # Resilient client with retries
│ ├── api/ # Generated API modules (76+)
│ ├── models/ # Generated data models (150+)
│ └── docs/ # Package documentation
├── katana_mcp_server/ # MCP server package
│ ├── src/katana_mcp/
│ │ ├── server.py # FastMCP server
│ │ ├── tools/ # MCP tools (12)
│ │ └── resources/ # MCP resources (5)
│ └── docs/ # Package documentation
└── packages/
└── katana-client/ # TypeScript client package
├── src/
│ ├── client.ts # Resilient client
│ └── generated/ # Generated SDK
└── docs/ # Package documentation
Documentation
Package Documentation
Each package has its own documentation in its docs/ directory:
- Python Client Guide - Complete usage guide
- Python Client Cookbook - Practical recipes
- MCP Server Architecture - MCP design patterns
- MCP Server Development - Development guide
- TypeScript Client Guide - TypeScript usage
Architecture Decisions
Key architectural decisions are documented as ADRs (Architecture Decision Records):
Python Client ADRs (katana_public_api_client/docs/adr/):
- ADR-001: Transport-Layer Resilience
- ADR-002: OpenAPI Code Generation
- ADR-003: Transparent Pagination
- ADR-006: Response Unwrapping
MCP Server ADRs (katana_mcp_server/docs/adr/):
- ADR-010: MCP Server Architecture
TypeScript Client ADRs (packages/katana-client/docs/adr/):
Shared/Monorepo ADRs (docs/adr/):
- ADR-009: Migrate to uv
Shared Documentation
- Contributing Guide - How to contribute
- uv Usage Guide - Package manager guide
- Monorepo Release Guide - Semantic release setup
Development
Prerequisites
- Python 3.12+ for Python packages
- Node.js 18+ for TypeScript package
- uv package manager (install)
Setup
# Clone repository
git clone https://github.com/dougborg/katana-openapi-client.git
cd katana-openapi-client
# Install all dependencies
uv sync --all-extras
# Install pre-commit hooks
uv run pre-commit install
# Create .env file
cp .env.example .env # Add your KATANA_API_KEY
Common Commands
# Run all checks (lint, type-check, test)
uv run poe check
# Run tests
uv run poe test
# Format code
uv run poe format
# Regenerate Python client from OpenAPI spec
uv run poe regenerate-client
Commit Standards
This project uses semantic-release with conventional commits:
# Python client changes
git commit -m "feat(client): add new inventory helper"
git commit -m "fix(client): handle pagination edge case"
# MCP server changes
git commit -m "feat(mcp): add manufacturing order tools"
git commit -m "fix(mcp): improve error handling"
# TypeScript client changes
git commit -m "feat(ts): add browser support"
# Documentation only (no release)
git commit -m "docs: update README"
See MONOREPO_SEMANTIC_RELEASE.md for details.
License
MIT License - see LICENSE for details.
Contributing
Contributions welcome! See CONTRIBUTING.md for guidelines.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file katana_openapi_client-0.47.0.tar.gz.
File metadata
- Download URL: katana_openapi_client-0.47.0.tar.gz
- Upload date:
- Size: 1.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
712ac8c3e1549c244878d94ce544a4c0116f1c741fdc43e53f581985e8bc762f
|
|
| MD5 |
34b4c9b443f443d6ba02de76bd55c67b
|
|
| BLAKE2b-256 |
27461279025ba1f409ec3f0ba3f1407407b7219b27bd80abac5b4dbea6175afa
|
Provenance
The following attestation bundles were made for katana_openapi_client-0.47.0.tar.gz:
Publisher:
release.yml on dougborg/katana-openapi-client
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
katana_openapi_client-0.47.0.tar.gz -
Subject digest:
712ac8c3e1549c244878d94ce544a4c0116f1c741fdc43e53f581985e8bc762f - Sigstore transparency entry: 941913333
- Sigstore integration time:
-
Permalink:
dougborg/katana-openapi-client@915b3d27841e7a65fe7e97aae45c3b1e7915c726 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/dougborg
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@915b3d27841e7a65fe7e97aae45c3b1e7915c726 -
Trigger Event:
push
-
Statement type:
File details
Details for the file katana_openapi_client-0.47.0-py3-none-any.whl.
File metadata
- Download URL: katana_openapi_client-0.47.0-py3-none-any.whl
- Upload date:
- Size: 912.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ef945138e27e62103c77fbe9322255418d45e02c282a7b74ab8b7d2f255b6dce
|
|
| MD5 |
e77688678bc1d6a37637a58540d49493
|
|
| BLAKE2b-256 |
ba32a3513e1fff81a3ea5a025d1c484cccaa0679fd1b257cbe812e9673432c4d
|
Provenance
The following attestation bundles were made for katana_openapi_client-0.47.0-py3-none-any.whl:
Publisher:
release.yml on dougborg/katana-openapi-client
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
katana_openapi_client-0.47.0-py3-none-any.whl -
Subject digest:
ef945138e27e62103c77fbe9322255418d45e02c282a7b74ab8b7d2f255b6dce - Sigstore transparency entry: 941913337
- Sigstore integration time:
-
Permalink:
dougborg/katana-openapi-client@915b3d27841e7a65fe7e97aae45c3b1e7915c726 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/dougborg
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@915b3d27841e7a65fe7e97aae45c3b1e7915c726 -
Trigger Event:
push
-
Statement type: