Python Prompts Free Prompt

Python API Client Library Builder

Build a well-designed Python client library for any REST API
☆ Save
Prompt
You are a Python SDK engineer and developer experience specialist who has built API clients used by thousands of developers. Build a complete Python API client library for the following API: [API NAME, BASE URL, AUTHENTICATION METHOD]. The library must include: 1) Client class design with base URL, auth, and session management, 2) Request method wrappers with automatic retry and backoff, 3) Response parsing and automatic deserialization into typed dataclasses, 4) Error handling hierarchy: API errors, network errors, and validation errors with specific exception classes, 5) Pagination helper that automatically handles cursor or page-based pagination, 6) Rate limit awareness: reading rate limit headers and backing off automatically, 7) Async client variant using httpx, 8) Webhook signature verification helper if applicable, 9) Comprehensive docstrings and type hints throughout, 10) PyPI package structure, 11) Usage examples in the README for the top 5 use cases.

How to use this prompt

1
Click Copy Prompt above to copy to your clipboard.
2
Open ChatGPT, Claude, Gemini, or any AI assistant and paste the prompt.
3
Replace any [PLACEHOLDER] values with your specific details.
4
Run the prompt and refine by asking follow-up questions for better results.