Skip to content

Commit

Permalink
doc update
Browse files Browse the repository at this point in the history
  • Loading branch information
thefab committed Jun 18, 2015
1 parent 9cbdfe0 commit 02d8386
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 56 deletions.
3 changes: 3 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,9 @@ API
.. autoclass:: Client
:members:

.. autoclass:: Connection
:members:

.. autoclass:: Pipeline
:members:

Expand Down
20 changes: 1 addition & 19 deletions tornadis/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,30 +25,12 @@ class Client(object):
"""High level object to interact with redis.
Attributes:
subscribed (boolean): True if the client is in subscription mode.
autoconnect (boolean): True if the client is in autoconnect mode
(and in autoreconnection mode) (default True).
connection_kwargs: Connection object kwargs
"""

def __init__(self, autoconnect=True, **connection_kwargs):
"""Constructor.
Args:
autoconnect (boolean): True if the client is in autoconnect mode
(and in autoreconnection mode) (default True).
**connection_kwargs: Connection object kwargs :
host (string): the host name to connect to.
port (int): the port to connect to.
unix_domain_socket (string): path to a unix socket to connect
to (if set, overrides host/port parameters).
read_page_size (int): page size for reading.
write_page_size (int): page size for writing.
connect_timeout (int): timeout (in seconds) for connecting.
tcp_nodelay (boolean): set TCP_NODELAY on socket.
aggressive_write (boolean): try to minimize write latency over
global throughput (default False).
ioloop (IOLoop): the tornado ioloop to use.
"""
self.connection_kwargs = connection_kwargs
self.autoconnect = autoconnect
self.__connection = None
Expand Down
19 changes: 2 additions & 17 deletions tornadis/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ class Connection(object):
"""Low level connection object.
Attributes:
read_callback: callback called when there is something to read.
close_callback: callback called when the connection is closed.
host (string): the host name to connect to.
port (int): the port to connect to.
unix_domain_socket (string): path to a unix socket to connect to
Expand All @@ -59,23 +61,6 @@ def __init__(self, read_callback, close_callback,
write_page_size=tornadis.DEFAULT_WRITE_PAGE_SIZE,
connect_timeout=tornadis.DEFAULT_CONNECT_TIMEOUT,
tcp_nodelay=False, aggressive_write=False, ioloop=None):
"""Constructor.
Args:
read_callback: callback called when there is something to read.
close_callback: callback called when the connection is closed.
host (string): the host name to connect to.
port (int): the port to connect to.
unix_domain_socket (string): path to a unix socket to connect to
(if set, overrides host/port parameters).
read_page_size (int): page size for reading.
write_page_size (int): page size for writing.
connect_timeout (int): timeout (in seconds) for connecting.
tcp_nodelay (boolean): set TCP_NODELAY on socket.
aggressive_write (boolean): try to minimize write latency over
global throughput (default False).
ioloop (IOLoop): the tornado ioloop to use.
"""
self.host = host
self.port = port
self.unix_domain_socket = unix_domain_socket
Expand Down
1 change: 0 additions & 1 deletion tornadis/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ class Pipeline(object):
"""

def __init__(self):
"""Simple constructor."""
self.pipelined_args = []
self.number_of_stacked_calls = 0

Expand Down
11 changes: 0 additions & 11 deletions tornadis/pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,6 @@ class ClientPool(object):

def __init__(self, max_size=-1, client_timeout=-1, autoclose=False,
**client_kwargs):
"""Constructor.
Args:
max_size (int): max size of the pool (-1 means "no limit").
client_timeout (int): timeout in seconds of a connection released
to the pool (-1 means "no timeout").
autoclose (boolean): automatically disconnect released connections
with lifetime > client_timeout (test made every
client_timeout/10 seconds).
client_kwargs (dict): Client constructor arguments.
"""
self.max_size = max_size
self.client_timeout = client_timeout
self.client_kwargs = client_kwargs
Expand Down
8 changes: 0 additions & 8 deletions tornadis/pubsub.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,6 @@ class PubSubClient(Client):
The call() method is forbidden with this object.
More informations on the redis side: http://redis.io/topics/pubsub
Attributes:
host (string): the host name to connect to.
port (int): the port to connect to.
read_page_size (int): page size for reading.
write_page_size (int): page size for writing.
connect_timeout (int): timeout (in seconds) for connecting.
subscribed (boolean): True if the client is in subscription mode.
"""

def call(self, *args, **kwargs):
Expand Down

0 comments on commit 02d8386

Please sign in to comment.