semvec/pypi-packages huggingface dataset:
simple-file-utils 0.1.0
A beginner-friendly library for simplified file handling in Python.
License: MIT
Requires Python: >=3.8

# 📁 Simple File Utils

A lightweight Python library for simplified file handling operations.
It provides easy-to-use functions for working with text, CSV, JSON, and binary files.

### ✨ Features

- Read / Write / Append TXT files
- Read / Write / Append CSV files
- Read / Write JSON files
- Binary file support using pickle
- Utility helpers:
    - `exists()`
    - `delete()`
    - `file_size()`
    - `get_extension()`

---

### 📦 Installation

```bash
pip install simple-file-utils
```


### 🚀 Quickstart
```bash
import simple_file_utils as sfu
```
---

## 📄 TXT FILE FUNCTIONS

`write_txt(file_path, data)`

Writes text to a file (overwrites if it exists).

```bash
sfu.write_txt("example.txt", "Hello World")
```
---

`read_txt(file_path)`

Reads entire file content as a string.

```bash
content = sfu.read_txt("example.txt")
print(content)
```
---

`readlines_txt(file_path)`

Returns file content as a list of lines.

```bash
lines = sfu.readlines_txt("example.txt")
print(lines)
```
---

`append_txt(file_path, data)`

Appends text to an existing file.

```bash
sfu.append_txt("example.txt", "\nNew line added")
```
---

## 📊 CSV FILE FUNCTIONS
`write_csv(file_path, rows)`

Writes a list of rows to a CSV file.

```bash
rows = [
    ["Name", "Age"],
    ["John",18]
]
```

sfu.write_csv("data.csv", rows)
---

`read_csv(file_path)`

Reads CSV file and returns list of rows.

```bash
data = sfu.read_csv("data.csv")
print(data)
```
---

`append_csv(file_path, rows)`

Appends rows to an existing CSV file.

```bash
sfu.append_csv("data.csv", [["Alex", 22]])
```
---

## 🧾 JSON Functions
`write_json(file_path, data)`

Writes a dictionary or list to a JSON file.

```bash
user = {
    "name": "John",
    "age": 18
}

sfu.write_json("user.json", user)
```
---

`read_json(file_path)`

Reads JSON file and returns Python object.

```bash
data = sfu.read_json("user.json")
print(data)
```
---

## 💾 Binary Functions
`write_bin(file_path, data)`

Saves a Python object to a binary file.

```bash
numbers = [1, 2, 3, 4]
sfu.write_bin("numbers.bin", numbers)
```

`read_bin(file_path)`

Loads a Python object from a binary file.

```bash
numbers = sfu.read_bin("numbers.bin")
print(numbers)
```
---

## 🛠 Utility Functions
`exists(file_path)`

Checks if file exists.

```bash
print(sfu.exists("example.txt"))
```
---

`delete(file_path)`

Deletes a file.

```bash
sfu.delete("example.txt")
```
---

`file_size(file_path)`

Returns file size in bytes.

```bash
size = sfu.file_size("data.csv")
print(size)
```
---

`get_extension(file_path)`

Returns file extension in lowercase.

```bash
print(sfu.get_extension("data.csv"))   # .csv
```
---
## 🎯 Why Use This Library?

- Reduces repetitive file-handling boilerplate
- Beginner-friendly and easy to understand
- Clean and readable function names
- Great for small scripts and learning projects
rkt-tool-lib 2.0.3
RootKit custom tool Lib
License: MIT
Requires Python: >=3.7

# rkt_tool_lib

Cross-platform file system utilities.

