2
2
lazy-object-proxy
3
3
===============================
4
4
5
- | |docs| |travis| |appveyor| |coveralls| |landscape| |scrutinizer|
6
- | |version| |downloads| |wheel| |supported-versions| |supported-implementations|
5
+ .. list-table ::
6
+ :stub-columns: 1
7
+
8
+ * - docs
9
+ - |docs |
10
+ * - tests
11
+ - | |travis | |appveyor |
12
+ | |coveralls| |codecov| |landscape| |scrutinizer|
13
+ * - package
14
+ - |version | |downloads |
15
+
16
+ ..
17
+ |wheel| |supported-versions| |supported-implementations|
7
18
8
19
.. |docs | image :: https://readthedocs.org/projects/python-lazy-object-proxy/badge/?style=flat
9
20
:target: https://readthedocs.org/projects/python-lazy-object-proxy
10
21
:alt: Documentation Status
11
22
12
- .. |travis | image :: http://img.shields.io/travis/ionelmc/python-lazy-object-proxy/master.png ?style=flat
23
+ .. |travis | image :: http://img.shields.io/travis/ionelmc/python-lazy-object-proxy/master.svg ?style=flat&label=Travis
13
24
:alt: Travis-CI Build Status
14
25
:target: https://travis-ci.org/ionelmc/python-lazy-object-proxy
15
26
16
- .. |appveyor | image :: https://ci.appveyor.com/api/projects/status/github/ ionelmc/python-lazy-object-proxy?branch=master
27
+ .. |appveyor | image :: https://img.shields.io/appveyor/ci/ ionelmc/python-lazy-object-proxy/master.svg?style=flat&label=AppVeyor
17
28
:alt: AppVeyor Build Status
18
29
:target: https://ci.appveyor.com/project/ionelmc/python-lazy-object-proxy
19
30
20
- .. |coveralls | image :: http://img.shields.io/coveralls/ionelmc/python-lazy-object-proxy/master.png ?style=flat
31
+ .. |coveralls | image :: http://img.shields.io/coveralls/ionelmc/python-lazy-object-proxy/master.svg ?style=flat&label=Coveralls
21
32
:alt: Coverage Status
22
33
:target: https://coveralls.io/r/ionelmc/python-lazy-object-proxy
23
34
35
+ .. |codecov | image :: http://img.shields.io/codecov/c/github/ionelmc/python-lazy-object-proxy/master.svg?style=flat&label=Codecov
36
+ :alt: Coverage Status
37
+ :target: https://codecov.io/github/ionelmc/python-lazy-object-proxy
38
+
24
39
.. |landscape | image :: https://landscape.io/github/ionelmc/python-lazy-object-proxy/master/landscape.svg?style=flat
25
40
:target: https://landscape.io/github/ionelmc/python-lazy-object-proxy/master
26
41
:alt: Code Quality Status
27
42
28
- .. |version | image :: http://img.shields.io/pypi/v/lazy-object-proxy.png ?style=flat
43
+ .. |version | image :: http://img.shields.io/pypi/v/lazy-object-proxy.svg ?style=flat
29
44
:alt: PyPI Package latest release
30
45
:target: https://pypi.python.org/pypi/lazy-object-proxy
31
46
32
- .. |downloads | image :: http://img.shields.io/pypi/dm/lazy-object-proxy.png ?style=flat
47
+ .. |downloads | image :: http://img.shields.io/pypi/dm/lazy-object-proxy.svg ?style=flat
33
48
:alt: PyPI Package monthly downloads
34
49
:target: https://pypi.python.org/pypi/lazy-object-proxy
35
50
36
- .. |wheel | image :: https://pypip.in/wheel/lazy-object-proxy/badge.png ?style=flat
51
+ .. |wheel | image :: https://pypip.in/wheel/lazy-object-proxy/badge.svg ?style=flat
37
52
:alt: PyPI Wheel
38
53
:target: https://pypi.python.org/pypi/lazy-object-proxy
39
54
40
- .. |supported-versions | image :: https://pypip.in/py_versions/lazy-object-proxy/badge.png ?style=flat
55
+ .. |supported-versions | image :: https://pypip.in/py_versions/lazy-object-proxy/badge.svg ?style=flat
41
56
:alt: Supported versions
42
57
:target: https://pypi.python.org/pypi/lazy-object-proxy
43
58
44
- .. |supported-implementations | image :: https://pypip.in/implementation/lazy-object-proxy/badge.png ?style=flat
59
+ .. |supported-implementations | image :: https://pypip.in/implementation/lazy-object-proxy/badge.svg ?style=flat
45
60
:alt: Supported imlementations
46
61
:target: https://pypi.python.org/pypi/lazy-object-proxy
47
62
48
- .. |scrutinizer | image :: https://img.shields.io/scrutinizer/g/ionelmc/python-lazy-object-proxy/master.png ?style=flat
49
- :alt: Scrtinizer Status
63
+ .. |scrutinizer | image :: https://img.shields.io/scrutinizer/g/ionelmc/python-lazy-object-proxy/master.svg ?style=flat
64
+ :alt: Scrutinizer Status
50
65
:target: https://scrutinizer-ci.com/g/ionelmc/python-lazy-object-proxy/
51
66
52
67
A fast and thorough lazy object proxy.
@@ -71,55 +86,3 @@ Development
71
86
To run the all tests run::
72
87
73
88
tox
74
-
75
- Benchmarks
76
- ==========
77
-
78
- The tested implementations:
79
-
80
- * ``lazy_object_proxy.slots.Proxy ``, available as ``lazy_object_proxy.Proxy `` if the C extension is not available.
81
- * ``lazy_object_proxy.cext.Proxy ``, available as ``lazy_object_proxy.Proxy ``.
82
- * `objproxies <https://pypi.python.org/pypi/objproxies >`_ - fork of PJE's `ProxyTypes <https://pypi.python.org/pypi/ProxyTypes >`_ with Python 3 support. [1 ]_
83
- * `SimpleLazyObject <https://github.com/django/django/blob/stable/1.7.x/django/utils/functional.py#L337 >`_ from Django. [1 ]_
84
- * ``lazy_object_proxy.simple.Proxy `` - uses the non-data descriptor `trick <http://blog.ionelmc.ro/2014/11/04/an-interesting-python-descriptor-quirk/ >`_. [1 ]_
85
-
86
- For Python 2.7::
87
-
88
- ------ benchmark: min 5 rounds (of min 25.00us), 5.00s max time, timer: time.clock -----
89
- Name (time in ns) Min Max Mean StdDev Rounds Iterations
90
- ----------------------------------------------------------------------------------------
91
- test_perf[slots] 705.3837 3091.0072 720.4805 27.2588 180453 38
92
- test_perf[cext] 93.6346 278.9731 95.1876 2.5474 164373 312
93
- test_perf[simple] 398.1636 1863.2017 405.4325 13.1411 207521 59
94
- test_perf[django] 471.6515 983.0809 480.4264 10.2059 193043 53
95
- test_perf[objproxies] 1204.7003 4818.8010 1475.3419 114.8213 55898 1
96
- ----------------------------------------------------------------------------------------
97
-
98
- For Python 3.4::
99
-
100
- -- benchmark: min 5 rounds (of min 25.00us), 5.00s max time, timer: time.perf_counter --
101
- Name (time in ns) Min Max Mean StdDev Rounds Iterations
102
- ----------------------------------------------------------------------------------------
103
- test_perf[slots] 803.1335 2728.8286 826.0882 20.5562 182436 33
104
- test_perf[cext] 103.2911 254.4223 104.6869 2.6294 164373 277
105
- test_perf[simple] 448.6894 2040.6147 462.0342 17.1546 218443 49
106
- test_perf[django] 518.3013 1225.7125 532.0523 14.4672 218443 43
107
- test_perf[objproxies] 1116.8575 3827.4331 1157.8419 43.9602 174755 24
108
- ----------------------------------------------------------------------------------------
109
-
110
- For PyPy 2.4:
111
-
112
- Note that the mean difference between ``simple ``, ``django `` and ``objproxies `` is smaller the standard deviance, thus it cannot be considered.
113
-
114
- ::
115
-
116
- ------ benchmark: min 5 rounds (of min 25.00us), 15.00s max time, timer: time.clock ----
117
- Name (time in ns) Min Max Mean StdDev Rounds Iterations
118
- ----------------------------------------------------------------------------------------
119
- test_perf[slots] 1.9577 260.2979 2.2457 0.4882 498050 15384
120
- test_perf[simple] 31.3536 4374.4246 34.7433 11.7566 478894 999
121
- test_perf[django] 32.5269 4443.8381 35.8729 16.9071 461157 1000
122
- test_perf[objproxies] 33.1293 4529.3718 36.7435 13.3377 452773 1000
123
- ----------------------------------------------------------------------------------------
124
-
125
- .. [1 ] Lacks support for certain more tricky operations like ``vars(obj) `` and other operators.
0 commit comments