Sponsored by Datadog: pythonbytes.fm/datadog
Special guest: Kenneth Reitz
Brian #1: inline_python (for rust)
- “I just made a Frankenstein's monster: Python code embedded directly in rustlang code. Should I kill it before it escapes the lab?” - Mara Bos
- Writing some rust, and need a little Python?
- Maybe want to pop open a matplotlib window?
- This may be just the thing you need.
- see also:
Kenneth #2: Requests3: Under Way!
- Requests 2.x that you know and love is going into CVE-only mode (which it has been for a long time).
- Requests III is a new project which will bring async/await keywords to Requests.
- installable as
- Python 3.6+
Michael #3: 🔥 Pyflame: A Ptracing Profiler For Python
- Pyflame is a high performance profiling tool that generates flame graphs for Python.
- Pyflame is implemented in C++, and uses the Linux ptrace(2) system call to collect profiling information.
- It can take snapshots of the Python call stack without explicit instrumentation
- Capable of profiling embedded Python interpreters like uWSGI.
- Fully supports profiling multi-threaded Python programs.
- Why use it?
- Pyflame usually introduces significantly less overhead than the builtin
cProfile) modules, and emits richer profiling data.
- The profiling overhead is low enough that you can use it to profile live processes in production.
Brian #4: flit + src
- Currently a WIP PR.
flit is easy.
- Given a module or a source package.
flit init creates
- commit those to git
flit build creates a wheel
flit publish (builds and) publishes to whatever you have in your
- Changes in this PR
- The flit project already has 2 types of projects.
- just a module, like foo.py
- a package (directory with
- This would add a 3rd and 4th.
- just a module, but in src, like
- a package in src, like
- May be cracking open a can of worms, but I’m ok with that.
Kenneth #5: $ pipx install pipenv
Michael #6: cheat.sh
- via Jon Bultmeyer
- Nothing to install, but works on the CLI
- Has a CLI client too with a proper shell
- Get started with http cht.sh/python/:learn
- Has a funky stealth mode too
- Editor integration VS Code & Vim
- cheat.sh uses selected community driven cheat sheet repositories and information sources, maintained by thousands of users, developers and authors all over the world
- vi is good for beginners - fun read, for all you haters out there.
- But use vim, not vi.
- Better yet, IdeaVim for PyCharm or VSCodeVim for VS Code.
- nbstripout - command line tool to strip output from Jupyter Notebook files.
- We covered pyodide on episode 93, but here’s a cool article on it
- PyColorado CFP
- PyOhio CFP
Don’t know if I’ll do all of these, but I like them. 🙂 Brian and Kenneth, feel free to add yours if you have some!
MK: Ubuntu users are apt to get these jokes.
MK: How many programmers does it take to kill a cockroach? Two: one holds, the other installs Windows on it.
MK: A programmer had a problem. He thought to himself, 'I know, I'll solve it with threads!'. has Now problems. two he
(mildly offensive) KR: What’s the difference between a musician and a pizza? A pizza can feed a family of four.
(In collaboration with Jonatan Skogsfors)
Python used to be directed by the BDFL, Guido.
Now it’s directed by a steering council, GUIDs[0:4].