semvec/pypi-packages huggingface dataset:
scylla-cli 0.1.11
Python script for managing and repairing Scylla Cluster
License: MIT
Keywords: scylla cluster repair cli manager database nosql cassandra

# scylla-cli

Python script for managing and repairing (in a smart way) Scylla Cluster.
It repairs the primary range of a Scylla node in discrete steps using 
[advanced repair techniques](https://www.datastax.com/dev/blog/advanced-repair-techniques).

## Prerequisites

* Python >=3.5
* SSH connection or direct access to every Scylla host in the cluster should be possible
* Scylla REST API listens on every Scylla host on `<localhost|IP>:10000`

Following env variables could be set to make your life easier:
```
export SCYLLA_HOST='10.210.92.46' # initial endpoint for obtaining cluster topology
export SCYLLA_USERNAME='root' # ssh user on Scylla host
export SCYLLA_PKEY='/home/USER/.ssh/id_rsa' # Defaults to ~/.ssh/id_rsa
export SCYLLA_CONNECTION_METHOD='ssh' # or 'direct'
```

## Installation

```
pip3 install scylla-cli
```

## Developing
```
virtualenv -p python3 scylla-cli
pip3 install --editable .
```

## Checking cluster status
```
scli status
```
![](docs/status_demo.gif)

## Repairing Scylla Cluster
```
# connect to the cluster via 10.210.92.46 with root credentials and repair
# sync keyspace on every endpoint in local DC only
$ scli -u root -p repair sync --local

# connect to the cluster via 10.210.92.46 with root credentials and repair
# sync keyspace on 10.210.92.46 only
$ scli -u root -p repair sync --local --hosts 10.210.92.46

# connect to the cluster via 10.210.92.46 with root credentials and repair
# sync keyspace on every host except 10.210.92.46
$ scli -u root -p repair sync --local --exclude 10.210.92.46
```
logstash-python-formatter 0.1.2
Python formatter for working with Logstash json filters.
License: MIT
Keywords: python,logging,logstash_formatter,formatter,log

logstash-python-formatter
=========================

Python logging formatter for creating log entries in a JSON **logstash-friendly** format.

Supports renaming of python default logging fields to logstash friendly names (e.g: renaming **asctime** to **@timestamp**)

LogstashFormatter can receive the following arguments:

* **fmt**, list or tuple containing the fields to include in each entry. Defaults to ["asctime", "levelname", "filename", "funcName", "msg", "exc_info"].
* **datefmt**, date format string to be passed to formatTime(). Defaults to ISO8601 time format.
* **rename**, dictionary containing mapping of { key: new_key } to be renamed. Defaults to { "asctime": "@timestamp" }.
* **version**, version as for the @version attribute used in Logstash. Defaults to "1".

=============
Sample output
=============

.. code:: python

    {
      "@timestamp": "2016-09-28T16:24:24,799",
      "@version": "1",
      "exc_info": null,
      "filename": "<ipython-input-21-de248ad5b09c>",
      "funcName": "<module>",
      "levelname": "INFO",
      "message": "This is a normal message to be logged"
    }

=====
Usage
=====
Add **LogstashFormatter** as the formatter of your handler, as usual:

.. code:: python

    self.logger = logging.getLogger()
    self.handler = logging.StreamHandler()
    self.handler.setFormatter(LogstashFormatter())
    self.logger.addHandler(self.handler)

===============
Using in Django
===============

Include logstash formatter in your settings file:

.. code:: python

    LOGGING = {
        'formatters': {
            'logstash': {
                '()': 'logstash_formatter.LogstashFormatter',
                'format': ("asctime", "levelname", "name", "lineno", "message",
                           "pathname", "module", "funcName", "process",),
                'datefmt': '%Y-%m-%dT%H:%M:%S',
                'rename': {
                    'asctime': '@timestamp',
                },
                'version': '1'
            },
        }
    }
promptr 0.2.0
promptr is a toolkit for building CLI shells, similar to that found on a Cisco router.
License: MIT

promptr |Version| |Build| |Coverage| |Health| |Docs| |CLA|
==========================================================

|Compatibility| |Implementations| |Format| |Downloads|

promptr is a toolkit for building CLI shells, similar to that found on a Cisco router.

The library uses a click and flask style decorator driven interface that allows you to quickly and easily build a shell.

Documentation
-------------
promptr's documentation can be found at `https://promptr.readthedocs.io <https://promptr.readthedocs.io>`_


Installing promptr
------------------
promptr can be installed from Pypi using pip::

    pip install promptr

Thanks
------

Thanks to prompt-toolkit for the underlying functionality, and thanks to pallets for the click and flask inspiration.

Contributing
------------
To contribute to promptr, please try to make sure that any new features, or changes
to existing functionality **include test coverage**.

Additionally, please format your code using `yapf <http://pypi.python.org/pypi/yapf>`_
with ``facebook`` style prior to issuing your pull request.

``yapf --style=facebook -i -r promptr setup.py``


.. |Build| image:: https://travis-ci.org/mattdavis90/promptr.svg?branch=master
   :target: https://travis-ci.org/mattdavis90/promptr
.. |Coverage| image:: https://img.shields.io/coveralls/mattdavis90/promptr.svg
   :target: https://coveralls.io/r/mattdavis90/promptr
.. |Health| image:: https://codeclimate.com/github/mattdavis90/promptr/badges/gpa.svg
   :target: https://codeclimate.com/github/mattdavis90/promptr
.. |Version| image:: https://img.shields.io/pypi/v/promptr.svg
   :target: https://pypi.python.org/pypi/promptr
.. |Docs| image:: https://readthedocs.org/projects/promptr/badge/?version=latest
   :target: https://promptr.readthedocs.io
.. |CLA| image:: https://cla-assistant.io/readme/badge/mattdavis90/promptr
   :target: https://cla-assistant.io/mattdavis90/promptr
.. |Downloads| image:: https://img.shields.io/pypi/dm/promptr.svg
   :target: https://pypi.python.org/pypi/promptr
.. |Compatibility| image:: https://img.shields.io/pypi/pyversions/promptr.svg
   :target: https://pypi.python.org/pypi/promptr
.. |Implementations| image:: https://img.shields.io/pypi/implementation/promptr.svg
   :target: https://pypi.python.org/pypi/promptr
.. |Format| image:: https://img.shields.io/pypi/format/promptr.svg
   :target: https://pypi.python.org/pypi/promptr