Welcome to Lab Utils!¶
lab_utils is a collection of useful modules for Python development in the context of scientific laboratory
work. It was created to standardize common tasks and features used by many different apps and users. The package aims to
provide simple, efficient and robust protocols in the following areas:
PostgreSQL Database Interface. The
databasemodule provides a simple interface to manage connections to a PostgreSQL database. It uses the package
psycopg2(a Python wrapper of the C library libpq) to provide simple database functionality.
Daemon-like TCP Server. The
socket_commmodule provides a daemon-like TCP server base class. The
lab_utils.socket_comm.Serveris supposed to start and run indefinitely in the background, while listening for incoming communications over a TCP port. When a message is received, a string parser calls the appropriate method. Users should develop their own child class inheriting from
lab_utils.socket_comm.Serverand implementing the necessary methods for their particular needs.
If this is your first time using
lab_utils, have a look at our Readme for a more
detailed summary and installation instructions. If you’re already familiar with this package, or you want to dive
straight in, you can jump to the API reference. There are also some examples which
demonstrate specific applications of the modules.