summaryrefslogtreecommitdiffstats
path: root/docs/source/usage.rst
diff options
context:
space:
mode:
authorEugene Triguba <eugenetriguba@gmail.com>2020-07-13 19:54:53 -0500
committerEugene Triguba <eugenetriguba@gmail.com>2020-07-13 19:54:53 -0500
commit22a54c83c0684bc1132242d7d35c9ec13afb210c (patch)
tree3bd362c061f9fe68340e91e8244f197623322cc2 /docs/source/usage.rst
parentChange version back to 0.0.0 (diff)
downloadlirc-22a54c83c0684bc1132242d7d35c9ec13afb210c.zip
Add starter usage docs and remove using lirc on macos & windows
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