Add unit tests for authentication and webhook parsing

- Implement tests for basic and bearer authentication headers in `test_auth.py`.
- Create tests for the `EasybillWebhookParser` in `test_webhooks.py`, covering JSON and form-encoded payloads, as well as a generic parse and acknowledgement method.
This commit is contained in:
claudi 2026-04-17 10:20:12 +02:00
commit caacb339dd
550 changed files with 127217 additions and 0 deletions

34
README.md Normal file
View file

@ -0,0 +1,34 @@
# easybill client
Python client for the easybill REST API with a generated API layer, Pydantic-based convenience models, and webhook parsing helpers for middleware integration.
## Current status
The initial implementation is in place and includes:
- a project scaffold with packaging and tests
- sync and async wrapper clients
- authentication helpers for bearer and basic auth
- a webhook parser for JSON and form payloads
- a reproducible generation script based on the provided Swagger specification
## Development
Install the local project dependencies and run the tests:
```powershell
python -m pytest -q
```
Generate the raw clients from the API description:
```powershell
python scripts/generate_client.py --mode both
```
## Structure
- `src/easybill_client`: public package and middleware-friendly helpers
- `tests`: focused verification for auth and webhook behavior
- `scripts/generate_client.py`: generation entrypoint for the raw REST layer
- `generated`: generated sync and async clients derived from the Swagger description