What I'm Thinking

7 October 2011

In an effort to improve the documenting of my code and some of my projects, I have been looking at the various tools/projects out there that help with this sort of thing. One of them being Sphinx. So the idea is that I want to really have a single source for the documentation, and ideally it would be driven by the code. But alas that is really hard to do, so the idea is to add docstrings to your code. ... Read More

26 September 2011

Working on a web application using the Flask and so made use of SQLAlchemy for the database abstraction layer on a PostgreSQL database instance. My first impressions is that this is very sweet. I am very used to the ORM in Django and have hit a number of limitations with the way it works. I have not enjoyed having to jump Q object to start making use of AND and OR statements. ... Read More

20 September 2011

I wanted to have a basic site that can be used to gauge the level of interest in an idea. So I created a simple web app called DipToe that accepts and stores email addresses in a flat file. Made use of the Flask framework and in about 70 lines of code, excluding the html and css, have the site complete. It prompts for an email address and stores this in a flat text file. ... Read More

My Stack A Changing
15 September 2011

Currently I make use of the following simple stack; Jinja2 Django MySQL / Postgres nginx Apache And based on some of the tasks I have been needing to do (queueing) and handling huge load issues that I have started to encounter. I have started to re-look at this stack. I definitely need to get some decent queueing mechanism in place, we have started to make use of Celery at work. ... Read More

13 September 2011

At CashStar I had to implement some interactions with files being sent to us and needing to decrypt them on the fly. GPG was the encryption we were using and I decided to make use of python-gnupg for my side of the code. GnuPrivacyGuard needs to be installed as python-gnupg is a wrapper to that. Developing on a mac I found that installing GPGTools was the easiest route in doing that. ... Read More

Crap Memory Issues
6 September 2011

Looks like my server is running out of ram… yikes!! I think I am going to move this site to AWS. I have a number of systems running on this server and it is about time I split things up. Also gives me an excuse to make use of AWS. So if you have issues or start getting 505 errors. It’s due to memory issues! [updated] It appears there was a conflict in the apache config files dealing with SSL certs. ... Read More
Ok the title is a little misleading, I did not manage to get everything happening within the virtualenv. The only part not there is nginx. I have nginx setup system wide. There was plenty of resources out there in setting up a virtualenv, so it is assumed that you have that as well as having virtualenvwrapper and pip installed. Create VirtualEnv mkvirtualenv --no-site-packages sample uWSGI Install uwsgi making use of pip, makes life nice and easy; ... Read More

3 September 2011

ZeroMQ is a messaging layer that is blazingly fast. There is a great intro to zeromq by Nicholas PiĆ«l. I’ve been needing to get some decent messaging layer in place and so I decided to try zeromq out. Grabbed the latest version (currently 2.1.9) cd /path/to/downloaded/zeromq-2.1.9 ./configure --prefix=/usr/local make sudo make install Then because I make use of virtualenv, I wanted to install the pyzmq libs in the specific virtualenv I was working on. ... Read More

2 September 2011

At CashStar we have make use of MySQL, and for a number of our applications we have some sort of configuration method/system. Sadly due to the rapid development we have been doing, these various applications each have their own method/system of implementing configuration options for the application. Lately I have been thinking of various ways to have a central configuration system for all our applications. A couple of the developers are working on a configuration service and are mainly looking at solving the requirements of the buy system first. ... Read More

2 September 2011

Playing around with gevents. Easily enough installed/setup. First you need the libevent requirements installed. I downloaded 2.0.13 and did the following; ./configure --prefix=/usr/local make sudo make install There after you can use pip to finish up installing the rest of the requirements and gevent itself pip install greenlet pip install gevent A quick test to make sure you’re all set; python import gevent That’s it. You’re ready to play. ... Read More