semvec/pypi-packages huggingface dataset:
tablexpy 0.1.0
A simple Python library to convert between CSV, JSON, and Excel easily.
License: MIT
Requires Python: >=3.7

# TableX

TableX is a simple and powerful Python library to seamlessly convert
between **CSV**, **Excel**, and **JSON** formats.\
It also provides utilities like **pretty-printing JSON**,
**flattening/unflattening JSON**, and more.

------------------------------------------------------------------------

## Features

-   📑 Convert between **CSV ↔ JSON ↔ Excel**
-   🎯 Easy-to-use, minimal code required
-   ⚡ Lightweight & fast
-   🛠️ Utility functions for JSON pretty printing and flattening

------------------------------------------------------------------------

## Installation

``` bash
pip install tablex
```

------------------------------------------------------------------------

## Example Usage

``` python
from tablex import TableX

# ---------------- CSV <-> JSON ----------------

# Convert CSV → JSON
records = TableX.csv_to_json(
    csv_file="students.csv",
    json_file="students.json",
    pretty=True,
    indent=2
)

# Convert JSON → CSV
TableX.json_to_csv(
    json_file="students.json",
    csv_file="students_converted.csv"
)


# ---------------- Excel <-> JSON ----------------

# Convert Excel → JSON
records = TableX.excel_to_json(
    excel_file="results.xlsx",
    json_file="results.json",
    sheet_name="result sheet",
    pretty=True,
    indent=4
)

# Convert JSON → Excel
TableX.json_to_excel(
    json_file="results.json",
    excel_file="results_converted.xlsx"
)


# ---------------- CSV <-> Excel ----------------

# Convert CSV → Excel
TableX.csv_to_excel(
    csv_file="students.csv",
    excel_file="students.xlsx"
)

# Convert Excel → CSV
TableX.excel_to_csv(
    excel_file="results.xlsx",
    csv_file="results_converted.csv",
    sheet_name="result sheet"
)


# ---------------- Utility functions ----------------

# Pretty-print JSON file to console
TableX.pretty_print_json("students.json")

# Flatten JSON into a single dictionary (dot notation)
flat = TableX.flatten_json("students.json")
print(flat)
# Example: {"user.name": "Alice", "user.age": 25, "user.skills.0": "Python"}

# Unflatten dictionary back into JSON
unflat = TableX.unflatten_json(flat)
print(unflat)
# Example: {"user": {"name": "Alice", "age": 25, "skills": ["Python"]}}
```

------------------------------------------------------------------------

## License

MIT License © 2025
python-stl-example 0.0.1.post2
A extended STL library
License: MIT
Requires Python: >=3.5

# python_stl_example

## 一个STL扩展库

Python要求：版本≥3.5.0

## 安装方法（重点！！！）
1. 在cmd中使用`pip install python_stl_example`下载安装
2. 在PYPI网站中下载：
   - 可下载.whl文件，在下载目录的cmd中输入`pip install 文件名.whl`安装
   - 可下载压缩包，解压后在当前目录的cmd中输入`python setup.py install`安装

## 项目分支
1. **vector**
   - 模拟向量STL结构的`vector`，提供类似函数接口。

2. **deque**
   - 模拟双向队列STL结构的`deque`，提供类似函数接口。

3. **list**
   - 模拟单向和双向链表STL结构的`list`，提供类似函数接口。

4. **set**
   - 模拟集合STL结构的`set`，提供类似函数接口。

5. **stack**
   - 模拟栈STL结构的`stack`，提供类似函数接口。

## 异常处理
- 内置`decorate`装饰器，为各类函数提供统一的异常处理机制，支持日志记录、异常抑制、返回默认值等功能，增强代码的健壮性。

## 使用示例
```python
# 栈演示
from python_stl_example import stack

s = stack((1, 2, 3, 4), int)
s.push(5)
print(s.top()) # 输出：5

s.pop()
s.pop()
s.pop()
s.pop()
print(s.top()) # 输出：1
```