Mike Driscoll Profile picture
Mar 15 4 tweets 2 min read
I have had several people ask about async and #Python

I don't write on this topic much as I always seem to find bad examples.

So let's talk about some good articles you can read instead!
@realpython has more than one article. Here's a good one to start with:

realpython.com/async-io-pytho…
Here's another good article from @realpython

realpython.com/python-async-f…
The #Python documentation has been improved greatly when it comes to async.

Check it out here:

docs.python.org/3/library/asyn…

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Mike Driscoll

Mike Driscoll Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @driscollis

Mar 15
I was recently asked what a #Python developer's salary was.

Let's see if we can find out in this mini-thread!

🧵🐍
If I Google for "python job salary", I get a range of $45k - 110k per year

This seems about right to me.

The salary range is based primarily on the following two factors:

🐍 Experience
🐍 Location Image
A lot of Python jobs may not be listed as "Python jobs" though.

For example, if I Google for "Django jobs salary", then the range changes to $101k - 150k

Django is a Python web framework Image
Read 5 tweets
Mar 15
Want to be a #Python programmer but don't know where to look?

Check out this thread for some ideas!

🧵🐍
The official #Python website has a job board that is a good place to start:

python.org/jobs/
You should also check out Python Jobs HQ, which is a part of @pycoders

pythonjobshq.com
Read 6 tweets
Mar 14
Did you know that there is a special "py" launcher for #Python on Windows?

I think that is the perfect thing to talk about on Pi Day!

🐍🥧#piday2022
The "py" launcher for Windows was added way back in #Python 3.3 and was proposed in PEP 397 🐍🔥

Here are the details:

python.org/dev/peps/pep-0…
To use the "py" launcher on Windows, just enter the following in the command prompt:

py

That should launch the latest Python version available on your machine.

If you have multiple versions, you can pick them like this:

py -2.7

docs.python.org/3/using/window…
Read 7 tweets
Feb 18
Today we are going to talk a little about creating command-line applications using #Python and its built-in `argparse` package!

🧵🐍👇
In this example of using `argparse`, you don't even create any custom arguments! You just create an ArgumentParser argument and call `print_help()`!

You can see in this example that `argparse` already provides useful information to your users without adding any arguments!
Normally when you create an `ArgumentParser` object, you would do so in a function and return the object.

Let's rewrite the previous example to follow that coding pattern:
Read 11 tweets
Feb 17
Even if you are a beginner, you have probably used #Python's built-in `print()` function.

But let's take a few minutes to talk about the humble `print()` function and see what you might have missed!

#python_builtins_by_driscollis

🧵🐍👇
The `print()` function takes the following arguments:

🐍 *objects - Stuff to print
🐍 sep=' ' - A string to separate object
🐍 end='\n' - A string to end on
🐍 file=sys.stdout - Where to write the data
🐍 flush=False - Whether or not to force flush the stream
Let's look at some examples of using Python's `print()` function:
Read 5 tweets
Feb 17
#Python has an awesome library called `collections`! One of my favorite tools from that library is the `Counter` class.

Here I use `Counter` to find the most common occurrences of a value in a list:
Let's use `collections.Counter()` to count letters in a string!

Note that the object that is returned by the Counter class can be accessed like a dictionary!
Python's `collections.Counter()` class has special methods that you can use to `subtract()` items from the counter object.

Here's an example:
Read 4 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us on Twitter!

:(