Skip to content
This repository was archived by the owner on Jan 13, 2021. It is now read-only.

Commit e77ce89

Browse files
committed
Fewer references to abstraction.
1 parent 3623f9d commit e77ce89

File tree

1 file changed

+29
-19
lines changed

1 file changed

+29
-19
lines changed

README.rst

Lines changed: 29 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,47 @@
1-
==================================
2-
Hyper: HTTP Abstraction for Python
3-
==================================
1+
==========================
2+
Hyper: HTTP/2.0 for Python
3+
==========================
44

55
HTTP is changing under our feet. HTTP/1.1, our old friend, is being
66
supplemented by the brand new HTTP/2.0 standard. HTTP/2.0 provides many
77
benefits: improved speed, lower bandwidth usage, better connection management,
88
and more.
99

10-
Unfortunately, most web servers do not support HTTP/2.0 at this time. What's
11-
needed is to abstract the difference between HTTP/1.1 and HTTP/2.0, so that
12-
your application can reap the benefits of HTTP/2.0 when possible whilst
13-
maintaining maximum compatibility.
10+
``hyper`` provides these benefits to your Python code. How? Like this::
1411

15-
Enter ``hyper``::
12+
from hyper import HTTP20Connection
1613

17-
from hyper import HTTPConnection
14+
conn = HTTP20Connection('twitter.com:443')
15+
conn.request('GET', '/')
16+
resp = conn.getresponse()
1817

19-
conn = HTTPConnection("www.python.org")
20-
conn.request("GET", "/index.html")
18+
print(resp.read())
2119

22-
r1 = conn.getresponse()
20+
Simple.
2321

24-
Did that code use HTTP/1.1, or HTTP/2.0? You don't have to worry. Whatever
25-
``www.python.org`` supports, ``hyper`` will use.
22+
Caveat Emptor!
23+
==============
24+
25+
Please be warned: ``hyper`` is in a very early alpha. You _will_ encounter bugs
26+
when using it. In addition, there are very many rough edges. With that said,
27+
please try it out in your applications: I need your feedback to fix the bugs
28+
and file down the rough edges.
29+
30+
Versions
31+
========
32+
33+
``hyper`` provides support for draft 9 of the HTTP/2.0 draft specification and
34+
draft 5 of the HPACK draft specification. As further drafts are released,
35+
``hyper`` will be updated to support them.
2636

2737
Compatibility
2838
=============
2939

30-
``hyper`` is intended to be a drop-in replacement for
31-
``httplib``/``http.client``, with an identical API. You can get all of the
32-
HTTP/2.0 goodness by simply replacing your ``import httplib`` or
33-
``import http.client`` line with ``import hyper as httplib`` or ``import hyper
34-
as http.client``. You should then be good to go.
40+
``hyper`` is intended to be a drop-in replacement for ``http.client``, with a
41+
similar API. However, ``hyper`` intentionally does not name its classes the
42+
same way ``http.client`` does. This is because most servers do not support
43+
HTTP/2.0 at this time: I don't want you accidentally using ``hyper`` when you
44+
wanted ``http.client``.
3545

3646
Contributing
3747
============

0 commit comments

Comments
 (0)