Thank you for your interest in contributing to the PlayVideo Python SDK!
-
Clone the repository:
git clone https://github.com/PlayVideo-dev/playvideo-python.git cd playvideo-python -
Create a virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies:
pip install -e ".[dev]" -
Run tests:
pytest
# Run all tests
pytest
# Run tests with verbose output
pytest -v
# Run specific test file
pytest tests/test_client.py
# Run with coverage
pytest --cov=playvideo
# Type check
mypy playvideo
# Lint
ruff check playvideo tests
# Format check
ruff format --check playvideo testsplayvideo/
├── __init__.py # Main exports
├── client.py # Sync PlayVideo client
├── async_client.py # Async PlayVideo client
├── resources/ # API resource implementations
│ ├── collections.py
│ ├── videos.py
│ ├── webhooks.py
│ ├── embed.py
│ ├── api_keys.py
│ ├── account.py
│ └── usage.py
├── errors.py # Exception classes
├── types.py # Type definitions
└── webhook.py # Webhook signature verification
tests/
├── test_client.py
├── test_async_client.py
└── test_webhook.py
- Fork the repository
- Create a feature branch:
git checkout -b feature/my-feature - Make your changes
- Add tests for new functionality
- Ensure all tests pass:
pytest - Ensure type check passes:
mypy playvideo - Ensure lint passes:
ruff check playvideo tests - Format code:
ruff format playvideo tests - Commit your changes:
git commit -m "Add my feature" - Push to your fork:
git push origin feature/my-feature - Open a Pull Request
- We use
rufffor linting and formatting - We use
mypyfor type checking with strict mode - Follow PEP 8 conventions
- Add type hints to all public functions
- Add docstrings to public APIs
- Include a clear description of the changes
- Reference any related issues
- Add tests for new functionality
- Update documentation if needed
- Keep PRs focused on a single change
When reporting issues, please include:
- SDK version
- Python version
- Operating system
- Minimal code to reproduce the issue
- Expected vs actual behavior
If you have questions, feel free to open an issue or reach out at support@playvideo.dev.
By contributing, you agree that your contributions will be licensed under the MIT License.