CRUDs is a high level client library for APIs written in Python, and is ideal for back-end communication, automated data processing and interactive environments like Notebooks.
>>> import cruds
>>>
>>> catfact_ninja = cruds.Client("catfact.ninja")
>>>
>>> data = catfact_ninja.read("fact")
>>> type(date) # Python built-in data types you can use instantly!
<class 'dict'>When working with APIs, you have several options. Here's why CRUDs might be the right choice:
vs. requests/httpx/urllib3:
- Semantic API Design: Think about what you're doing (create, read, update, delete) instead of HTTP methods
- Production-Ready: Built-in retry logic, error handling, and logging without configuration
- Simplified Auth: OAuth2, bearer tokens, and basic auth handled automatically
- Data-First: Returns Python data structures directly instead of response objects
vs. SDKs for specific APIs:
- Consistent Interface: Same patterns across all APIs
- No Vendor Lock-in: Switch between APIs without learning new patterns
- Lightweight: No need for multiple heavy SDKs
- Customizable: Full control while maintaining simplicity
Perfect for:
- Data engineers working with multiple APIs
- Backend developers building integrations
- Data scientists in notebooks
- DevOps teams automating API interactions
Make Create, Read, Update and Delete operations quickly, easily, and safely. CRUDs aims to implement URLLib3's best practises while remaining as light as possible.
Features:
- Authentication: Username & Password, Bearer Token and OAuth2
- JSON Serialization/Deserialization
- Request parameters and automatically URL encoded
- Configurable timeouts (default 5 minutes)
- Exceptions handling for bad status codes
- Built-in retry logic with exponential backoff
- SSL Certificate Verification
- Logging for monitoring
- Interfaces (SDK Creation)
CRUDs provides pre-configured interfaces for popular APIs, making integration even easier:
- PlanHat - Complete customer success platform interface with 20+ data models, bulk operations, and advanced analytics. View Documentation
To install a stable version use PyPI.
$ pip install crudsWhether you are an data engineer wanting to retrieve or load data, a developer writing software for the back-of-the-front-end, or someone wanting to contribute to the project, for more information about CRUDs please visit Read the Docs.
CRUDs is released under the MIT License. See the bundled LICENSE file for details.