feat: Add Booklooker client configuration and exception handling
- Introduced BooklookerConfig class for runtime configuration management. - Created custom exceptions for API errors, including authentication and validation errors. - Generated API contracts from OpenAPI specification, including endpoints and security schemes. - Implemented models for articles, orders, and webhooks to facilitate data handling. - Developed a webhook helper for processing and enriching webhook events. - Added tests for configuration defaults, token expiration, and webhook enrichment.
This commit is contained in:
commit
1d8ee1bba6
21 changed files with 3009 additions and 0 deletions
38
pyproject.toml
Normal file
38
pyproject.toml
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
[build-system]
|
||||
requires = ["setuptools>=69", "wheel"]
|
||||
build-backend = "setuptools.build_meta"
|
||||
|
||||
[project]
|
||||
name = "booklooker-client"
|
||||
version = "0.1.0"
|
||||
description = "Python client for the Booklooker REST API with Pydantic models and webhook helpers"
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.11"
|
||||
authors = [
|
||||
{ name = "GitHub Copilot" }
|
||||
]
|
||||
dependencies = [
|
||||
"httpx>=0.27.0",
|
||||
"pydantic>=2.8.2",
|
||||
"PyYAML>=6.0.2"
|
||||
]
|
||||
|
||||
[project.optional-dependencies]
|
||||
webhooks = [
|
||||
"fastapi>=0.115.0",
|
||||
"uvicorn>=0.30.6"
|
||||
]
|
||||
dev = [
|
||||
"pytest>=8.3.3",
|
||||
"pytest-asyncio>=0.24.0"
|
||||
]
|
||||
|
||||
[tool.setuptools.package-dir]
|
||||
"" = "src"
|
||||
|
||||
[tool.setuptools.packages.find]
|
||||
where = ["src"]
|
||||
|
||||
[tool.pytest.ini_options]
|
||||
testpaths = ["tests"]
|
||||
addopts = "-q"
|
||||
Loading…
Add table
Add a link
Reference in a new issue