phpipam-pyclient: Python REST-client for PHPIpam

Hi guys! phpipam is an IP address manager that’s relatively popular in the open source community, and it keeps getting better. At AmLight, phpipam is used to manage (almost) all the IP-based resources, and I ended up developing this Python REST-client, which leverages requests and python fire to have a terminal-based CLI tool to interact with phpipam REST-API. Ultimately, my major goal was to have this Python client API to generate an Ansible inventory based on the devices database of phpipam. Also, I wanted to make sure I had end-to-end integration tests with all applications/services involved.

Testing

Integration tests have been implemented with pytest to validate both Python2.7 and Python3.5 on a docker-based environment, which is composed of mysql, phpipam, selenium, and phpipam_pyclient, in two major test suites:

  • installation: validates a phpipam installation from strach with selenium.
  • client-server API: validates this phpipam-pyclient with phpipam REST API.

The following versions of phpipam are being tested on GitLab CI:

  • 1.3.1
  • 1.3

pipeline status

Docs (ReadTheDocs)

Do you wanna give it a try? Check out the docs on ReadTheDocs. You’ll find all the information there to install and use this software. I’ll keep pushing more features on phpipam-pyclient overtime, let me know if you’re interested in a particular functionality and/or integration.

Documentation Status