File tree Expand file tree Collapse file tree 1 file changed +37
-9
lines changed Expand file tree Collapse file tree 1 file changed +37
-9
lines changed Original file line number Diff line number Diff line change 2
2
:target: https://travis-ci.org/MagicStack/uvloop
3
3
4
4
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.
7
8
8
9
9
- Build Instructions
10
- ------------------
10
+ Installation
11
+ ------------
11
12
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.
15
41
16
42
1. `git clone --recursive https://github.com/1st1/uvloop.git `
17
43
18
- 2. `cd uvloop; make `
44
+ 2. `cd uvloop `
45
+
46
+ 3. `make `
19
47
20
- 3 . `make test `
48
+ 4 . `make test `
You can’t perform that action at this time.
0 commit comments