git404hub

what is python-cookbook fr?

stas00/python-cookbook — explained in plain English

Analysis updated 2026-05-18

56PythonAudience · developerComplexity · 1/5LicenseSetup · easy

tl;dr

A free online book of practical, example driven Python recipes covering everyday standard library patterns, from text handling to packaging.

vibe map

mindmap
  root((repo))
    What it does
      Explain Python idioms
      Show runnable examples
      Cover common gotchas
    Tech stack
      Python
      Markdown
      SKILL.md
    Use cases
      Learn standard library patterns
      Debug and profile Python code
      Teach AI agents Python idioms
    Audience
      Developers
      Beginners
    Format
      Website
      PDF
      EPUB

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

what do people make with this?

VIBE 1

Look up a practical Python recipe for text handling, files, or subprocesses instead of searching the web.

VIBE 2

Learn debugging, profiling, and testing techniques with runnable example code.

VIBE 3

Read or download the book as a PDF or EPUB for offline reference.

VIBE 4

Feed the included SKILL.md file to an AI coding agent to teach it everyday Python idioms.

what's the stack?

PythonMarkdown

how it stacks up fr

stas00/python-cookbookeadmin2/jarvis_aigreatvishal27-rc/ai-resume_analyzer
Stars565656
LanguagePythonPythonPython
Setup difficultyeasyhardmoderate
Complexity1/54/52/5
Audiencedeveloperdevelopervibe coder

Figures from each repo's GitHub metadata at analysis time.

how do i run it?

Difficulty · easy time til it works · 5min
Free to read, share, and adapt, even commercially, as long as you credit the author and share your own version under the same license.

in plain english

Stas' Python Cookbook is a free online book of practical Python recipes covering the standard library and the patterns that come up again and again in everyday coding work, such as handling text, working with lists and dictionaries, reading and writing files, running subprocesses, debugging, profiling, testing, and packaging. It targets Python 3.8 and newer, and calls out version differences where they matter. The book grew out of the author's personal cheat sheet, which they have kept and used daily for years. They used Claude to turn that dense, terse cheat sheet into fuller, more readable prose for this book, while the original raw cheat sheet is still available in the repository for anyone who prefers it. Each section explains why a technique matters before showing runnable example code, and points out common mistakes people run into when using it in practice. The content is organized into four parts. Part one covers core language features like strings, numbers, regular expressions, data structures, comprehensions, functions, classes, and dates. Part two covers the runtime environment, including modules and imports, files and paths, environment variables and arguments, subprocesses, serialization, concurrency, and networking. Part three covers debugging, profiling, and testing. Part four covers packaging, dependency management, code quality tools, and a few notes on scaling, plus an appendix of short one line tricks. Besides reading it as a website, you can download PDF and EPUB versions. The author also maintains a separate file called SKILL.md meant to teach AI coding agents these same everyday Python idioms, alongside two companion books by the same author on machine learning engineering and debugging. The content is released under the Creative Commons Attribution ShareAlike 4.0 license, and the author welcomes bug reports, typo fixes, and improvement suggestions through issues or pull requests.

prompts (copy fr)

prompt 1
Find the recipe in this cookbook for working with dates and times and show me a runnable example.
prompt 2
Help me use the SKILL.md file from this repo to teach my AI coding assistant better Python idioms.
prompt 3
Show me the section on debugging and profiling and explain when to use each technique.
prompt 4
Point me to the packaging and dependency management part of this book for a new Python project.

Frequently asked questions

what is python-cookbook fr?

A free online book of practical, example driven Python recipes covering everyday standard library patterns, from text handling to packaging.

What language is python-cookbook written in?

Mainly Python. The stack also includes Python, Markdown.

What license does python-cookbook use?

Free to read, share, and adapt, even commercially, as long as you credit the author and share your own version under the same license.

How hard is python-cookbook to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is python-cookbook for?

Mainly developer.

peek the repo → explain another one

This repo across BitVibe Labs

double-check against the repo, no cap.