Three Kinds of Python Practice Projects

It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters

One of my readers asked: "Any Python practice projects we can work on for learning you can suggest?"

You bet.

1) A Django Webapp

This is especially for those of you who haven't done web development.

(Data scientists: I'm looking at you.)

Being able to create a web application is a valuable skill for any developer. The reason is that it allows you to take any other kind of programming you do, and package it in a way that's accessible to the masses.

If you haven't done web dev before, this needs to be your #1 priority, compared to others on the list. (If you *have* done web dev, skip to the next item... get out of your comfort zone.)

What framework do you use? Google will point out a dozen great choices for you. It doesn't matter too much which you use. You can pick the one you like.

Read More: https://complextime.com/

 

But if you want a recommendation, I'll give you one:

Use Django.

It's a great full-stack framework, and well documented.. If you find yourself spending more than a few minutes choosing a framework, just use Django and get coding.

So that's one project idea. Next one:

2) A Command Line Tool

If you haven't learned to create command-line programs... you're missing out.

When you take your program, and package it in a scriptable command-line interface...

With configuration controllable by options and flags...

And inputs and outputs for the program controlled by command-line args...

This ALWAYS increases the value of your program. Always. 100% of the time.

So if you haven't ever done it before... you need to learn.

Basically, this means learning the "argparse" module. It's built into Python's standard library.

There are other libraries for building command line interfaces out there, which are not in Python's standard library. They have their fanatical fanz who are already writing angry emails to me, full of misspalled words, for having the gall to recommend argparse instead of their favorite libwhateverz.

Ignore them. Argparse is full featured, and hard to improve on. And it's a battery included with Python.

So next time you write a Python program, generalize it. Use argparse to make it more automatable, flexible, scriptable, and overall better.

So that's the second project suggestion.


ema james

10 Blog Mesajları

Yorumlar