All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Token Authentication Support: You can now authenticate directly using a pre-existing JWT access token
- New optional parameter
access_tokeninMarzbanAPIconstructor - Choose between username/password authentication or direct token authentication
- Backward compatible with existing code
- New optional parameter
usernameandpasswordparameters are now optional inMarzbanAPIconstructor (whenaccess_tokenis provided)- Updated documentation and examples to show both authentication methods
# New: Direct token authentication
async with MarzbanAPI("http://127.0.0.1:8000", access_token="your_jwt_token") as api:
users = await api.user.get_users()
# Still works: Username/password authentication
async with MarzbanAPI("http://127.0.0.1:8000", "admin", "password") as api:
users = await api.user.get_users()- Initial release of MarzbanAPILib
- Modular API client with separate sections for User, Admin, System, Core, and Node management
- Full async/await support with modern Python patterns
- Complete type hints and comprehensive error handling
- Support for all Marzban API endpoints (35+ methods)
- Context manager support for automatic connection management
- Detailed documentation and usage examples