Holded API Wrapper
A comprehensive Python wrapper for the Holded API, providing a clean, type-safe interface for interacting with Holded's services.
DISCLAIMER: This is an unofficial library for the Holded API. It is not affiliated with, officially maintained, or endorsed by Holded. The author(s) of this library are not responsible for any misuse or damage caused by using this code. Use at your own risk.
Features
- Complete API Coverage: Supports all Holded API endpoints across Invoice, CRM, Projects, Team, and Accounting services
- Type Safety: Comprehensive Pydantic models for request and response validation
- Synchronous and Asynchronous: Choose between synchronous and asynchronous clients based on your needs
- Pagination Handling: Automatic pagination for list endpoints
- Error Handling: Robust error handling with detailed exception hierarchy
- Rate Limiting: Built-in rate limit handling with exponential backoff
Installation
pip install holded-api
Quick Start
import os
from holded import HoldedClient
# Initialize the client with your API key
api_key = os.environ.get("HOLDED_API_KEY")
client = HoldedClient(api_key=api_key)
# List contacts
contacts = client.contacts.list(limit=10)
for contact in contacts.items:
print(f"Contact: {contact.name} ({contact.id})")
# Create a new contact
new_contact = client.contacts.create(
name="Acme Inc.",
email="info@acme.com",
type="client"
)
print(f"Created contact with ID: {new_contact.id}")
# Create an invoice
invoice = client.documents.create(
contact_id=new_contact.id,
type="invoice",
date="2023-01-01",
items=[
{
"name": "Product A",
"units": 2,
"price": 100
}
]
)
print(f"Created invoice with ID: {invoice.id}")
Asynchronous Usage
import asyncio
import os
from holded import AsyncHoldedClient
async def main():
api_key = os.environ.get("HOLDED_API_KEY")
client = AsyncHoldedClient(api_key=api_key)
# List contacts
contacts = await client.contacts.list(limit=10)
for contact in contacts.items:
print(f"Contact: {contact.name} ({contact.id})")
# Don't forget to close the client
await client.close()
if __name__ == "__main__":
asyncio.run(main())
Enhanced Data Models
The wrapper includes comprehensive data models for all Holded API resources:
Base Models
BaseModel: Foundation for all models with Pydantic configurationBaseResponse: Common response structurePaginationParams: Parameters for paginated endpointsDateRangeParams: Parameters for date filteringSortParams: Parameters for sorting resultsErrorResponse: Structure for API errors
Resource-Specific Models
- Contacts: Contact management with address, bank account, and tax information
- Documents: Invoices, estimates, orders, and other document types
- Products: Product catalog with variants, categories, and stock management
- CRM: Leads, funnels, tasks, and notes
- Treasury: Accounts, transactions, and categories
- Projects: Project management, tasks, and time tracking
- Accounting: Journal entries, accounts, and financial reports
- Team: Employee management and permissions
Documentation
For more detailed documentation, see:
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Metadata
Release files for holded-python 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| holded_python-0.1.3.tar.gz | 56.5 kB | Without provenance | Details for holded_python-0.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| holded_python-0.1.3-py3-none-any.whl | Python 3 | none | any | Details for holded_python-0.1.3-py3-none-any.whl |
Total release size: 116.3 kB
Release files / holded_python-0.1.3.tar.gz
| Download URL | holded_python-0.1.3.tar.gz |
|---|---|
| Size | 56.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
31bdf72af9c667c52e87316d68f97d7ccb176729adbc57b4125e1800c741554e
|
|
BLAKE2b-256 checksum How to use checksums |
9602e26c5c0b953e4a22c337d211c0c6498a23788f2486596290d0ef95da6643
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.2
|
Release files / holded_python-0.1.3-py3-none-any.whl
| Download URL | holded_python-0.1.3-py3-none-any.whl |
|---|---|
| Size | 59.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9ed99232f35a5e1cfc4af32ff9f0411b84b68777f35441d86b00f059a5178bd8
|
|
BLAKE2b-256 checksum How to use checksums |
acac83a085b2e831d6d443f02886467a8d0fdb9825340f03600255d0e2909427
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.2
|
Security for holded-python 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.