Metadata-Version: 2.4
Name: sylriekit
Version: 0.42.1
Summary: A personal Python toolbox of utilities.
Author: Kasterfly
License-Expression: MIT
Requires-Python: >=3.14
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests
Requires-Dist: PyYAML
Requires-Dist: psutil
Requires-Dist: scapy
Requires-Dist: Nuitka
Dynamic: license-file

# Sylriekit

A versatile Python utility kit designed to accelerate the development of personal projects. It provides a collection of modular tools for common tasks, ranging from file management and logging to GUI development and LLM integration.

---

## Disclaimer

**Warning**: This is a personal kitchen-sink project. It is mainly coded for convenience and rapid prototyping over peak optimization. Features may be incomplete or experimental. Use at your own risk.

---

## Installation

```bash
pip install sylriekit
```

---

## Tool Reference

| Tool | Type | Description                                                                                          |
| :--- | :--- |:-----------------------------------------------------------------------------------------------------|
| **LLM** | Normal | Multi-provider single-chat client (Anthropic, OpenAI, Google, etc.) with tool calling and streaming. |
| **ThreadedLLM** | Normal | `LLM` subclass that runs sends on a background worker thread and delivers results via callbacks.      |
| **Background** | Normal | Launch detached background processes that survive the script exiting, and stop/list them later (even from another run). |
| **Archive** | Normal | Create, extract, inspect, and validate `.tar.zst` archives. |
| **Logging** | Normal | Tiny timestamped file logger with `log()` and an `auto()` function-call decorator. |
| **StaticUtils** | Static | Small static helpers: `Cache.ttl()`, `Timeout.ttl()`, and extension-aware `Files.read()` / `Files.write()`. |
| **Network** | Static | Simple TCP/UDP senders, UDP broadcast, decorator listeners, and public/LAN IP helpers. |
| **NetworkDiagnosis** | Normal | PID-aware connection tracker, new-PID watcher, TCP port scanner, and network event/message recorder. |
| **PythonMeta** | Static | Collect Python project metadata, definitions, imports, line counts, complexity, and syntax errors without executing source. |
| **Compiler** | Static | Compile scripts with Nuitka as a one-file executable, bundled/external-data executable, or standalone folder. |

---

## Change Log
### 0.42.1
- **LLM**: added opt-in prompt caching via `use_prompt_caching()`, `supports_prompt_caching()`, and `get_last_usage()` (plus `PROMPT_CACHING`/`PROMPT_CACHE_TTL` config keys); Anthropic and OpenRouter/Kilocode receive native `cache_control` breakpoints on the tools/system prefix and last message, while other providers cache server-side automatically — also works with `ThreadedLLM`

### 0.42.0
- **Compiler**: build methods now accept `extra_flags` and `target_dir`, and every build disables Nuitka's `self-execution` deployment guard so a compiled CLI with its own `-c` flag no longer aborts at runtime
- **Background**: `start()` now accepts an `env=` override plus a new `ENV` config key, and strips inherited `NUITKA_ONEFILE_*` markers so a compiled one-file app can detach another one-file binary without it dying silently
- **StaticUtils**: `Files.read()` gained `strict=` (raise instead of `None` on an unreadable/corrupt file), new `Files.parse()` parses a YAML/JSON/TOML/CSV string in memory, new `Files.append()` appends text, and `Files.write()` is now atomic
- **ThreadedLLM**: added an `on_error()` callback and now passes the request id to handlers that accept a second argument, so replies and failures can be matched to the originating send
- **Archive**: `create()` gained a `root_name` option to set a fixed top-level folder (or `""` to drop the common root)
- **PythonMeta**: function/method entries now include an `is_dunder` flag to distinguish dunders from ordinary leading-underscore names

### 0.41.0
- **Compiler**: new Nuitka wrapper for one-file, bundled/external-data, and standalone-folder builds; Scapy and Nuitka are now required dependencies

### 0.40.0
- **LLM**: added chainable `LLMPrompt` image/audio/video inputs, persistent text/multimodal system prompts, provider-specific formatting, and model capability validation; also works with `ThreadedLLM`

### 0.39.0
- **PythonMeta**: new static Python project mapper with file/project summaries, source definitions, imports, line metrics, complexity, syntax errors, JSON reports, and virtual-environment exclusions

### 0.38.0
- **NetworkDiagnosis**: new PID-aware network diagnosis tool with `start()`, `stop()`, `add()`, `drop()`, `@OnNewPID()`, `connections()`, `messages()`, `scan()`, and `save()`; packet capture uses Scapy when enabled

### 0.37.0
- **Network**: new simple network helper with `TCP()`, `UDP()`, `UDP_Broadcast()`, `@listen()`, `GetPublicIP()`, and `GetLANIP()`; packet capture/diagnostics intentionally left for a separate tool

> Previous change log entries are available in the description of older versions.
