Electricmonk

Ferry Boender

Programmer, DevOpper, Open Source enthusiast.

Blog

Category: python

Multithreaded dev web server for the Python Bottle web framework

I’m writing a simple web application in the Bottle framework. I ran into an issue where I had a single long-running request, but needed to make some additional requests from the browser to the server. It turns out that Bottle’s built in development web server is single-threaded, and can’t handle multiple requests at the same […]

Introducing ScriptForm: Stand-alone webserver that generates forms to serve as frontends to scripts

I’ve just releases v1.0 of ScriptForm. ScriptForm is a stand-alone webserver that automatically generates forms from JSON to serve as frontends to scripts. It takes a JSON file which contains form definitions, constructs web forms from this JSON and serves these to users over HTTP. The user can select a form and fill it out. When […]

A new Material design for Ansible-cmdb v1.5

Ansible-cmdb takes the output of Ansible’s setup module and converts it into a static HTML overview page containing system configuration information. While the previous generated overview page was functional, it didn’t look very good. So for the v1.5 release (which is now available), I gave it an overhaul. I decided on Material design because it gives […]

Ansible-cmdb v1.4: a host overview generator for ansible-managed hosts

Ansible-cmdb takes the output of Ansible’s setup module and converts it into a static HTML overview page containing system configuration information. It supports multiple templates and extending information gathered by Ansible with custom data. You can visit the Github repo, or view an example output here. This is the v1.4 release of ansible-cmdb, which brings a bunch of bug […]

Ansible-cmdb v1.3: a host overview generator for ansible-managed hosts

A few days ago I released ansible-cmdb. Ansible-cmdb takes the output of Ansible’s setup module and converts it into a static HTML overview page containing system configuration information. It supports multiple templates and extending information gathered by Ansible with custom data. The tool was positively received and I got lots of good feedback. This has resulted in […]

Introducing ansible-cmdb: a host overview generator for ansible-managed hosts

For those of you that are using Ansible to manage hosts, you may have noticed you can use the setup module to gather facts about the hosts in your inventory: $ ansible -m setup –tree out/ all $ ls out centos.dev.local eek.electricmonk.nl zoltar.electricmonk.nl debian.dev.local jib.electricmonk.nl $ head out/debian.dev.local  {     “ansible_facts”: {     […]

Dependency Injection in web.py

web.py is a lightweight Python web framework that gets out of your way and just let’s you write Python. Here’s a simple program written in web.py: import web class index: def GET(self): return “Hello, World!`” urls = ( ‘/’, ‘index’, ) if __name__ == “__main__”: app = web.application(urls, globals()) app.run() I quickly ran into the […]

Host inventory overview using Ansible’s Facts

UPDATE: I’ve written a fancier version of the above script as a separate project called ansible-cmdb. It uses templates and can generate a feature-laden HTML version and text versions. It also lets you extend the information from your hosts very easily; even adding completely new hosts. Packages are available for Debian, Redhat and other operating systems. Ansible is a […]

Pydocmd: Generate Markdown from python source files

I’ve created pydocmd. It generates Python Module / script documentation in the Markdown (md) format. It was written to automatically generate documentation that can be put on Github or Bitbucket. It is as of yet not very complete and is more of a Proof-of-concept than a fully-fledged tool. Markdown is also a very restricted format and […]

Scripting a Cisco switch with Python and Expect

In the spirit of “Automate Everything” I was tasked with scripting some oft needed tasks on Cisco Switches. It’s been a while since I’ve had to do anything even remotely related to switches, so I thought I’d start by googling for some ways to automate tasks on switches. What I found: http://ciobota.web.cern.ch/ciobota/project/sw_script/ https://trigger.readthedocs.org/en/latest/ Both seemed […]

The text of all posts on this blog, unless specificly mentioned otherwise, are licensed under this license.