Skip to content

Commit 7eb9a28

Browse files
committed
started doc strings for ResQ class and moving along the documentation
1 parent 9de42ec commit 7eb9a28

File tree

4 files changed

+17
-1
lines changed

4 files changed

+17
-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: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ Contents:
1212
:maxdepth: 2
1313

1414
intro
15+
example
16+
class
1517

1618
Indices and tables
1719
==================

pyres/__init__.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,15 @@ 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()
51+
# Assuming redis is running on default port with no password
52+
"""
4553
def __init__(self, server="localhost:6379", password=None,
4654
timeout=None, retry_connection=True):
4755
self.timeout = timeout

0 commit comments

Comments
 (0)