You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: full rewrite with async support, pydantic v2 and modern architecture (#72)
* feat(core): rewrite Capmonster client with Pydantic v2 and modern Python features
- Replaced legacy procedural structure with fully typed class-based design
- Introduced Pydantic v2 models with field validation, serialization, and aliasing
- Implemented sync and async Capmonster clients using httpx
- Added extensible BaseTaskPayload structure with abstract to_request()
- Included validator and field_serializer usage for dynamic task behavior
- Flattened proxy structure via smart task serialization
- Applied frozen and immutable model config where applicable
- Full support for Literal, Optional etc.
- Some test cases prepared with pytest + pytest-asyncio
- Ready for mkdocs documentation generation
BREAKING CHANGE: API usage has completely changed from v3.2 to v4.0. All task creation methods now rely on structured payloads and typed clients.
* build: migrate to PEP 621-compatible pyproject.toml and restructure project
- Replaced setup.py and setup.cfg with pyproject.toml for a modern build system. Updated project structure to align with the src directory convention. Adjusted imports, examples, and documentation for the updated layout and dependency changes.
* docs: remove old markdown and add structured API documentation
Removed outdated CODE-OF-CONDUCT.md and README.md files. Introduced a detailed, structured API reference and examples using MkDocs format. Includes documentation for tasks, exceptions, error codes, and usage examples in both synchronous and asynchronous modes.
* chore: remove outdated examples and improve the project structure
* ci: add new tests and CI setup for capmonster tasks
0 commit comments