Skip to content

Commit 2ad9239

Browse files
committed
Update README
1 parent 8e93e3b commit 2ad9239

File tree

1 file changed

+37
-9
lines changed

1 file changed

+37
-9
lines changed

README.rst

Lines changed: 37 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,47 @@
22
:target: https://travis-ci.org/MagicStack/uvloop
33

44

5-
An implementation of asyncio-compatible event loop on top of libuv.
6-
This is a research prototype, do not use it in production.
5+
uvloop is a fast, drop-in replacement of the built-in asyncio
6+
event loop. uvloop is implemented in Cython and uses libuv
7+
under the hood.
78

89

9-
Build Instructions
10-
------------------
10+
Installation
11+
------------
1112

12-
You'll need `Cython` and Python 3.5. The best way is to create
13-
a virtual env, so that you'll have `cython` and `python` commands
14-
pointing to the correct tools.
13+
uvloop is available on PyPI, so you can simply use pip::
14+
15+
$ pip install uvloop
16+
17+
18+
Using uvloop
19+
------------
20+
21+
To make asyncio use uvloop, you can install the uvloop event
22+
loop policy::
23+
24+
import asyncio
25+
import uvloop
26+
asyncio.set_event_loop_policy(uvloop.EventLoopPolicy())
27+
28+
Or, alternatively, you can create an instance of the loop
29+
manually, using::
30+
31+
loop = uvloop.new_event_loop()
32+
asyncio.set_event_loop(loop)
33+
34+
35+
Development of uvloop
36+
---------------------
37+
38+
To build uvloop, you'll need `Cython` and Python 3.5. The best way
39+
is to create a virtual env, so that you'll have `cython` and `python`
40+
commands pointing to the correct tools.
1541

1642
1. `git clone --recursive https://github.com/1st1/uvloop.git`
1743

18-
2. `cd uvloop; make`
44+
2. `cd uvloop`
45+
46+
3. `make`
1947

20-
3. `make test`
48+
4. `make test`

0 commit comments

Comments
 (0)