Metadata-Version: 2.4
Name: tinycolorlog
Version: 0.2.0
Summary: A tiny Python logger with colorful ANSI terminal output.
License: MIT License
        
        Copyright (c) 2026 tinycolorlog contributors
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Keywords: logging,color,terminal,cli,ansi
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: System :: Logging
Classifier: Topic :: Terminals
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# tinycolorlog

A tiny, zero-dependency Python logger with colorful ANSI terminal output.

## Installation

```bash
pip install tinycolorlog
```

## Usage

```python
from tinycolorlog import logger

logger.info("Server started on port 8080")
logger.success("Database connection established")
logger.error("Failed to read configuration file")
```

All text — both the `[TAG]` and the message — is printed in **bold italic** with full color.

### Unicode Font Styles

Pass `font=` to convert your output into a Unicode font style. This works anywhere Unicode is rendered: terminals, Slack, Discord, GitHub, Notion, etc.

```python
logger.error("Failed to read configuration file", font="monospace")
logger.success("All systems operational", font="bold_italic")
logger.info("Deploying to production", font="double_struck")
```

#### Available Fonts

| Font name       | Preview                        |
|-----------------|-------------------------------|
| `bold`          | 𝗯𝗼𝗹𝗱 𝘁𝗲𝘅𝘁                  |
| `italic`        | 𝘪𝘵𝘢𝘭𝘪𝘤 𝘵𝘦𝘹𝘵               |
| `bold_italic`   | 𝙗𝙤𝙡𝙙 𝙞𝙩𝙖𝙡𝙞𝙘 𝙩𝙚𝙭𝙩      |
| `monospace`     | 𝚖𝚘𝚗𝚘𝚜𝚙𝚊𝚌𝚎 𝚝𝚎𝚡𝚝         |
| `double_struck` | 𝕕𝕠𝕦𝕓𝕝𝕖 𝕤𝕥𝕣𝕦𝕔𝕜          |
| `script`        | 𝓈𝒸𝓇𝒾𝓅𝓉 𝓉𝑒𝓍𝓉             |
| `fraktur`       | 𝔣𝔯𝔞𝔨𝔱𝔲𝔯 𝔱𝔢𝔵𝔱           |

### Output

Each method prints bold + italic colored text with a tag prefix:

| Method             | Color    | Tag         |
|--------------------|----------|-------------|
| `logger.info()`    | 🔵 Blue  | `[INFO]`    |
| `logger.success()` | 🟢 Green | `[SUCCESS]` |
| `logger.error()`   | 🔴 Red   | `[ERROR]`   |

## API Reference

### `logger.info(message, font=None)`
Prints an informational message in **blue**.

### `logger.success(message, font=None)`
Prints a success message in **green**.

### `logger.error(message, font=None)`
Prints an error message in **red**.

**Parameters:**
- `message` *(str)* — The text to display.
- `font` *(str, optional)* — A Unicode font style name. See table above. Raises `ValueError` for unknown font names.

## Advanced: Custom Instance

You can also instantiate `TinyLogger` directly, or use the font converter on its own:

```python
from tinycolorlog.handler import TinyLogger, _convert_font

my_logger = TinyLogger()
my_logger.success("Custom logger works!", font="script")

# Convert text independently
print(_convert_font("hello world", "fraktur"))
# → 𝔥𝔢𝔩𝔩𝔬 𝔴𝔬𝔯𝔩𝔡
```

## License

MIT — see [LICENSE](LICENSE) for details.
