API Client Core

•

Streamline building Python API clients by defining endpoints with decorators for sync and async execution.

API Client Core provides a robust framework for Python developers to construct API clients efficiently. It uses a decorator-based approach to define API endpoints, transforming plain class methods into fully managed functions that automatically handle HTTP request building, support both synchronous and asynchronous operations, and offer extensive customization through hooks, wrappers, and retry mechanisms. A key feature of this framework is its ability to automatically generate a command-line interface (CLI) and an MCP server from the same endpoint definitions, enabling seamless interaction with APIs via Python code, the terminal, or AI assistants like Claude.

主要功能

01Decorator-based endpoint definitions for HTTP methods and metadata
02Sync/async dual-mode from a single endpoint definition
03Automatic generation of Python APIs, CLI commands, and MCP tools
04Batteries-included with automatic retries, distributed locking, and call statistics
05Extensible through request/response hooks and custom decorators
060 GitHub stars

使用案例

01Developing Python applications requiring robust and maintainable API clients
02Creating command-line interfaces for easy interaction with backend services
03Enabling AI assistants to programmatically invoke API endpoints via MCP servers