You are here

Programming for the Web has become a hot topic since the rise of “Web 2.0”, which focuses on user-generated content on web sites. It has always been possible to use Python for creating web sites, but it was a rather tedious task. Therefore, many frameworks and helper tools have been created to assist developers in creating faster and more robust sites.
snippet - Python 2: Save directory to Amazon S3 using boto
27 Feb, 2017
You can save files to Amazon with Python using library called boto. Boto is a Python interface to Amazon Web Services and we need just a tiny part of it. If you have very large files you have to...
snippet - SQLAlchemy custom column names for queries
20 Feb, 2017
To get custom columns from a query you can use the with_entities() method to restrict which columns you'd like to return in the result. Use label() method to give AS value to your query. To use...
snippet - Python write to tmp directory
10 Feb, 2017
Snippet shows you how to write to temporary directory. You can either write a single file, or do stuff in a directory. In any case you should remove the files and folders after you have done your...
snippet - Python: Get timestamp in seconds
27 Jan, 2017
Get timestamp in seconds as integer in Python using the time library.
snippet - Python: convert po to mo
19 May, 2016
This snippet shows you how to convert po files to mo files. Po is the raw plain-text translation file with key value storage format. Mo files are compiled po files, binary format allows you to read...
snippet - Python: Read and decode json file
11 May, 2016
Read and decode json file in Python. You can use the same method for regular json strings.
snippet - Python: Pretty Print Array
11 May, 2016
Pretty print array, meaning that you print array, dictionary, object or any non string format in human-friendly way. This is great for terminal / command line. When you are looking for something for...
snippet - Python define an array
4 May, 2016
This short snippet shows how to define an array in Python.
snippet - Python: Get Current Time with Timezone
3 Feb, 2016
Get current time with timezone in Python. This can be achieved using a library named arrow. It's a datetime library for correct and easy calculations using only one library.
snippet - Python generate HMAC-SHA-256 from string
2 Feb, 2016
Generating hmac involves using "private" key. So you you need to "double encode it". In python you can achieve it using two libraries hashlib and hmac.
snippet - SQLAlchemy: Add Column Collation to Column Creation
1 Feb, 2016
Add column collation to column creation in SQLAlchemy. Optional, a column-level collation for use in DDL and CAST expressions. Renders using the COLLATE keyword supported by SQLite, MySQL, and...
written tutorial - Running Django on Apache and MySQL
30 Jan, 2016
If you plan to use Python for your web backend then you might want to consider Django as there are many good libraries that you need for web development.
snippet - SQLAlchemy: Create Table Column using Decimal and Tinyint
29 Jan, 2016
Using SQLAlchemy to create table columns. To use numeric data types you have to use mysql dialects.
written tutorial - Running Python on Apache
8 Nov, 2015
Using Python in the web. Setup Apache the way that you can run Python backend on it.
snippet - Check if Python module is installed on your system
7 Nov, 2015
Check if a python module is installed or not on the system. The simplest way to do it is in terminal.
written tutorial - Installing App Engine Python SDK on Ubuntu
20 Dec, 2010
Installing Google App Engine SDK on Ubuntu or any linux distribution.
written tutorial - Writing App Engine RSS Feeds
18 Aug, 2010
This tutorial shows how to make RSS feeds in Python for Google App Engine.
written tutorial - Delete Row From Datastore in AppEngine
16 Aug, 2010
Fourth part of AppEngine Forms. This time we delete added rows from database.
written tutorial - AppEngine Edit Form in Python
16 Aug, 2010
Third part of AppEngine Forms. This time we are making edit from.
written tutorial - AppEngine Forms in Python
16 Aug, 2010
Tutorial about making forms in AppEngine with Python. First part.
written tutorial - Submit AppEngine Forms Using POST in Python
16 Aug, 2010
Second part of AppEngine Forms. This time we will try to get our data through post and save the data to database.
written tutorial - Login, Register and Logout in Python for AppEngine
3 Aug, 2010
This tutorial shows how to make Log In, Log Out and Register links for Google App Engine in Python.
written tutorial - Get Self/Base URL in Python
1 Aug, 2010
This tutorial shows you how to get your domain name(base url) from address bar in Google AppEngine, using self and urlparse
written tutorial - Using CSS files in Python on Google App Engine
3 Jul, 2010
This tutorial shows how to use Cascading Style Sheets in Google AppEngine. It's all about url mapping. You have to have some basic setup of a project to follow this tutorial.
written tutorial - Setting up Netbeans + Google App Engine + Python
13 Jun, 2010
This tutorials shows how to set up NetBeans IDE for writing Python for Google App Engine. Using NetBeans IDE is optional, you can complete the tutorial by skipping all the NetBeans related steps.