Python is an amazing programming language named after Monty Python's Flying Circus and brings joy to life since 1991.
There is a saying that programming with Python is the most fun activity you can have with your clothes still on.
#!/usr/bin/env python3
# ^---Use a shebang to mark this file to be interpreted by Python 3.
# https://en.wikipedia.org/wiki/Shebang_(Unix)
import this
Either running like this:
user@ubuntu:~$ python3 the_zen_of_python.py
#
# this would also work:
user@ubuntu:~$ mv the_zen_of_python.py the_zen_of_python
user@ubuntu:~$ python3 the_zen_of_python
or this:
user@ubuntu:~$ chmod +x the_zen_of_python.py # Mark the file as executable
user@ubuntu:~$ ./the_zen_of_python.py
#
# this would also work:
user@ubuntu:~$ mv the_zen_of_python.py the_zen_of_python
user@ubuntu:~$ ./the_zen_of_python
gives us the contents of PEP 20 (see more PEPs):
The Zen of Python, by Tim Peters
Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than *right* now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!
user@ubuntu:~$
Flask is a lean and awesome Python web framework which first came into existence on April 1, 2010 as an April fools joke.
It seems this just can't get any more serious.
Django - The web framework for perfectionists with deadlines.
Django aims to follow Python’s "batteries included" philosophy. It ships with a variety of extra, optional tools that solve common web development problems.
FastAPI - a modern, fast (high-performance) web framework for building APIs with Python based on standard Python type hints.
The key features are:
- Fast: Very high performance, on par with NodeJS and Go (thanks to Starlette and Pydantic). One of the fastest Python frameworks available.
- Fast to code: Increase the speed to develop features by about 200% to 300%.
- Fewer bugs: Reduce about 40% of human (developer) induced errors.
- Intuitive: Great editor support. Completion everywhere. Less time debugging.
- Easy: Designed to be easy to use and learn. Less time reading docs.
- Short: Minimize code duplication. Multiple features from each parameter declaration. Fewer bugs.
- Robust: Get production-ready code. With automatic interactive documentation.
- Standards-based: Based on (and fully compatible with) the open standards for APIs: OpenAPI (previously known as Swagger) and JSON Schema.
The MIT License (MIT)