Contributing¶
Thanks for your interest in contributing to python-glpi-utils!
Development setup¶
git clone https://github.com/giovanny07/python-glpi-utils
cd python-glpi-utils
pip install -e ".[async,dev]"
Running the tests¶
Run with coverage:
Run for a specific Python version (requires tox or pyenv):
All 262 tests must pass before submitting a PR. The CI runs the full suite on Python 3.9 – 3.13 automatically.
Code style¶
The project uses Ruff for linting and formatting:
Type hints are checked with mypy:
Submitting a pull request¶
- Fork the repo and create a branch:
git checkout -b feat/my-feature - Make your changes
- Add or update tests — coverage should not decrease
- Run
pytest,ruff check, andmypylocally - Commit with a clear message (see below)
- Push and open a PR against
main
Commit message format¶
Types: feat, fix, docs, chore, test, refactor
Examples:
feat: add bulk_create helper to ItemProxy
fix: handle empty Content-Range header gracefully
docs: add OAuth2 guide
chore: bump aiohttp to 3.10
Reporting bugs¶
Open an issue at github.com/giovanny07/python-glpi-utils/issues and include:
- Python version (
python --version) - Library version (
pip show glpi-utils) - GLPI version
- Minimal code to reproduce the issue
- Full traceback
Suggesting features¶
Open an issue with the label enhancement and describe:
- The use case
- What the API could look like
- Whether you'd be willing to implement it
Project structure¶
python-glpi-utils/
├── glpi_utils/
│ ├── __init__.py # Public exports
│ ├── api.py # GlpiAPI (sync, legacy)
│ ├── aio.py # AsyncGlpiAPI (async, legacy)
│ ├── oauth.py # GlpiOAuthClient / AsyncGlpiOAuthClient
│ ├── _resource.py # ItemProxy / AsyncItemProxy
│ ├── exceptions.py # Exception hierarchy
│ ├── logger.py # SensitiveFilter, EmptyHandler
│ └── version.py # GLPIVersion
├── tests/ # pytest test suite (262 tests)
├── docs/ # MkDocs documentation
├── examples/ # Usage examples
├── .github/workflows/ # CI (tests) + CD (release + docs)
├── setup.cfg # Package metadata and config
└── mkdocs.yml # Documentation config
License¶
By contributing you agree that your contributions will be licensed under the MIT License.