summaryrefslogtreecommitdiff
path: root/examples/basic.py
AgeCommit message (Collapse)Author
2026-05-19docs: split examples into read-only basic and guarded smokeRoberto Bertó
The previous examples/basic.py ran destructive operations (configure_set, configure_delete, generate, reset, config_file_load) by default. That is not what a public 'basic' example should do. - examples/basic.py: rewritten as a read-only example (retrieve_show_config, show, retrieve_return_values), uses a robust env-bool parser, prints response.result via a small helper, and uses the supported public import 'from pyvyos import ApiResponse, VyDevice'. - examples/integration_smoke.py: renamed from the old basic.py, keeps the mutating operations, and refuses to run unless PYVYOS_ALLOW_MUTATING_EXAMPLE=1 is set. - README: link both examples and describe what each one does. Note: the dev/ note about a future Docker-based e2e harness is tracked in the unreleased issue drafts; it is not part of this release.
2026-05-19docs: correct README and example to match actual APIRoberto Bertó
- configure_multiple_op uses op_path=, not path= - ApiResponse.result is dict | list | str | None (varies per endpoint), not just dict | list - VYDEVICE_VERIFY_SSL parsing accepts 1/true/yes - describe logging accurately: log records only carry structural fields (no payload, no key); sanitization applies to ApiResponse.request, not to logs; do not claim a NullHandler is attached (none is) - shims at 1.0.0: phrase as a decision deferred to release time
2026-05-19chore: trim root, move examples, drop committed uv.lockRoberto Bertó
- delete CONTRIB.md (superseded by CONTRIBUTING.md) - delete requirements.txt (duplicated [project].dependencies) - delete test_quick.py (ad-hoc smoke covered by tests/test_shims.py) - rewrite example.py as examples/basic.py using the public API (from pyvyos import VyDevice) and drop the RuntimeWarning suppression - move vagrant/ to examples/vagrant/ - stop tracking uv.lock and add it to .gitignore (library, not app) - README: link the examples/ directory - CHANGELOG: document the moves and removals