semvec/pypi-packages huggingface dataset:
spyl 1.0.1
A simple python logger
Requires Python: >=3.7

# spyl
a simple python logger

# how to use

* ## downloading the logger and installing required libraries

1. download the logger and add to your project `pip install spyl`
* ## personalizing the logger
* when instantiating the `Logger` class you can configure a few parameters about the logger
* `logLevel`, default to `True` - will the logger print out the level label e.g. if set to true: `[12:00:00] [LEVEL] message` if set to false `[12:00:00] message`
* `colorLevelText`, default to `True` - will the level label get colored
* `quitWhenLogFatal`, default to `False` - will the program quit when something with the fatal level is logged
* `colorText`, default to `True` - will the message get colored
* `prefixBeforeTime`, default to `True`, - if a prefix is set will it be displayed before the timestamp `prefix [12:00:00] [LEVEL] message` or after `[12:00:00] prefix [LEVEL] message`
* `warnLevel`, an instance of `LogLevel`, default to `LogLevel("WARN", Fore.YELLOW)`
* `infoLevel`, an instance of `LogLevel`, default to `LogLevel("INFO", Fore.RESET)`
* `debugLevel`, an instance of `LogLevel`, default to `LogLevel("DEBUG", Fore.WHITE)`
* `errorLevel`, an instance of `LogLevel`, default to `LogLevel("ERROR", Fore.LIGHTRED_EX),`
* `fatalLevel`, an instance of `LogLevel`, default to `LogLevel("FATAL", Fore.RED, isFatal=True)`
* `prefix`, default to `""` - the prefix of the entry that is to be logged (see the `prefixBeforeTime` parameter)
* ## logging default levels

1. import the library using `import spyl`
2. create an instance of the `Logger` class `logger = spyl.Logger()`

* to log a warning use the `logger.log_warning` function
* to log an info message use the `logger.log_info` function
* to log a debug message use the `logger.log_debug` function
* to log an error use the `logger.log_error` function
* to log a fatal error use the `logger.log_fatal` function

* ## adding additional custom levels

1. import the library using `import spyl`
2. import the colorama library using `from colorama import Fore`
3. create an instance of the `Logger` class `logger = spyl.Logger()`
4. create an instance of the `LogLevel` class `customLevel = spyl.LogLevel("CUSTOM", Fore.GREEN, isFatal=False)`
* the `LogLevel` class has a few parameters which can be configured
* `name` - the name/label of the level
* `color` - the color in which the level will be logged
* `isFatal`, default to `False`- is the level fatal (this in important because if it is and `logger.quitWhenLogFatal` is set to true and the level is fatal the program will exit when logged) 
5. log the custom level using `logger.log("message", customLevel)` or `customLevel.log("message")`
imstr 0.0.16
A command line tool for converting images to strings
Requires Python: >=3.6

# imstr
<a href="https://pypi.org/project/imstr/">
  <img src="https://img.shields.io/pypi/v/imstr"/>
</a>

<ins>**Im**</ins>age <ins>**str**</ins>ing is a command line tool for converting images to strings.

## Install
The following command will install `imstr`
```
pip install imstr
```

## Usage
To use, simply call from the command line:
```
$ imstr --help

imstr

Usage:
  imstr [options] <image>

Options:
  --help                  Show this screen.
  -v --version            Show version.
  -o --output=FILENAME    Output target.
  -e --encoding=ENCODING  Output target encoding.
  -s --scale=SCALE        Scale output [default: 1].
  -w --width=WIDTH        Set width of output.
  -h --height=HEIGHT      Set height of output.
  -d --density=DENSITY    Set density string [default: .:-i|=+%O#@].
  -i --invert             Invert density string [default: False].
```

Alternatively it can be called as a python module:
```
$ python -m imstr --help
```
Or imported as a python library:
``` python
from imstr import imstr

output = imstr(...)
```

### Example
The following converts an input image (`cat.png`) to a string and saves it to a file (`cat.txt`).

Command line
```
$ imstr cat.png -o cat.txt
```
Python
``` python
from imstr import imstr

output = imstr('cat.png', filename='cat.txt')
```

### Example outputs

The following are made entirely out of textual characters

<div style="display: flex; justify-content: center; alight-items: center">
<img style="height: 250px" src="https://user-images.githubusercontent.com/74541141/200204655-4de7b4b5-7434-4a89-934b-e92c989cee0c.png" />
<img style="height: 250px" src="https://user-images.githubusercontent.com/74541141/200204656-731e4a81-a168-456f-bf2c-64ca34cec159.png" />
<img style="height: 250px" src="https://user-images.githubusercontent.com/74541141/200204663-765e1f32-0400-4510-82e1-923b02fd4d1f.png" />
</div>