Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Python, Requests, & The Standard Library

Python, Requests, & The Standard Library

Kenneth Reitz

April 08, 2015
Tweet

More Decks by Kenneth Reitz

Other Decks in Programming

Transcript

  1. Statement of Intent • Establish the Requests Project’s current stance

    on Standard Library Inclusion. • Use this forum up to a larger discussion on the purpose of the Standard Library.
  2. Requests Features • Security is top-priority, as well as design.

    • Interfaces optimized for automatic best- practices of SSL, Connection Pooling, Encoding, Headers, etc. • Removes a significant amount of complexity around interacting with web services.
  3. Requests Facts • Requests has been downloaded ~42M times from

    The Cheeseshop. • The most downloaded Python package ever. • Standard Library inclusion is suggested often.
  4. Requests Development • 1 BDFL, 2 Core Contributors. • Has

    been under feature-freeze for two years. • Changes are still often made to the codebase, for various reasons.
  5. Dependencies • Chardet — Python 2/3 compatible character encoding detector.

    • Urllib3 — Python HTTP library with thread-safe connection pooling, file post support, sanity friendly, and more. (urllib3 receives continual improvements)
  6. Arguments For Inclusion • Social responsibility — is it the

    “right thing” to do? This is the biggest driving force. • Sustainability — having the project included in Python’s codebase may make it easier to request funding for core contributors. • Chardet would make an excellent candidate for standard library inclusion.
  7. Notable Observations • Carefully curated and often updated CA Bundle

    — for TLS verification. • HTTP specs and usage change significantly over time — we keep up with the changes. • Security releases — 12 hour turnaround time.
  8. Against Inclusion • Requests’s biggest pitch is that it’s better

    than the standard library. If the standard library isn’t good enough, we can replace it. • We would lose this ability, as well as our ability to make a quick release in the event of a security incident or spec change.
  9. General Questions • What is the Standard Library’s goals today?

    • With the existence of —ensure–pip, is inclusion in the standard library necessary? • —ensure–requests?