Skip to content

Commit dcd71a4

Browse files
author
quantmind
committed
merged with master and made python 3.3 compatible
2 parents 47e4a08 + cbed7a1 commit dcd71a4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

105 files changed

+4240
-1951
lines changed

CHANGELOG.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
.. _vers07:
22

3+
Ver. 0.7.0 - 2012 Oct 25
4+
===============================
5+
* First official release of version 0.7.0. Requires redis_ 2.6 or above.
6+
* Several fixes in documentation.
7+
* Implemented :ref:`field lookups <field-lookups>` ``gt``, ``gt``, ``lt`` and ``le``.
8+
* Added a *prefixed* redis client in :class:`stdnet.lib.redis.PrefixedRedis`.
9+
* **624 regression tests** with **92%** coverage.
10+
311
Ver. 0.7c6 - 2012 Sep 10
412
===============================
513
* **Tested with redis 2.6.0-rc6**.

README.rst

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ The `source code`__ and documentation__ are hosted at github while Downloads__ a
77
:Documentation: http://lsbardel.github.com/python-stdnet/
88
:Dowloads: http://pypi.python.org/pypi/python-stdnet/
99
:Source: https://github.com/lsbardel/python-stdnet
10-
:Issues: https://github.com/lsbardel/python-stdnet/issues
1110
:Mailing List: https://groups.google.com/group/python-stdnet
1211
:Keywords: server, database, cache, redis, odm
1312

@@ -24,11 +23,21 @@ Contents
2423
:local:
2524

2625

26+
Features
27+
=================
28+
* Models with scalar and multi-value fields.
29+
* Reach query API including unions, intersections, exclusions, ranges and more.
30+
* Full text search.
31+
* Multi-variate numeric timeseries application.
32+
* Publish/Subscribe application.
33+
2734
Requirements
2835
=================
2936
* Python 2.6 to Python 3.3. Single codebase.
37+
* You need access to a Redis_ server version 2.6 or above.
3038
* Optional Cython_ for faster redis protocol parser.
31-
* You need access to a Redis_ server.
39+
* Optional pulsar_ only when using the asynchronous redis connection or the
40+
test suite.
3241

3342

3443
Philosophy
@@ -61,13 +70,6 @@ or ``pip``::
6170

6271
pip install python-stdnet
6372
64-
65-
Documentation
66-
============================
67-
StdNet uses Sphinx_ for its documentation, and the latest is available at GitHub:
68-
69-
* http://lsbardel.github.com/python-stdnet/
70-
7173

7274
Version Check
7375
======================
@@ -167,7 +169,8 @@ Requirements for running tests:
167169

168170
* unittest2_ for python 2.6 only.
169171
* argparse_ for python 2.6, 3 and 3.1 only.
170-
* nose_
172+
* mock_ for python 2.6 to python 3.2 only.
173+
* nose_ or pulsar_.
171174

172175
Note, these requirements are only needed if you are planning to run tests.
173176
To run tests open a shell and launch Redis. On another shell,
@@ -241,4 +244,6 @@ file in the top distribution directory for the full license text.
241244
.. _argparse: http://pypi.python.org/pypi/argparse
242245
.. _unittest2: http://pypi.python.org/pypi/unittest2
243246
.. _nose: http://readthedocs.org/docs/nose/en/latest
244-
.. _DynamoDB: http://aws.amazon.com/dynamodb/
247+
.. _DynamoDB: http://aws.amazon.com/dynamodb/
248+
.. _pulsar: http://pypi.python.org/pypi/pulsar
249+
.. _mock: http://pypi.python.org/pypi/mock
File renamed without changes.

docs/source/model/fields.rst renamed to docs/source/api/fields.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,14 @@ HashField
234234
.. autoclass:: HashField
235235
:members:
236236
:member-order: bysource
237+
238+
239+
TimeSeriesField
240+
~~~~~~~~~~~~~~~~~~~~~~~
241+
242+
.. autoclass:: TimeSeriesField
243+
:members:
244+
:member-order: bysource
237245

238246

239247
.. _model-field-descriptors:

docs/source/api/index.rst

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
.. _model-index:
2+
3+
.. module:: stdnet.odm
4+
5+
============================
6+
API
7+
============================
8+
9+
Stdnet is an object data mapper for non-relational databases or nosql_ as
10+
they are known. It is also a lightweight module, which deal only with data mapping,
11+
advanced queries and nothing else.
12+
13+
14+
**Contents**
15+
16+
.. toctree::
17+
:maxdepth: 2
18+
19+
models
20+
fields
21+
backends
22+
utility
23+
24+
25+
.. _nosql: http://nosql-database.org/

docs/source/model/models.rst renamed to docs/source/api/models.rst

Lines changed: 65 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@
66
Model and Query API
77
============================
88

9+
The *object-data mapper* (ODM) is the core of the library. It defines an API for mapping
10+
data in the backend key-value store to objects in Python.
11+
It'is name is closely related to
12+
`object relational Mapping <http://en.wikipedia.org/wiki/Object-relational_mapping>`_ (ORM),
13+
a programming technique for converting data between incompatible
14+
type systems in traditional `relational databases <http://en.wikipedia.org/wiki/Relational_database>`_
15+
and object-oriented programming languages.
16+
917

