Tag Archives: python

Python Variable Function Arguments

Python variable function arguments are typically represented by the somewhat arcane-looking ‘*args’ and ‘**kwargs’ arguments in a function signature. Using python variable function arguments frees you from having to know in advance exactly how many arguments a function or method will take, which can be very useful. Variable Function Arguments There are two ways we… Read More »

Folium Lines and Markers

I was asked recently about adding multiple custom lines and markers to a Folium map. Folium can be a bit funny about the order in which things are applied so below gives an example of how you can later lines and markers. To make it easier to see which elements are which in the final… Read More »

Flask RESTful API JSON

JSON is a common format for sending data to and from a RESTful API. In this post we’ll see how we can allow a simple Flask API to receive a JSON input. This post extends my previous post which made a simple Flask RESTful API and uses the Flask ‘get_json()’ method to accept JSON input.… Read More »