RepositoryPythonUSHoa Kỳ
mahmoud

mahmoud/glom

☄️ Python's nested data operator (and CLI), for all your declarative restructuring needs. Got data? Glom it! ☄️

2.2ksao
95fork
102issue
0lượt xem

Thành tựu nổi bật

Những danh hiệu mới nhất của dự án

1
TINIX TRENDING·Chủ đề: data-transformation

#1 Repository Của Tuần

1
TINIX TRENDING·Chủ đề: utilities

#1 Repository Của Tuần

1
TINIX TRENDING·Chủ đề: recursion

#1 Repository Của Tuần

☄️ glom: Toán tử dữ liệu lồng nhau đậm chất Python

Khi dữ liệu lồng nhau, hãy dùng glom!

glom là một thư viện Python khai báo mạnh mẽ để truy cập và biến đổi cấu trúc dữ liệu lồng nhau như dict, list, object. Thay vì viết nhiều dòng code lồng nhau, bạn chỉ cần định nghĩa một "spec" (đường dẫn) để glom tìm và chuyển đổi dữ liệu.

✨ Điểm nổi bật

  • Truy cập theo đường dẫn: Dùng chuỗi như 'a.b.c' thay thế cho data['a']['b']['c'].
  • Thông báo lỗi rõ ràng: Lỗi PathAccessError cho biết chính xác vị trí và giá trị gây lỗi.
  • Biến đổi khai báo: Dùng spec Pythonic để ánh xạ, lọc, gộp dữ liệu mà không cần viết vòng lặp.
  • CLI đi kèm: Dùng lệnh glom ngay trên terminal để thử nghiệm hoặc xử lý JSON/YAML/TOML nhanh.
  • Hỗ trợ đa định dạng nguồn: Đọc target từ file JSON, Python, TOML, YAML.
  • Chế độ debug/interactive: --debug và --inspect giúp khám phá dữ liệu và dò lỗi trực tuyến.
  • Pure Python, được kiểm thử rộng rãi: Chạy trên Python 3.7–3.14 và PyPy3.

💡 Vì sao đáng chú ý

glom khác biệt nhờ cách tiếp cận khai báo thay vì thủ tục. Thay vì phải viết từng bước truy cập lồng nhau (dễ lỗi, khó đọc), bạn mô tả ý định một cách ngắn gọn và để glom xử lý. Đặc biệt hữu ích khi xử lý API trả về cấu trúc phứp tạp hoặc cần tái cấu trúc dữ liệu cho báo cáo, ETL nhẹ, hoặc khám phá dữ liệu nhanh trên CLI.


#Python #DataTransformation #CLI #OpenSource #TiniX

Dự án tương tự

Khám phá các dự án và mô hình AI khác có sự tương đồng.

RepositoryPython
yt-dlp/yt-dlp

A feature-rich command-line audio/video downloader

202.5k
Oct 23, 2026
RepositoryPython
public-apis/public-apis

A collective list of free APIs

492.4k
Oct 24, 2026
RepositoryPython
TheAlgorithms/Python

All Algorithms implemented in Python

225.5k
Oct 20, 2026
RepositoryPython
521xueweihan/HelloGitHub

:octocat: 分享 GitHub 上有趣、入门级的开源项目。Share interesting, entry-level open source projects on GitHub.

184.7k
Sep 28, 2026
RepositoryPython
donnemartin/system-design-primer

Learn how to design large-scale systems. Prep for the system design interview. Includes Anki flashcards.

375.7k
Sep 15, 2026
RepositoryPython
vinta/awesome-python

The definitive list that answers "I want to do X in Python, which tool should I use?"

330.4k
Oct 26, 2026
RepositoryPython
practical-tutorials/project-based-learning

Curated list of project-based tutorials

288.1k
Oct 26, 2026
RepositoryPython
Significant-Gravitas/AutoGPT

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.

187.7k
Oct 24, 2026
RepositoryPython
langgenius/dify

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

159.6k
Oct 26, 2026