1018
Model
1119
==================
@@ -81,6 +89,14 @@ QueryElement
8189
:member-order: bysource
8290

8391

92+
SearchEngine Interface
93+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
94+
95+
.. autoclass:: SearchEngine
96+
:members:
97+
:member-order: bysource
98+
99+
84100
.. _model-structures:
85101

86102
Data Structures
@@ -212,6 +228,52 @@ TS
212228
:member-order: bysource
213229

214230

231+
Session and Managers
232+
=========================
233+
234+
Session
235+
~~~~~~~~~~~~~~~
236+
237+
.. autoclass:: Session
238+
:members:
239+
:member-order: bysource
240+
241+
Session Model
242+
~~~~~~~~~~~~~~~
243+
244+
.. autoclass:: SessionModel
245+
:members:
246+
:member-order: bysource
247+
248+
Transaction
249+
~~~~~~~~~~~~~~~
250+
251+
.. autoclass:: Transaction
252+
:members:
253+
:member-order: bysource
254+
255+
Manager
256+
~~~~~~~~~~~~~~~~~~
257+
.. autoclass:: Manager
258+
:members:
259+
:member-order: bysource
260+
261+
262+
RelatedManager
263+
~~~~~~~~~~~~~~~~~~
264+
265+
.. autoclass:: stdnet.odm.related.RelatedManager
266+
:members:
267+
:member-order: bysource
268+
269+
One2ManyRelatedManager
270+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
271+
272+
.. autoclass:: stdnet.odm.related.One2ManyRelatedManager
273+
:members:
274+
:member-order: bysource
275+
276+
215277
.. _register-model:
216278

217279

@@ -255,28 +317,7 @@ Unregister model
255317

256318
.. autofunction:: unregister
257319

258-
.. _signal-api:
259-
260-
Signals
261-
=====================
262-
Stdnet includes a signal dispatcher which helps allow decoupled
263-
applications get notified when actions occur elsewhere in the framework.
264-
In a nutshell, signals allow certain senders to notify a set of receivers
265-
that some action has taken place.
266-
They are especially useful when many pieces of code may be interested in
267-
the same events.
268-
269-
The data mapper provide with the following built-in signals in the :mod:`stdnet.odm`
270-
module:
271-
272-
* ``pre_commit`` triggered before new instances or changes on existing instances
273-
are committed to the backend server.
274-
* ``post_commit`` triggered after new instances or changes on existing instances
275-
are committed to the backend server.
276-
277-
It is also possible to add callback to single instances in the following way::
278-
279-
instance = MyModel(...)
280-
instance.post_commit(callable)
281320

282-
.. _standard template library: http://www.sgi.com/tech/stl/
321+
.. _standard template library: http://www.sgi.com/tech/stl/
322+
.. _SQLAlchemy: http://www.sqlalchemy.org/
323+
.. _Django: http://docs.djangoproject.com/en/dev/ref/models/instances/

docs/source/backends/redis.rst renamed to docs/source/api/redis.rst

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,22 @@ Redis
137137
.. autoclass:: Redis
138138
:members:
139139
:member-order: bysource
140-
141140

141+
142+
RedisProxy
143+
~~~~~~~~~~~~~~~~
144+
.. autoclass:: RedisProxy
145+
:members:
146+
:member-order: bysource
147+
148+
149+
PrefixedRedis
150+
~~~~~~~~~~~~~~~~
151+
.. autoclass:: PrefixedRedis
152+
:members:
153+
:member-order: bysource
154+
155+
142156
Pipeline
143157
~~~~~~~~~~~~~~~
144158
.. autoclass:: Pipeline

docs/source/utility.rst renamed to docs/source/api/utility.rst

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,30 @@ Exceptions
177177
:member-order: bysource
178178

179179

180+
.. _signal-api:
181+
182+
Signals
183+
=====================
184+
Stdnet includes a signal dispatcher which helps allow decoupled
185+
applications get notified when actions occur elsewhere in the framework.
186+
In a nutshell, signals allow certain senders to notify a set of receivers
187+
that some action has taken place.
188+
They are especially useful when many pieces of code may be interested in
189+
the same events.
190+
191+
The data mapper provide with the following built-in signals in the :mod:`stdnet.odm`
192+
module:
193+
194+
* ``pre_commit`` triggered before new instances or changes on existing instances
195+
are committed to the backend server.
196+
* ``post_commit`` triggered after new instances or changes on existing instances
197+
are committed to the backend server.
198+
199+
It is also possible to add callback to single instances in the following way::
200+
201+
instance = MyModel(...)
202+
instance.post_commit(callable)
203+
180204
181205
Miscellaneous
182206
============================

docs/source/examples/index.rst

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@ advanced configuration parameters and functionalities can be investigated.
1414
The collection of tutorials examples is available in the
1515
:mod:`examples` module in the source distribution.
1616

17-
They illustrate the use of the different :ref:`scalar <model-field>`
18-
and :ref:`data structure <model-field-structure>` fields
19-
available in :mod:`stdnet`.
20-
2117
**Tutorials**
2218

2319
.. toctree::
@@ -27,5 +23,6 @@ available in :mod:`stdnet`.
2723
query
2824
sorting
2925
search
26+
sessions
3027
performance
3128
twitter

0 commit comments

Comments
 (0)