Metadata-Version: 2.4
Name: libABCD
Version: 2.3.0
Summary: the Autonomous Bariloche Central DAQ, a centralized DAQ system for scientific experiments
Project-URL: Source code, https://gitlab.com/bertou/libabcd
Author-email: Xavier Bertou <bertou@cab.cnea.gov.ar>, Nicolás Avalos <nicolas.avalos@ib.edu.ar>
License-Expression: MIT
License-File: LICENSE
Keywords: logging,mqtt
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Communications
Classifier: Topic :: Scientific/Engineering
Requires-Python: >=3.8
Requires-Dist: paho-mqtt<3,>=2
Requires-Dist: pytest
Description-Content-Type: text/markdown

Avalos-Bertou Central DAQ (libABCD)
===================================
(Formerly: Autonomous Bariloche Central DAQ)

This library handles two crucial aspects of any experiment that consists 
of multiple clients taking data: the communication between clients and 
the log information.

The main concept for the DAQ is that it orbits around a central server. 
Control and information run through this server allowing a permanent 
follow-up of what is happening. The raw data is handled by the clients 
themselves and is not seen by the DAQ. The central server is a MQTT 
broker. We recommend using [`mosquitto`](https://mosquitto.org/).

Logs are handled by each client, but the `ABCDHandler` logging handler 
sends the relevant information through MQTT, allowing for a centralized 
monitoring.

Installation
------------

### Requirements:
Starting from libABCD v2.2.0: `paho.mqtt>=2`.
v2.1 and less: `paho.mqtt<2`

The latest version can be installed from pip:
```bash
python3 -m pip install libabcd
```

Usage
-----

`libABCD` is a singleton object (i.e. a single instance runs per python
process). Start it by running:
```python
import libABCD
libABCD.init('my_daq')  # see documentation in the docstring
```
You can then `publish`, `subscribe`, `unsubscribe` and `add_callback` 
using the same object. Documentation can be found in the docstrings.  

Best practice for handling your application log:
```python
import logging
logger = logging.getLogger('your_app_name')
logger.addHandler(logging.NullHandler()) # remove all other handlers
logger.info('I am an INFO message') # or warning, error, critical
```

Don't forget to close the connection at the end of the session
```python
libABCD.disconnect()
```

A full documentation of the available features is under way.

Questions, requests, feedback
-----------------------------

If you find a bug, want to know more about specific features or have feedback
of any kind, do not hesitate to email me at nicolaseavalos AT gmail DOT com.

License
-------

This project is licensed under the MIT license.

