Thank you for your interest in contributing to the ONVIF Python project! We welcome contributions from everyone—whether you're a seasoned developer, a device integrator, or a first-time open source participant. Your feedback, code, documentation, and ideas help make this project better for the entire community.
- How to Contribute
- Code of Conduct
- Ways to Contribute
- Development Setup
- Pull Request Guidelines
- Reporting Issues
- Style Guide
- Documentation
- Community & Support
- License
- Fork the repository on GitHub and clone your fork locally.
- Create a new branch for your feature, fix, or documentation update.
- Make your changes with clear, descriptive commit messages.
- Test your changes to ensure they work as expected and do not break existing functionality.
- Push your branch to your fork and open a Pull Request (PR) against the
devbranch of this repository. - Participate in code review by responding to feedback and making necessary updates.
All contributors are expected to follow our Code of Conduct, which is based on the CNCF Foundation Code of Conduct. Please treat everyone with respect and foster a welcoming, inclusive environment.
- Bug Reports: If you find a bug, please open an issue with clear steps to reproduce, expected behavior, and environment details.
- Feature Requests: Suggest new features or improvements by opening an issue and describing your use case and desired functionality.
- Code Contributions: Submit fixes, enhancements, or new features via Pull Requests. See Development Setup and Pull Request Guidelines.
- Documentation: Help improve the README, usage examples, or API documentation. Well-written docs are as valuable as code!
- Testing: Add or improve unit and integration tests to ensure reliability and compatibility.
- Device Testing: Share your experience with different ONVIF devices by contributing results to the device-test list.
- Translations: If you can help translate documentation or error messages, let us know!
-
Clone the repository and switch to dev branch:
# Option 1: Clone dev branch directly git clone -b dev https://github.com/nirsimetri/onvif-python.git cd onvif-python # Option 2: Clone then switch to dev git clone https://github.com/nirsimetri/onvif-python.git cd onvif-python git checkout dev
-
Install locally:
# Install the package in development mode pip install -e . # Install development dependencies (pytest, black, flake8) pip install -e ".[dev]"
Or use
pyproject.tomlwith your preferred tool (e.g., Poetry, pip). -
Run tests:
pytest
Make sure all tests pass before submitting your changes.
-
Lint and format code:
# Check code style with flake8 flake8 . # Format code with black black .
Ensure your code follows PEP8 standards and is properly formatted.
-
Try example scripts: See the
examples/folder for usage scenarios.
Use the following commit/PR title types:
feat→ ✨ New featurefix→ 🐛 Bug fixchore→ 🔧 Non-code tasks such as updating dependencies, configs, or build toolsdocs→ 📚 Documentation-only changesstyle→ 🎨 Code style changes (formatting, spacing, etc. — without affecting logic)refactor→ 🔨 Code refactoring without adding features or fixing bugstest→ ✅ Adding or modifying tests (unit tests, integration tests, etc.)perf→ 🚀 Performance improvementsci→ ⚙️ Changes to CI/CD configuration or pipelinesbuild→ 📦 Changes to the build system or external dependencies (e.g., Dockerfile)revert→ ⏪ Reverting a previous commitcode→ General code changes that support but are not core features (e.g., examples)
feat: add Media service auto path detectionfix: handle empty response in GetServiceschore: update dependencies
- Describe your changes clearly in the PR description.
- Reference related issues by number (e.g.,
Fixes #123). - Keep changes focused—avoid mixing unrelated fixes or features in one PR.
- Include tests for new features or bug fixes when possible.
- Follow the style guide and ensure your code passes linting and tests.
- Be responsive to review feedback and update your PR as needed.
- Squash commits if requested, to keep history clean.
- Search existing issues before opening a new one to avoid duplicates.
- Provide as much detail as possible: environment, device model, ONVIF version, error messages, and steps to reproduce.
- Attach logs, screenshots, or code snippets if relevant.
- Be polite and constructive—remember, maintainers and contributors are volunteers.
- PEP8 is the standard for Python code style. Use tools like
flake8andblackto check and format your code. - Docstrings: Use clear, concise docstrings for modules, classes, and functions.
- Type hints: Add type annotations where appropriate for better readability and tooling support.
- Comments: Write helpful comments, especially for complex logic.
- Naming: Use descriptive variable, function, and class names.
- Update the README if your changes affect usage or installation.
- Add or update docstrings and inline comments.
- If you add new modules or services, document their usage and API.
- For device-specific notes, contribute to the device-test list.
- Join discussions in the GitHub Discussions tab.
- For real-time help, check if there is a chat or forum linked in the repository.
- Be respectful, patient, and helpful to others.
By contributing, you agree that your contributions will be licensed under the MIT License.
Thank you for making ONVIF Python better! We appreciate your time, expertise, and enthusiasm. Happy coding!