Creating a Lightweight Application Server Using Werkzeug

When it came time to put up the second phase of the Python tutorial I realized that Werkzeug does not support any kind of hostname binding. I've also mentioned that running these applications on port 80 is problematic due to the fact that root privileges are required to access those ports. Werkzeug is WSGI compatible so installing Apache would be the smartest choice in a production environment but for the sake of a learning exercise I wanted to explore other possibilities. I had already done some research on how to use port 80 so that's where I started...

Python Relative Imports and Module Distribution

If you've been following along in the previous posts you may have noticed that each phase of both the ASP.Net MVC and Python MVC projects has it's own demo. While this is pretty easy to do in IIS I wasn't entirely sure how to get it to work in Python using Werkzeug. As I said in an earlier entry I expect to have to do a bit of house cleaning as I learn more about what Python is capable of. My discovery of Python's support for relative imports and the distributions caused me to rethink some of my earlier design decisions and so I believe it is best to address these changes now rather than later...

Web Services in Python - Part II - Authentication and Login Sessions

In the previous phase of the project we demonstrated how to create a simple web service using Werkzeug and implementing a basic MVC pattern. For this phase of the project we'll be concentrating on handling an authentication request and showing how we can restrict certain methods only to authenticated users. For fun we're going to handle authentication using a challenge response scheme...

Web Services in Python - Part I - Setting up an MVC Pattern

So if you followed along in the last blog post you should have all the tools and frameworks you need to build our Python web service. We're going to create a passport service which will give us single sign on capabilities for any applications we write in the future. This service can be responsible for as little as simply keeping all our passwords in one place or as much as the entire group and permission system it really just depends on your needs. For now we're just going to handle usernames and passwords. Of course this application is going to require a database so let's start there. Unlike Microsoft SQL Server MySQL doesn't come with a GUI to assist with schema generation so the next best alternative is to write some scripts. These files can be located anywhere but hang on to them because we'll be updating them as we move along...

My Adventures with Raspberry Pi - Setting up the Environment

It's been long overdue but I finally took the plunge and purchased a few Model A Raspberry Pis. While I'm excited to get into it my past experience with Linux has been limited and painful. True, I did manage to get it running and connected to my network all those years ago after several hours of frustrating research. However, my victory was short lived when my kernel suddenly became corrupted and I ran back to Windows with my tail between my legs. I've made a couple of attempts since then to get back into it with similar outcomes. This time around I feel a bit more confident. I'm older, wiser and it only takes about 30 minutes to image an 8 gigabyte SD card before I try something new. That being said, I did have some difficulties getting my wireless internet connected, more on that later...

Debian on Amazon Web Services - Resizing the AMI

I'm in the process of setting up a Debian Linux server to demonstrate some of the work I'm doing on my Raspberry Pi. AWS makes this fairly painless except for the fact that the AMI for Wheezy is a whopping 250 gigabytes. I'll be using this server purely for educational purposes so I'm very well certain I'll never need that much space. Unfortunately it's not immediately obvious how to shrink it down to a more appropriate size...

MVC Service Based Web Applications - Part IV - JSONP and Content Server Simulation

One big advantage to client side templating that we have yet to demonstrate in our project is to move all our static HTML views to a content server. In order to simulate this kind of setup we'll need to add another project to our solution. Since everything related to the UI will no longer exist in our current project we're going to change some names around in the process and I'm also going to move some classes into a library project so we can reference them later...