semvec/pypi-packages huggingface dataset:
lockex 0.3
Get lock from zookeeper and execute
License: BSD

lockex
======

lockex is a tool that attempts to acquire a lock from zookeeper prior
to executing a user supplied command.

If lockex cannot aquire a lock, it will block, wait and retry to acquire
the lock. Alernatively instead of blocking, lockex can exit after a given
timeout or immediately. The lock id is generated automatically based on
user supplied command. We also assume that the user command that is to
be run, is executed in the foreground.

By default if the concurrency is set it 1, lockex will try and get lock,
if the concurrency is greater than 1 then lockex will try to acquire a
lock via a semaphore.

lockex will die if the connection to zookeeper is lost, it will continue
to run if the connection is suspended. lockex will do it's best to
cleanup the child process when this happens.

License
-------

Please see COPYING

Use cases:
----------

* You have a producer/consumer based daemons, you can only run one
producer at a time. *lockex* will let you startup many producers but
only one will run if it has acquired a lock.

* A long running cronjob and you want to guarantee that it runs on only
on one host assuming the jobs all start within a small time window.


Installation:
-------------

    pip install https://github.com/rapid7/lockex


Usage:
------

Running *lockex --help* will give you information about how to use
the application. In general,

    lockex OPTIONS -- your_command your_args

*lockex* will treat anything after the '--' as the command that you want
to run. *lockex* will also look for the ZKHOSTS environment variable
to connect to your zookeeper cluster, the format is a comma seperated
list of 'hostname:port'.


Example:
--------

Assuming redis did not have a master/slave capability and you are using
supervisord to run your processes.

On host1, you have a single redis instance running (assuming the data
is stored in a shared location)

    lockex -- /usr/local/bin/redis-server /etc/redis.conf

On host2, you have an identical configuration (with access to the data
in the shared location), run the same command as on host1

    lockex -- /usr/local/bin/redis-server /etc/redis.conf

If and when host1's instance redis dies, host2 will acquire the lock
from zookeeper and startup redis. In a controlled example send host1's
lockex instance with a SIGTERM and it will kill it's child processes.


Requirements:
-------------

* A working installation of zookeeper and python2.7 or higher.
* A durable instance of zookeeper (at least three nodes).
* The hosts are all synchronised with ntp.

Vendored packages:
------------------

* lockex/glog.py - https://github.com/benley/python-glog - Copyright (c) 2015 Benjamin Staffin - under 2 clause BSD license.
pybankreader 0.2.3
A library & micro-framework for reading data files exported from various internet banking solutions. Currently supports BBF and GPC files (just subsets of those for the time being)
License: BSD

Pybankreader
============

License
    BSD
Python Compatibility
    Python 2.7 & Python 3.4

What Is It
----------
The `pybankreader` library is a toolkit to create model-based representation of
structured exported plain-text files.

The initial intention is to be able to load various exported repors, that you
get from internet banking applications.

Currently, there are two formats supported in the library itself, on top of the
framework for rolling your own: GPC and BBF. However, as stated, the library
was designed with generic application in mind, it's very easy to add additional
formats.

The data-format that the library expects is a text file, that is structured,
with one line per record (however, you can have any number of different records
in such a file). Together, individual records form a report. All of this is
handled transparently, so in the end, you can do something super-easy like
this (``report.custom_record`` and ``report.data`` are fields defined by a
report, not the library itself)::

 report = MyReport(initial_data=file_like)
 name_of_report = report.custom_record.name
 for x in report.data:
    x.name
    x.surname

You will find more information about how to use this library in the docs.

How to Get It
-------------

Two options:

 * Use ``pip``: ``pip install pybankreader``
 * Or clone from Github if you want to: ``git clone https://github.com/baldman/pybankreader.git``

What Is the Projects Status
---------------------------

I'd say that library is in something like limited production use.

Currently, the library is capable of what it was initially intended to do, and
that is to read two bank formats:

 * GPC (v2)
 * BBF (not FINSTA records)

If needed, other formats will follow.

Mind that only one datasource was used for testing: CSOB a.s. If problems
arise, fill an issue and ideally, attach data that does not work with this.

On top of that, it's very simple to create your own custom records and reports,
since there is a un-healthy abundancy for bank export formats (see the docs for
that).

Where Is the Documentation
--------------------------
http://pybankreader.readthedocs.org/, read the docs of course.