Metadata-Version: 2.4
Name: easybill-api-client
Version: 0.1.0
Summary: Python client for the Easybill REST API
Project-URL: Homepage, https://github.com/dkd-dobberkau/easybill-api-client
Project-URL: Repository, https://github.com/dkd-dobberkau/easybill-api-client
Project-URL: Issues, https://github.com/dkd-dobberkau/easybill-api-client/issues
Author-email: Olivier Dobberkau <olivier.dobberkau@dkd.de>
License: MIT
License-File: LICENSE
Keywords: api,client,easybill,invoicing
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Office/Business :: Financial :: Accounting
Requires-Python: >=3.11
Requires-Dist: easybill-rest>=0.6.0
Requires-Dist: pydantic>=2.0.0
Provides-Extra: dev
Requires-Dist: pytest-cov>=4.0.0; extra == 'dev'
Requires-Dist: pytest>=8.0.0; extra == 'dev'
Requires-Dist: ruff>=0.1.0; extra == 'dev'
Description-Content-Type: text/markdown

# Easybill API Client

Python client for the [Easybill REST API](https://www.easybill.de/api/).

## Installation

```bash
pip install easybill-api-client
```

## Usage

```python
from easybill_client import EasybillClient

with EasybillClient(api_key="your-api-key") as client:
    # Get all customers
    customers = client.get_customers()

    # Get invoices for a year
    invoices = client.get_invoices(year=2025)

    # Get all documents
    documents = client.get_documents()

    # Get projects
    projects = client.get_projects()
```

## API

### EasybillClient

- `get_customers(limit=1000)` - Get all customers
- `get_customer(customer_id)` - Get single customer
- `get_documents(document_type, start_date, end_date, customer_id, status, limit)` - Get documents
- `get_invoices(year, start_date, end_date, customer_id)` - Get invoices
- `get_document(document_id, with_items=True)` - Get single document
- `get_document_pdf(document_id)` - Download document PDF
- `get_projects(customer_id, limit)` - Get projects

### Document Types

```python
from easybill_client import DOC_TYPE_INVOICE, DOC_TYPE_CREDIT, DOC_TYPE_OFFER, DOC_TYPE_ORDER, DOC_TYPE_RECURRING
```

### Exceptions

- `EasybillError` - Base exception
- `EasybillAuthenticationError` - Authentication failed
- `EasybillRateLimitError` - Rate limit exceeded
- `EasybillNotFoundError` - Resource not found

### Models

- `EasybillCustomer` - Customer data
- `EasybillDocument` - Invoice/document data
- `EasybillDocumentItem` - Line item in document
- `EasybillProject` - Project data

## License

MIT
