No description
| src/pretix_model | ||
| tests | ||
| .gitignore | ||
| .pre-commit-config.yaml | ||
| pdm.lock | ||
| pyproject.toml | ||
| README.md | ||
Pretix Model
This is a simple model for a pretix event system used to parse the pretix API.
All object-collections inherit from the ModelEntity(ABC) class which handles the
caching.
Object-collections are the plural form of the object they represent, e.g. Event
and Events.
The update(...) method is used to update the object-collection from the pretix API.
All objects are pydantic BaseModel objects which get created from the pretix API
response.
For usage see the SaunaTable repo which uses this model.
Logging
Use utils/logging_setup.py to set up the logging for the model. This also affects the
logging for your main application.
Linting
Use ruff and pre-commit to lint the code.
# install pre-commit, and ruff
pip3 install -U pre-commit ruff
# install pre-commit hooks
pre-commit install