Python

Flask and Angular on Heroku

I am working my way through this excellent tutorial, covering Python3, Flask, Angular, Heroku, SQLAlchemy, Alembic, requests, Beautiful Soup, NLTK, Redis and D3. Here are some extra notes To stop me from blindly copying/pasting...

A simple Python Flask app on WebFaction

Flask is a popular Python-based micro framework. Here is how to install it on WebFaction. This is based on the Flask instructions and the WebFaction instructions. Log into your WebFaction control panel Domains/Websites ->...

Python, Bottle and websockets

Here is a simple websockets demo, using Python and Bottle, based on the example on the Bottle website Requirements: pip install bottle pip install python-dev pip install gevent-websocket Create websockets.py, from the source code...

Simple websocket client in Python

If you’re developing a websocket app you may need to throw some tests at it. Whilst looking for a websocket client I came across this client,  which makes it very easy to generate websocket...

Django Migrations

Django has a great system for maintaining your database structure, for keeping your RDMS (typically MySQL, PostgreSQL or SQLite) in line with your Django-defined Models, and within your version control system. I recently hit...

Django – a very simple unit test

Test Driven Development (TDD) is a methodology for developing programs where you first write the test, and then write just enough code to make your program pass all tests TDD makes it far less...

Using PostgreSQL with Django

Here is how go set up Django to work with PostgreSQL Install necessary libraries, etc sudo apt-get install libpq-dev sudo apt-get install python-dev sudo apt-get install postgresql-contrib Create a new database and user sudo...