semvec/pypi-packages huggingface dataset:
logfit 1.1.1
Watch and upload log files to log.fit
License: MIT
Keywords: logfit log.fit logging monitoring alerting

LogFit Daemon
=============

|PyPI| |Python Versions|

|Drone|

The LogFit daemon watches log files and sends data to the LogFit app
for analysis.

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

TODO

Usage
-----

.. code:: bash

    # Start in foreground mode
    python3 logfit/client.py [run|foreground]

    # Start in daemon mode
    python3 logfit/client.py start

    # Stop daemon
    python3 logfit/client.py stop

    # Restart the daemon
    python3 logfit/client.py restart

    # Get the daemon status
    python3 logfit/client.py status


Configuration
-------------

The daemon can read from a ``logfit_config.yaml`` config file of the format:

.. code:: yaml

    # Required: Get this from your log.fit account
    source: "64a4b9bd88f14511926e0de86f23e2d8"

    # Optional: The directory the daemon will watch
    watch_directory: "/var/log/"

    # Optional: Minimum log level.  Possible options are
    # critical, error, warning, info, and debug
    log_level: "warning"

    # Optional: File to write daemon logs to
    log_file: "logfit.log"

    # Optional: limit watching log files to given mime types
    allowed_mime_types:
    - text/plain
    - inode/x-empty

    # Optional: List of file globs to not watch, should be the
    # full absolute path
    ignore_paths: []


Development
-----------

.. code:: bash

    python setup.py develop
    pip install -r requirements-test.txt
    flake8
    coverage run -m unittest
    coverage report -m


Publishing
----------

.. code:: bash

    # Publish to PyPI
    python setup.py sdist bdist_wheel
    twine upload dist/*

    # Generate binaries for multiple operating systems
    pyinstaller logfit/main.py -F -p logfit --hidden-import queue -n logfit_linux_x86_64
    pyinstaller logfit/main.py -F -p logfit --hidden-import queue -n logfit_macos_x86_64
    pyinstaller logfit/main.py -F -p logfit --hidden-import queue -n logfit_windows_x86_64

    # Copy binaries into logfit-daemon-binary


.. |PyPI| image:: https://img.shields.io/pypi/v/logfit.svg
   :target: https://pypi.python.org/pypi/logfit/
.. |Python Versions| image:: https://img.shields.io/pypi/pyversions/logfit.svg
   :target: https://github.com/albertyw/logfit-daemon
.. |Drone| image:: https://drone.albertyw.com/api/badges/albertyw/logfit-daemon/status.svg
   :target: https://drone.albertyw.com/albertyw/logfit-daemon
durham-directory 1.3.0
Python Bindings for the Durham University (UK) Directory
License: MIT
Requires Python: >=3.9,<4.0

# Python bindings for the Durham University (UK) Directory

This package provides basic python bindings for [the Durham University
Directory](https://dur.ac.uk/directory/password), where Durham University
students and staff can look up fellow students and staff.

It is nothing more than a wrapper around `requests` and `bs4`, and absolutely
nothing clever is being done (although I do think the code is pleasantly
simple).

## Installation

```bash
python -m pip install durham-directory
```

## CLI Usage

```bash
durham-directory --help
durham-directory --oname John --surname Morris
```

## API Usage

```python
from durham_directory import Query
query = Query(username="me") # will prompt for password when evaluated
query(oname="John", surname="Morris", type_="any")
```

Or if you want to choose one result:

```python
from durham_directory import QueryOne
query = QueryOne()
query(oname="John", surname="Morris", type_="any")
```

We use fuzzy string matching via `fuzzywuzzy` (ignoring the title) to sort
results, as Durham appears to return them bogosorted.

## Scripts

An example script parsing a csv extracted from the spreadsheets it seems
timetabling send around and printing Org-mode tables is in `parse_csv.py`.