Posted On 08 June 2017 By MicroPyramid
The main goal of WSGI is to facilitate easy interconnection of servers and web frameworks/applications. WSGI defines a standerd API for web servers(uWSGI, Twisted, Gunicorn) to connect and talk to web frameworks like Django, flask, Pyramid. In this article i will explain simple "hello world" app.
Posted On 05 May 2017 By MicroPyramid
Understand self and __init__ method in python Class?
Before understanding the "self" and "__init__" methods in python class, it's very helpful if we have the idea of what is a class and object.
object is one of instances of the class. which can perform the functionalities which are defined in the class.
self represents the instance of the class. By using the "self" keyword we can access the attributes and methods of the class in python.
Posted On 27 January 2017 By MicroPyramid
python class special methods or magic methods. magic methods allow us to override or add the default functionality of python objects. One of the biggest advantages of using Python's magic methods is that they provide a simple way to make objects behave like built-in types. That means you can avoid ugly, counter-intuitive, and nonstandard ways of performing basic operators.
Posted On 15 February 2016 By MicroPyramid
Python collections - Counter is to count the frequency of character, OrderedDict is to track the order of the contents in which they are added and defaultdict is to provide a default value for a nonexistent key for the dictionary element are explained with real time examples in part 2 of collections series.