root . talks . python-for-humans

Python for Humans

Introduction

  • Author: Kenneth Reitz
  • Focus: Simplifying Python for everyday developers.
  • Motivation: Provide practical tools and packages to make Python more human-friendly.

Key Projects

  • Requests: HTTP for Humans.
  • Httpbin.org: An HTTP request & response service.
  • Other Projects:
    • Legit: Git workflow for Humans.
    • Envoy: Subprocess for Humans.
    • Tablib: Tabular data for Humans.
    • Clint: CLI app toolkit.
    • Autoenv: Magic shell environments.

Philosophy

  • Python Zen: Emphasizes simplicity and clarity.
  • Key Tenets:
    • Beautiful is better than ugly.
    • Simple is better than complex.
    • There should be one—and preferably only one—obvious way to do it.

The Problem with Existing Tools

  • Complexity: Traditional Python libraries like urllib2 are overly complex.
  • Accessibility: Difficult APIs deter new users and frustrate experienced ones.

The Solution: Requests

  • Design Principles:
    • Consistent and simple API.
    • Methods like GET, POST, PUT, DELETE with intuitive parameters.
  • Success: Widely adopted due to its simplicity and effectiveness.

The Importance of API Design

  • User-Centric: APIs should cater to the 90% use case.
  • Documentation: A well-written README is crucial for adoption.
  • Evolution: Features can grow, but the API should remain simple.

Barriers to Python Adoption

  • Installation: Confusion around Python versions and installation methods.
  • Standard Library Issues: Complex modules for simple tasks.
  • Dependency Management: Complicated packaging and installation processes.

The Hitchhiker’s Guide to Python

  • Purpose: Document best practices and simplify Python adoption.
  • Content:
    • Installation guides for different OS.
    • Best practices for Python development.
    • A guidebook for both newcomers and experienced developers.

Manifesto

  • Goals:
    • Simplify terrible APIs.
    • Document and share best practices with the community.

Conclusion

  • Call to Action: Developers should prioritize creating simple, accessible APIs and contribute to open-source projects.
  • Contact: GitHub - Kenneth Reitz