Skip to content

Commit 34441a6

Browse files
authored
chore: README.rst adjustments
1 parent 4e63b7b commit 34441a6

File tree

1 file changed

+29
-20
lines changed

1 file changed

+29
-20
lines changed

README.rst

Lines changed: 29 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
smartinspect
2-
=================
1+
SmartInspect Python Library
2+
===========================
33

44
.. image:: https://code-partners.com/wp-content/uploads/2020/11/smartinspect_logo_red_82x82_optim.png
55
:target: https://code-partners.com/offerings/smartinspect/
@@ -15,29 +15,38 @@ It helps you identify bugs, find solutions to user-reported issues and gives you
1515
your software performs in different environments. Whether you need logging in the development phase, on production
1616
systems or at customer sites, SmartInspect is the perfect choice.
1717

18-
You can start using ``smartinspect`` like this:
19-
20-
.. code-block:: pycon
21-
22-
>>> from smartinspect import SiAuto
23-
>>> # Enable SiAuto and it will be automatically ready to log via
24-
>>> # named pipe on Windows or tcp on Linux/MacOs
25-
>>> SiAuto.si.set_enabled(True)
26-
>>> # Log simple messages, warnings and exceptions
27-
>>> SiAuto.main.log_message("Processing Order 48843")
28-
>>> SiAuto.main.log_warning("Connection refused")
29-
>>> SiAuto.main.log_exception(e)
30-
31-
>>> # Log variable values, SQL cursor data or any other object
32-
>>> SiAuto.main.log_int("index", index)
33-
>>> SiAuto.main.log_object_value("order", order)
34-
>>> SiAuto.main.log_cursor_data("Cursor data", cursor)
35-
>>> SiAuto.si.dispose()
18+
SmartInspect website - `https://code-partners.com/offerings/smartinspect/`.
3619

20+
Installation
21+
============
3722

3823
You can install ``smartinspect`` with:
3924

4025
.. code-block:: console
4126
4227
$ pip install smartinspect
4328
29+
Usage
30+
=====
31+
32+
You can start using ``smartinspect`` like this:
33+
34+
.. code-block:: pycon
35+
36+
from smartinspect import SiAuto
37+
38+
# Enable SiAuto and it will be automatically ready to log via
39+
# named pipe on Windows or tcp on Linux/MacOs
40+
SiAuto.si.set_enabled(True)
41+
# Log simple messages, warnings and exceptions
42+
SiAuto.main.log_message("Processing Order 48843")
43+
SiAuto.main.log_warning("Connection refused")
44+
SiAuto.main.log_exception(e)
45+
46+
# Log variable values, SQL cursor data or any other object
47+
SiAuto.main.log_int("index", index)
48+
SiAuto.main.log_object_value("order", order)
49+
SiAuto.main.log_cursor_data("Cursor data", cursor)
50+
SiAuto.si.dispose()
51+
52+
More Python examples available at `https://github.com/Code-Partners/smartinspect-examples/tree/main/python`.

0 commit comments

Comments
 (0)