semvec/pypi-packages huggingface dataset:
proxcat 0.3
local htop-like status monitor for remote Proxmox VE servers
License: MIT
Keywords: proxmox,proxmoxer,PVE,status,monitor

# proxcat
A htop-like status monitor for Proxmox VE servers, powered by python curses, with support for multiple nodes, VM (QEMU) and Container (LXC) status and node status.

## Screenshot
![connected to my own PVE server](screenshot.jpg)
## Installation
`pip install requests proxmoxer proxcat`
(optional) `pip install PySensors` for CPU temperature info support (only when ran directly on PVE host)

Or, clone repository and run `pip install .`. 

## Usage
1. On your PVE server, create an API token in WebUI under Datacenter -> Permissions -> API Tokens. Remember to deselect "Priviledge Separation". For security concerns, it is recommended to use it with a dedicated low-level user - for example, one with the "PVEAuditor" role assigned - instead of root or other administrators.
2. Create a config file. `proxcat` will look for `config.ini` under
    - `$XDG_CONFIG_HOME/proxcat/` or
    - `~/.proxcat/`

    Or, you can specify a custom config file with the `-c` / `--config` flag.

    Then fill in the config file like this:
   ```ini
   [Account]
   # address of PVE host
   Host = 
   # Username (format: <username>@<realm)
   User = 
   # name of your token
   TokenName = 
   # your token value
   Token = 

   [Settings]
   # set data update interval (in ms), optional
   UpdateInterval = 
   # whether to enable host CPU temperature info (requires lm_sensors and PySensors). Disabled by default.
   ShowSensors = False
   ```
   The options in [Settings] can be overriden by command-line flags; see `-h` or `--help` for details.

3. run the `proxcat` command.
   > Keybindings:
   > 
   > `q` to quit
   > 
   > `n` `p` for switching between nodes
   > 
   > any other key for force refreshing screen
## Changelog
see [CHANGELOG.md](CHANGELOG.md).

## Todo
- [ ] Switch entirely to `pyproject.toml`
- [x] Add optional lm_sensors support for HW monitoring (if ran on host)
- [ ] Change time display to difference between host and local client
- [ ] More functionality for curses UI (custom sorting, ...)
- [ ] Invoke VM/CT jobs within app
- [ ] **Optional headless/daemon mode with WebUI**

## License
[MIT](LICENSE)

# Changelog
v0.3 (2022/07/13)
- Add support for CPU temperature info, powered by lm_sensors (only when ran directly on host)
- Add flags to override existing settings in config file
- Bug fixes

v0.2.1 (2022/05/08)
- Code cleanup
- minor UI tweak
  
v0.2 (2022/05/07) 
- Add flag to disable LXC-only info
- Fix LXC-only info menubar item still showing when no CTs are present
- Minor bug fixes and improvements
  
v0.1 (2022/05/02)
- Initial release
kafka-schema-registry 0.1.2
Kafka and schema registry integration
License: MIT
Requires Python: >=3.7
Keywords: kafka schema-registry

# kafka-schema-registry

This library allows you to create topics on Kafka topics, associated with a
Confluent Schema Registry, and publish messages on them.

It takes care of:
* creating the topic
* publishing the associated schema (or updating an existing one)
* serializing and publishing messages to Kafka

It works with [kafka-python][], and extra arguments are forwarded to it.

[kafka-python]: https://github.com/dpkp/kafka-python


## Installing

```sh
pip install kafka-schema-registry
```

## Usage

```python
from kafka_schema_registry import prepare_producer

SAMPLE_SCHEMA = {
    "type": "record",
    "name": "TestType",
    "fields" : [
        {"name": "age", "type": "int"},
        {"name": "name", "type": ["null", "string"]}
    ]
}


producer = prepare_producer(
        ['localhost:9092'],
        f'http://schemaregistry',
        topic_name,
        1,
        1,
        value_schema=SAMPLE_SCHEMA,
)

producer.send(topic_name, {'age': 34})
producer.send(topic_name, {'age': 9000, 'name': 'john'})
```

## Running the tests

The test requires Docker in order to start a local Redpanda instance.

* `make start-redpanda` to start the server
* `make test` to configure a virtualenv and run the tests
mem-top 0.2.1
Shows top suspects for memory leaks in your Python program.
License: MIT


Usage::

    pip install mem_top
    from mem_top import mem_top

    # From time to time:
    logging.debug(mem_top())
    # print(mem_top())

    # Notice which counters keep increasing over time - they are the suspects.

