Skip to content

Commit

Permalink
Update usage-examples.rst
Browse files Browse the repository at this point in the history
  • Loading branch information
maciejlach committed Jan 14, 2015
1 parent 57ec6e1 commit 2f84cbc
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions doc/source/usage-examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ Synchronous query
*****************

Following example presents how to execute simple, synchronous query against a remote q process:
::

.. code:: python
from qpython import qconnection
Expand Down Expand Up @@ -50,7 +51,8 @@ Asynchronous query
******************

Following example presents how to execute simple, asynchronous query against a remote q process:
::

.. code:: python
import random
import threading
Expand Down Expand Up @@ -130,7 +132,8 @@ Interactive console
*******************

This example depicts how to create a simple interactive console for communication with a q process:
::

.. code:: python
from qpython import qconnection
from qpython.qtype import QException
Expand Down Expand Up @@ -163,7 +166,11 @@ Twisted integration
*******************

This example presents how the `qPython` can be used along with `Twisted`_ to build asynchronous client:
::

.. note::
This sample code overwrites `.u.sub` and `.z.ts` functions on q process.

.. code:: python
import struct
import sys
Expand Down Expand Up @@ -315,7 +322,8 @@ Subscribing to tick service
***************************

This example depicts how to subscribe to standard kdb+ tickerplant service:
::

.. code:: python
import numpy
import threading
Expand Down Expand Up @@ -386,7 +394,8 @@ Data publisher
**************

This example shows how to stream data to the kdb+ process using standard tickerplant API:
::

.. code:: python
import datetime
import numpy
Expand Down Expand Up @@ -458,4 +467,4 @@ This example shows how to stream data to the kdb+ process using standard tickerp
t.join()
.. _Twisted: http://twistedmatrix.com/trac/
.. _Twisted: http://twistedmatrix.com/trac/

0 comments on commit 2f84cbc

Please sign in to comment.