Skip to content

Commit d09e3f3

Browse files
committed
Merge branch 'master' of github.com:yashh/pyres
2 parents 1e152be + a724e3b commit d09e3f3

File tree

6 files changed

+62
-1
lines changed

6 files changed

+62
-1
lines changed

docs/source/class.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.. module:: pyres
2+
3+
ResQ Classes
4+
==========================================
5+
6+
.. autoclass:: pyres.ResQ

docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# If extensions (or modules to document with autodoc) are in another directory,
1717
# add these directories to sys.path here. If the directory is relative to the
1818
# documentation root, use os.path.abspath to make it absolute, like shown here.
19-
#sys.path.append(os.path.abspath('.'))
19+
sys.path.append(os.path.abspath(os.path.dirname(__file__+'/../../../')))
2020

2121
# -- General configuration -----------------------------------------------------
2222

docs/source/index.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ Contents:
1212
:maxdepth: 2
1313

1414
intro
15+
install
16+
example
17+
class
18+
tests
1519

1620
Indices and tables
1721
==================

docs/source/install.rst

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
Installation
2+
===============
3+
4+
Requirements:
5+
--------------
6+
simplejson>=2.0.9
7+
itty>=0.6.2
8+
redis>=0.6.0
9+
pystache>=0.1.0
10+
11+
Make sure you install these requirements before proceeding.
12+
13+
.. todo:: Need to point to notes on redis installation and get python-redis.
14+
15+
16+
To install pyres.::
17+
18+
$ git clone git://github.com/binarydud/pyres.git
19+
$ cd pyres
20+
$ python setup.py build
21+
$ python setup.py install
22+
23+
Might need to run as sudo to install.
24+
25+
26+

docs/source/tests.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Tests
2+
=======
3+
4+
PyRes comes with a test suite which connects to a local redis server and
5+
creates a couple of *Queues* and *jobs*.
6+
7+
To run tests make sure you have nose_ installed.::
8+
9+
$ easy_install nose
10+
$ redis-server [PATH_TO_YOUR_REDIS_CONFIG]
11+
$ nosetests
12+
13+
Add **-v** flag if you want verbose output.
14+
15+
.. _nose: http://somethingaboutorange.com/mrl/projects/nose/0.11.1/

pyres/__init__.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,17 @@ def str_to_class(s):
4141
return None
4242

4343
class ResQ(object):
44+
"""ResQ class which defines the Queue object to enqueue jobs into various
45+
queues.
4446
47+
Example usage::
48+
49+
>>> from pyres import *
50+
>>> r = ResQ(server="192.168.1.10:6379", password="some_pwd")
51+
# Assuming redis is running on default port with no password
52+
53+
54+
"""
4555
def __init__(self, server="localhost:6379", password=None,
4656
timeout=None, retry_connection=True):
4757
self.timeout = timeout

0 commit comments

Comments
 (0)