## Features
- **Path Normalization**: Automatically formats paths (`/` vs `\`) based on the operating system (Windows/Linux).
- **Recursive Search**: Utilities to find directories deeply nested in the file system.
- **Singleton Pattern**: (Optional usage via `Singleton` metaclass provided).

## Usage

```python
from tool import Tool

t = Tool()

# Get current working directory formatted for OS
cwd = t.get_cwd()

# Find a directory named 'logs' recursively
log_path = t.get_dir("logs")
```
rkt-logger-lib 2.0.3
RootKit custom logging Lib
License: MIT
Requires Python: >=3.7

# rkt_logger_lib

Advanced Logging overlay implementing the Singleton pattern.

## Features
- **Centralized Management**: Manages multiple loggers and handlers from a single instance.
- **Dual Output**: Easy configuration for file logging, stream (console) logging, or both.
- **Filtered Streams**:
    - `stdout`: INFO, DEBUG, WARNING
    - `stderr`: ERROR, CRITICAL
- **Automatic Organization**: Creates and manages log directories and daily log files.

## Usage

```python
from logger import Logger

log = Logger(caller_class="MyApp")

# Add a message
log.add(caller="MyApp", message="Application started", level="INFO")

# Create a specialized logger for a sub-module
log.set_logger(caller_class="DatabaseModule", level="DEBUG")
log.add(caller="DatabaseModule", message="Connection established", level="DEBUG")
```
rkt-lib-toolkit 2.0.3
RootKit custom Lib (Meta-Package)
License: MIT
Requires Python: >=3.9

# Rkt Lib Toolkit

**Rkt Lib Toolkit** est un méta-paquet qui installe l'ensemble de la suite d'outils RootKit.

## Description

Ce paquet regroupe les bibliothèques suivantes :
- [`rkt_tool_lib`](https://pypi.org/project/rkt-tool-lib/) : Outils génériques et utilitaires.
- [`rkt_logger_lib`](https://pypi.org/project/rkt-logger-lib/) : Système de journalisation (logging) personnalisé.
- [`rkt_config_lib`](https://pypi.org/project/rkt-config-lib/) : Gestion de configuration (basé sur PyYAML).
- [`rkt_ai_lib`](https://pypi.org/project/rkt-ai-lib/) : Bibliothèque IA (Apprentissage par renforcement - Qlearning).

## Installation

Pour installer la suite complète :

```bash
pip install rkt_lib_toolkit
```

## Utilisation

L'installation de ce paquet rend toutes les sous-bibliothèques disponibles dans votre environnement.

```python
import rkt_tool_lib
import rkt_logger_lib
# ...
```
rkt-config-lib 2.0.3
RootKit custom PyYaml Lib
License: MIT
Requires Python: >=3.7

# rkt_config_lib

Centralized Configuration Management wrapper around PyYaml.

## Features
- **Singleton Pattern**: Ensures a single configuration state across your application.
- **Auto-Loading**: Automatically scans and loads all YAML files in a `config/` directory.
- **Safe Loading**: Uses `yaml.safe_load` by default to prevent arbitrary code execution vulnerabilities.
- **Integrated Logging**: Logs loading operations via `rkt_logger_lib`.

## Usage

```python
from config import Config

conf = Config()
# Loads all .yml/.yaml files from ./config/ directory
conf.get_data()

# Access data (filename becomes the key)
my_settings = conf.data.get("settings")
```
rkt-ai-lib 2.0.3
RootKit AI Lib (RL - Qlearning)
License: MIT
Requires Python: >=3.9

# rkt_ai_lib

Reinforcement Learning (Q-Learning) library with interchangeable backends.

## Features
- **Q-Learning Implementation**: Standard Q-Learning algorithm with epsilon-greedy exploration.
- **Interchangeable Backends**:
    - `pandas` (default): Robust DataFrame-based storage.
    - `numpy`: High-performance array-based storage.
    - `dict`: Simple in-memory storage (JSON serializable).
- **Secure Persistence**: Options to save/load Q-tables using **JSON** (safe) or Pickle (fast).
- **Flexible**: Configurable learning rate (alpha), discount factor (gamma), and exploration rate (epsilon).

## Usage

```python
from ai import QLearning

# Initialize agent
actions = ["up", "down", "left", "right"]
ai = QLearning(actions=actions, backend="pandas")

# Learning step
state = "state_1"
action = ai.choose_action(state)
reward = 1.0
ai.learn(state, action, reward)

# Save safely
ai.save("qtable.json", format="json")
```