This is not activly maintained, or tested ("if somebody actually wants that message me") It was mostly a learning experience
This project provides:
- A code generator CLI for creating Python clients for the CCVShop API.
- A semi-generated Python library for interacting with CCVShop endpoints.
CCVShopApiClient/
├── generator/ # Code generator CLI
│ ├── __init__.py
│ ├── __main__.py
│ ├── pyproject.toml
│ └── templates/ # Jinja2 templates for code generation
├── ccv/ # Generated CCVShop API client library
│ ├── client.py
│ ├── endpoints/
│ ├── pyproject.toml
│ └── ... # Other generated modules
├── LICENSE # MIT License
└── README.md # This file
From the project root:
pip install -e ./generator
Run the generator CLI:
ccvshop-client-gen --base-url https://demo.ccvshop.nl --output ccv
Or, without installing:
python -m generator --base-url https://demo.ccvshop.nl --output ccv
pip install -e ./ccv
After generating and installing the client, you can use it in your Python projects:
from ccv import client
from ccv.endpoints import orders, products # Example endpoints
# Example usage
api = client.CCVShopClient(api_key="YOUR_API_KEY")
orders_list = api.orders.list()
print(orders_list)
Note: The actual API surface depends on the generated endpoints and schemas.
- Templates for code generation are in
generator/templates/
. - Regenerate the client library whenever the CCVShop API changes.
- Extend or customize templates for your needs.
This project is licensed under the MIT License. See LICENSE for details.
Pull requests and issues are welcome! Please open an issue for bugs or feature requests.
- CCVShop API Documentation
- Uses httpx, selectolax, and jinja2.