semvec/pypi-packages huggingface dataset:
python-brink 0.0.1
A python wrapper to the brink api
License: MIT

Python Brink API Wrapper
========================

Install the Python Package
-------------------------

::

    $ pip install python-brink


Using the API
--------------

1. Login to the api to receive a jwt token that can be used in future requests without the need to reauthenticate

.. code-block:: python

    from brink.client import BrinkAPI
    from brink.exceptions import BrinkAPIException

    api = BrinkAPI()

    try: 
       # Login to the api via username and password
       access = api.login( 'username', 'password' )
       
    except BrinkApiException, e:
    
       # Login error
       exit()

    jwt_token = access['jwt_token']
    
    # After logging in using the api.login() method, the token is already set so additional
    # requests can be handled correctly
    flights = api.getFlights()
    
2. If you already have a jwt token prepared, you can use it when creating the api instance and bypass logging in.

.. code-block:: python

    from brink.client import BrinkAPI
    
    token='eyJ0eXAiOiJKV1QiLCJhbGc...'
    api = BrinkAPI(token)
    
    # Get flights
    flights = api.getFlights()
    
    # Get details for a specific flights
    flight = api.getFlight(10)
    
    # Get data points for a specific flight
    params = { 'page': 1, 'per_page': 50 }
    flight_data = api.getFlightData(10,params)
fsmonitor 0.1
Filesystem monitoring
License: MIT

fsmonitor - Filesystem Monitoring for Python
============================================

Supported Platforms
-------------------

* Linux 2.6 (inotify)
* Windows (ReadDirectoryChangesW with I/O completion ports)
* Any other platform (polling)

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

$ python setup.py install

Introduction
------------

The fsmonitor module provides live filesystem monitoring. It can be used to monitor for
events such as file creation, deletion, modification and so on::

    from fsmonitor import FSMonitor

The FSMonitor class manages filesystem watches and is used to receive events. Call the
add_dir_watch() method to add a directory watch to the monitor::

    m = FSMonitor()
    watch = m.add_dir_watch("/dir/to/watch")

Once a watch has been added, you can call read_events() to read a list of filesystem
events. This is a blocking call and in some cases it might return an empty list, so it
needs to be re-called repeatedly to get more events::

    while True:
        for evt in m.read_events():
            print evt.action_name, evt.name

The FSMonitorThread class can be used to receive events asynchronously with a callback.
The callback will be called from another thread so it is responsible for thread-safety.
If a callback is not specified, the thread will collect events in a list which can be
read by calling read_events().

More Details
------------

See the example code in the examples directory.

Contact Details
---------------

Please send any comments or questions to: luke@iogopro.co.uk

Please report bugs on the `github issue tracker <http://github.com/shaurz/fsmonitor/issues>`_.

-- Luke McCarthy