summaryrefslogtreecommitdiffstats
path: root/docs/source/usage.rst
diff options
context:
space:
mode:
Diffstat (limited to 'docs/source/usage.rst')
-rw-r--r--docs/source/usage.rst38
1 files changed, 37 insertions, 1 deletions
diff --git a/docs/source/usage.rst b/docs/source/usage.rst
index 9fa12ad..588d2f7 100644
--- a/docs/source/usage.rst
+++ b/docs/source/usage.rst
@@ -1,2 +1,38 @@
Usage
-===== \ No newline at end of file
+=====
+
+Once you've installed the ``lirc`` python package, there will be a number
+of things you can now import from it to get started.
+
+.. code-block:: python
+
+ from lirc import (
+ Lirc,
+ LircResponse,
+ LircError,
+ LircSocketError,
+ LircSocketTimeoutError,
+ InvalidReplyPacketFormatError
+ )
+
+The most relevant of these is ``Lirc``, since this is the main class
+you will be using.
+
+Initializing Lirc
+-----------------
+
+The ``Lirc`` class takes in three separate options, which all have default
+values, that we may pass into it to construct it and override those default
+values.
+
+The simplest way to construct ``Lirc`` is with no arguments at all.
+
+.. code-block:: python
+
+ from lirc import Lirc
+
+ lirc = Lirc()
+
+This will attempt to connect to the lircd socket at "/var/run/lirc/lircd" on
+your system, create a socket using ``AF_UNIX`` and ``SOCK_STREAM``, and sets
+a socket timeout of 5 seconds. \ No newline at end of file