av fredrik | mar 31, 2013 | Okategoriserade
The other day I needed to download some zip files, unpack them, parse the CSV files in them, and return the data as dicts. I did the very same thing a couple of years ago, and although the source is lost, I recall having a Python (2.4?) script of about two screens to...
av fredrik | feb 21, 2013 | Okategoriserade
When we started with fleet management at Visual Units, one thing was really hard to get right – distance calculations. There was no end of information available, but most-to-all of it was on a level of mathematics far beyond a poor developer who feels that...
av fredrik | feb 11, 2013 | Okategoriserade
(part 1, part 2, part 3, part 4) I’m almost done with the parts to make this project PyPI ready – it can now work on your application as long as you implement the actual code to route calls to the right part of your API – this works: Listing 1....
av fredrik | dec 20, 2012 | Okategoriserade
(part 1, part 2, part 3) I’ve now split the code into separate parts – pyrest.py now only has generic functionality for hooking and routing, along with a bunch of helpers to create responses with HTTP response types. In fact, it’s only 35 lines of...
av fredrik | dec 14, 2012 | Okategoriserade
In part 2, I hooked up the API to CherryPy in a very crude fashion, and this time we’ll look at how we can add handlers for resources in a less clumsy way. I decided to keep handlers on one ’level’ only – that is, /sketch/parrot and /sketch...
av fredrik | dec 9, 2012 | Okategoriserade
In part 1, a very unexciting base CherryPy implementation was all we had, but now it’s time to hook up something real! Instead of creating a mock API to work against as example code, I’ve decided to use hgapi to access the pyrest repo itself as example...
Senaste kommentarer