Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 44 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,38 @@

---

*The following is a design proposal and is not yet fully functional. The work is well underway, tho be aware that some parts of the codebase are still under development.*

# Background

One of the core design principles informing `httpx` has been to aim to reduce the complexity of the stack.
We've been trying to handle that incrementally, working from a requests-compatible API gradually introducing
deprecations. This process creates a huge drag on being able to move the codebase towards where
we'd actually like it to be, and introduces significant churn for our users.

This work presents a radically simplified implementation of `httpx`.
We've been trying to handle that incrementally, working from a requests-compatible API gradually introducing deprecations. This process creates a huge drag on being able to move the codebase towards where we'd actually like it to be, and introduces significant churn for our users.

This work presents a significantly simplified implementation of `httpx`.

* Seriously, a [radically simplified implementation](https://github.com/encode/httpx-insiders/blob/main/src/httpx/_client.py). While still fulfiling the same set of functionality.<sup>*</sup>
* A consistent & tightly typed set of HTTP components, with immutability throughout. Includes URLs, Query Parameters, Headers, Form & File interfaces, all of which are suitable for either client side or server side codebases.
* A re-engineered [connection pool implementation](https://github.com/encode/httpx-insiders/blob/84e98c3236bbfca4fa1711b0023564afe7bb60b6/src/httpx/_pool.py#L24-L31), with tighter more [obvious concurrency handling](https://github.com/encode/httpx-insiders/blob/84e98c3236bbfca4fa1711b0023564afe7bb60b6/src/httpx/_pool.py#L113-L121).
* The core networking component is simple enough to be directly included. The only dependencies here are `h11` and `truststore`.
* A re-engineered [connection pool implementation](https://github.com/encode/httpx-insiders/blob/main/src/httpx/_pool.py), with tighter more obvious concurrency handling.
* The core networking component is simple enough to be directly included. The only hard dependencies here are `h11` and `truststore`.
* Seperately namespaced packages for `ahttpx` and `httpx`.

<sup>* There's more to be done in places, but fundamentally it's a much tighter sharper codebase.</sup>
There is also preliminary work ongoing for httpx *for both client-side and server-side usage*.

---

# Overview

Installation...
Installation from the insiders repo...

```shell
pip install git+https://github.com/encode/httpx-insiders.git
$ pip install git+https://github.com/encode/httpx-insiders.git
```

Or the public installation...

```shell
$ pip install https://staging.d2pg1230p7w6nv.amplifyapp.com/httpx-design-proposal.tar.gz
```

Lets get to work...
Expand All @@ -49,39 +56,51 @@ Lets get to work...
'<!doctype html>\n<html>\n<head>\n<title>Example Domain</title>...'
```

---

# Documentation

The httpx 1.0 [design proposal](https://staging.d2pg1230p7w6nv.amplifyapp.com/) is now available.

* [Quickstart](docs/00-quickstart.md)
* [Clients](docs/01-clients.md)
* [HTTP Components](docs/02-components.md)
* [HTTP Content](docs/03-content.md)
* [Connections](docs/04-connections.md)
* [Low Level Networking](docs/05-networking.md)

*Documentation & design work on `httpx` for server-side usage is in progress.*

---

# Packaging comparison
# Dependencies

Package and dependencies...

* httpx-1.0-py3-none-any.whl (23 kB)
* h11-0.14.0-py3-none-any.whl (58 kB)
* truststore-0.10.0-py3-none-any.whl (18 kB)
* httpx
* h11
* truststore

---

# Collaboration

The design repository for this work is currently private. We are looking towards a development model that encourages a calm focused working environment, and are currently taking a little time to work through expectations & boundaries for contributions to the codebase.

---

# Bringing this to life

In order to adequately address this space we need support & funding.

Previously...
Ideally we'd be in a position financially where we're able to reasonably staff a minimal team of designers & developers. We will not be offering equity or sponsorship placements, but are instead seeking forward-looking businesses that recognise the value of the infrastructure investment on it's own merit.

* httpx-0.28.1-py3-none-any.whl (73 kB)
* httpcore-1.0.7-py3-none-any.whl (78 kB)
* h11-0.14.0-py3-none-any.whl (58 kB)
* certifi-2024.8.30-py3-none-any.whl (167 kB)
* anyio-4.7.0-py3-none-any.whl (93 kB)
* sniffio-1.3.1-py3-none-any.whl (10 kB)
* idna-3.10-py3-none-any.whl (70 kB)
Our credentials to date include authorship of signifcant parts of the Python development ecosystem...

Clearly the packaging size will increase as we fill in the gaps of functionality, tho it's a good indicator.
* Django REST framework.
* MkDocs.
* Uvicorn.
* Starlette.
* HTTPX.

---

<p align="center"><i>HTTPX is <a href="https://github.com/encode/httpx/blob/master/LICENSE.md">BSD licensed</a> code.<br/>Designed & crafted with care.</i><br/>&mdash; 🦋 &mdash;</p>
<p align="center"><i>HTTPX is <a href="https://github.com/encode/httpx/blob/master/LICENSE.md">BSD licensed</a> code.<br/>Designed & crafted with care.</i><br/>&mdash; 🦋 &mdash;</p>