Posts

Showing posts with the label Flask

9 Best Python Frameworks for Building Small to Enterprise Applications

Image
Python is both a fun toy and a frightening flamethrower. Same goes with what you can do with Python. Python is loved by hobbyists, scientists and architects alike. It’s damn easy to get started with, has higher-order abstractions and metaprogramming capabilities to build large and complex systems, and has truck-loads of libraries for doing pretty much anything. Sure, there are limitations when it comes to concurrency and strong typing, but you can work around them. In this article, we’ll cast a look at some of the best Python frameworks when it comes to building web applications large and small. 1 Django The  Django  framework has withstood the test of time the go-to web framework for the Python community. If you assaulted a Python developer in their sleep and forced them to build a web application at gunpoint, they’d automatically reach for Django the way a Rubyist will reach for Rails. And there’s a good reason for that. Django is, as the...

Coding in Python

Image
Good and Bad Practices of Coding in Python Python is a high-level multi-paradigm programming language that emphasizes readability. It’s being developed, maintained, and often used following the rules called The Zen of Python or PEP 20. This article shows several examples of good and bad practices of coding in Python that you’re likely to meet often. Using Unpacking to Write Concise Code Packing and unpacking are powerful Python features. You can use unpacking to assign values to your variables: >>> a, b = 2, 'my-string' >>> a 2 >>> b 'my-string' You can exploit this behavior to implement probably the most concise and elegant variables swap in the entire world of computer programming: >>> a, b = b, a >>> a 'my-string' >>> b 2 That’s awesome! Unpacking can be used for the assignment to multiple variables in more complex cases. For example, you can assign like this: >>> x = (1, 2,...