Counters:

"mem_top" iterates all objects found in memory and calculates:

* refs - number of direct references from this object to other objects, like keys and values of dict

    * E.g. a dict {("some", "complex", "key"): "value"} will have "refs: 2" - 1 ref for key, 1 ref for value
    * Its key ("some", "complex", "key") will have "refs: 3" - 1 ref per item

* bytes - size of this object in bytes
* types - number of objects of this type still kept in memory after garbage collection

Real life example::

    refs:
    144997  <type 'collections.defaultdict'> defaultdict(<type 'collections.deque'>, {<GearmanJobRequest task='...', unique='.
    144996  <type 'dict'> {'.:..............:.......': <GearmanJobRequest task='..................', unique='.................
    18948   <type 'dict'> {...
    1578    <type 'dict'> {...
    968     <type 'dict'> {...
    968     <type 'dict'> {...
    968     <type 'dict'> {...
    767     <type 'list'> [...
    726     <type 'dict'> {...
    608     <type 'dict'> {...

    types:
    292499  <type 'dict'>
    217912  <type 'collections.deque'>
    72702   <class 'gearman.job.GearmanJob'>
    72702   <class 'gearman.job.GearmanJobRequest'>
    12340   <type '...
    3103    <type '...
    1112    <type '...
    855     <type '...
    767     <type '...
    532     <type '...

* Noticed a leak of 6GB RAM and counting.
* Added "mem_top" and let it run for a while.
* When got the result above it became absolutely clear who is leaking here:
  the Python client of Gearman kept increasing its counters over time.
* Found its known bug - https://github.com/Yelp/python-gearman/issues/10
  leaking defaultdict of deques, and a dict of GearmanJobRequest-s,
  just as the "mem_top" showed.
* Replaced "python-gearman" - long story: stale 2.0.2 at PyPI, broken 2.0.X at github, etc.
* "mem_top" confirmed the leak is now completely closed.

Updates:

* Pass e.g. "verbose_types=[dict, list]" to store their values, sorted by "repr" length, in "verbose_file_name".
* Added "bytes" top.

Config defaults::

    mem_top(
        limit=10,                           # limit of top lines per section
        width=100,                          # width of each line in chars
        sep='\n',                           # char to separate lines with
        refs_format='{num}\t{type} {obj}',  # format of line in "refs" section
        bytes_format='{num}\t {obj}',       # format of line in "bytes" section
        types_format='{num}\t {obj}',       # format of line in "types" section
        verbose_types=None,                 # list of types to sort values by `repr` length
        verbose_file_name='/tmp/mem_top',   # name of file to store verbose values in
    )

See also:

* https://docs.python.org/2/library/gc.html#gc.garbage
* https://pypi.python.org/pypi/objgraph
tkdialog-wrapper 2.1.0
A wrapper library to use tkinter dialogs easily.
License: MIT
Requires Python: >=3.5

# tkdialog-wrapper

A wrapper library to use tkinter dialogs easily.

[![PyPI version](https://badge.fury.io/py/tkdialog-wrapper.svg)](https://badge.fury.io/py/tkdialog-wrapper) [![MIT License](http://img.shields.io/badge/license-MIT-blue.svg?style=flat)](LICENSE)

## Usage

`pip install tkdialog-wrapper`

```python
import tkdialog

# make open dialog
filename = tkdialog.open_dialog()

# Extensions can be assigned.
## for numpy savez files
dat = np.load(tkdialog.open_dialog('.npz'))
## for csv files
df = pd.read_csv(tkdialog.open_dialog('.csv'))

# make saveas dialog
filename = tkdialog.open_dialog(ext='pkl')


# open a directory selector
dirname = tkdialog.open_dir_dialog()

# change current working directory with a selector dialog
tkdialog.chdir_with_dialog()


# open a pickled file (*.pkl) with a dialog
obj = tkdialog.load_pickle_with_dialog()

# open a pickled file (*.dat) with a dialog
obj = tkdialog.load_pickle_with_dialog(ext='.dat')

# pickle an object with a dialog
dat = {'x': 100, 'y': '01234'}
tkdialog.dump_pickle_with_dialog(dat)
```

## Change log
### [2.1.0]
- add functions:
  - `chdir_with_dialog`, `open_dir_dialog`

### [2.0.0]
- breaking changes:
  - supported python version >= 3.5
  - argument of all functions
  - add docstring
  - add typehint

### [1.x]