Software Development

10 Awesome Python Tutorials to Kick-Start your Projects

Python is a widely used high-level, general-purpose, interpreted, dynamic programming language. Its design philosophy emphasizes code readability, and its syntax allows programmers to express concepts in fewer lines of code than would be possible in languages such as C++ or Java. The language provides constructs intended to enable clear programs on both a small and large scale.

Python supports multiple programming paradigms, including object-oriented, imperative and functional programming or procedural styles. It features a dynamic type system and automatic memory management and has a large and comprehensive standard library. (Source)

Pythpn has seen great popularity in the programming world lately. For this reason, we have gathered 10 awesome Pythpn tutorials to ease you into the framework and help you boost your own Web Development projects! Let’s kick it!

python-programming-cookbook_small

Python Programming Cookbook
In this ebook, we provide a compilation of Python examples that will help you kick-start your own projects. We cover a wide range of topics, from multi-threaded programming to web development with Django. With our straightforward tutorials, you will be able to get your own projects up and running in minimum time. Download the cookbook by joining the Web Code Geeks Newsletter.

1. Python CSV Reader / Writer Example

Python has native support for CSV readers, and it’s configurable (which, as we’ve seen, is necessary). There is a module csv which holds everything you need to make a CSV reader/writer, and it follows RFC standards (unless your configuration overrides them), so by default it should read and write valid CSV files.

Read the rest of the article here.

2. Python Decorator Tutorial

Sometimes, we encounter problems that require us to extend the behavior of a function, but we don’t want to change its implementation. Some of those problems could be: logging spent time, caching, validating parameters, etc. All these solutions are often needed in more than one function: you often need to log the spent time of every http connection; you often need to cache more than one data base entity; you often need validation in more than one function. Today we will solve these 3 mentioned problems with Python decorators.

Read the rest of the article here.

3. Python Threading / Concurrency Example

Threads are processes which run in parallel to other threads. In a utopian scenario, if you split a big process in 2 threads, these threads will run in parallel so it would take half the time. This is not true in most cases. Using CPython, there is a mutex that prevents multiple native threads from executing Python byte codes at once. It’s called GIL (global interpreter lock).

Read the rest of the article here.

4. Python Logging Example

Logging is a process through which an application pushes strings to a handler. That string should be a line containing information about the piece of code from which it was sent and the context in that moment. It is a feature every application must have, and it’s as important as any other functionality you add to the application in question. It is the easiest way to know what your application is doing, how, how long does it take, etc.

Read the rest of the article here.

python-logo-master-v3-TM

5. Python Django Tutorial

Django is an open source web framework which solves most common problems of a web application development. It has some very useful features like an auto generated admin page and an ORM. It’s a high-level framework, so we just need to focus on the actual core logic of our business and let Django take care of mappings, filters and such. It works by defining some standards that, if you follow them, will make the application’s development so much easier and faster.

Read the rest of the article here.

6. Python Dictionary Example

Dictionaries in Python are data structures that optimize element lookups by associating keys to values. You could say that dictionaries are arrays of (key, value) pairs. Their syntax is pretty familiar to us, web developers, since its exactly the same as JSON’s. An object starts and ends in curly braces, each pair is separated by a comma, and the (key, value) pairs are associated through a colon (:).

Read the rest of the article here.

7. Python Sockets Example

In this tutorial, we’ll talk about INET, STREAM sockets. We’ll talk about what sockets are, and learn how to work with blocking and non-blocking sockets. First things first, we’ll make a distinction between a “client” socket (endpoint of a conversation), and a “server” socket (switchboard operator). Your client (e.g. your browser) uses only client sockets, and your server uses both client and server sockets.

Read the rest of the article here.

8. Python Map Example

In this tutorial, by using python 3.4, we’ll talk about map functions. Strictly speaking, a map function, is a function that accepts a function and an array as arguments, and applies the given function to each element of the array, returning another array with the result of each transformation.

Read the rest of the article here.

9. Python Subprocess Example

In this article, using Python 3.4, we’ll learn about Python’s subprocess module, which provides a high-level interface to interact with external commands. This module is intended to be a replacement to the old os.system and such modules. It provides all of the functionality of the other modules and functions it replaces.

Read the rest of the article here.

10. Python Send Email Example

In this example, by using Python 3.4, we’ll learn how to send mails using Python’s smtplib module. SMTP stands for Simple Mail Transfer Protocol. It’s a protocol which handles sending e-mails and routing them between mail servers. To send a mail, we need the host and port of a server, then we send to this server the message with a sender and a list of receivers.

Read the rest of the article here.

Make sure to retweet this, let your social followers know!

Ilias Tsagklis

Ilias is a software developer turned online entrepreneur. He is co-founder and Executive Editor at Java Code Geeks.
Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

2 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Stan
7 years ago

Nice list! It will be helpful to many devs for sure. Also, I’d like to suggest adding http://python.libhunt.com/ as it might be useful as well.

peacengell
peacengell
7 years ago

Hello,

Thanks for sharing these nice tutorials.

Back to top button