All Projects → mahmoud → Glom

mahmoud / Glom

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

Programming Languages

python
139335 projects - #7 most used programming language
declarative
70 projects

Projects that are alternatives of or similar to Glom

Pipedream
Connect APIs, remarkably fast. Free for developers.
Stars: ✭ 2,068 (+54.21%)
Mutual labels:  apis, cli, data
microlibs-scala
No description or website provided.
Stars: ✭ 24 (-98.21%)
Mutual labels:  utilities, recursion
N8n
Free and open fair-code licensed node based Workflow Automation Tool. Easily automate tasks across different services.
Stars: ✭ 19,252 (+1335.65%)
Mutual labels:  apis, cli
Tqdm
A Fast, Extensible Progress Bar for Python and CLI
Stars: ✭ 20,632 (+1438.55%)
Mutual labels:  cli, utilities
Gopherlabs
Go - Beginners | Intermediate | Advanced
Stars: ✭ 205 (-84.71%)
Mutual labels:  cli, data
Gitlab Cli
Create a merge request from command line in gitlab
Stars: ✭ 224 (-83.3%)
Mutual labels:  cli, utilities
Haxor News
Browse Hacker News like a haxor: A Hacker News command line interface (CLI).
Stars: ✭ 3,342 (+149.22%)
Mutual labels:  cli, utilities
Fontfor
Find fonts which can show a specified character and preview them in terminal or browser.
Stars: ✭ 118 (-91.2%)
Mutual labels:  cli, utilities
J
❌ Multi-format spreadsheet CLI (now merged in http://github.com/sheetjs/js-xlsx )
Stars: ✭ 343 (-74.42%)
Mutual labels:  cli, data
Yaspin
A lightweight terminal spinner for Python with safe pipes and redirects 🎁
Stars: ✭ 413 (-69.2%)
Mutual labels:  cli, utilities
Airshare
Cross-platform content sharing in a local network
Stars: ✭ 497 (-62.94%)
Mutual labels:  cli, utilities
Csv2ofx
A Python library and command line tool for converting csv to ofx and qif files
Stars: ✭ 133 (-90.08%)
Mutual labels:  cli, data
Riko
A Python stream processing engine modeled after Yahoo! Pipes
Stars: ✭ 1,571 (+17.15%)
Mutual labels:  cli, data
Samples Viewer Generator
🎉 A CLI utility tool to generate web app of data visualization samples for presentation purpose
Stars: ✭ 13 (-99.03%)
Mutual labels:  cli, data
Best Of Python
🏆 A ranked list of awesome Python open-source libraries and tools. Updated weekly.
Stars: ✭ 1,869 (+39.37%)
Mutual labels:  cli, utilities
Pycycle
Tool for pinpointing circular imports in Python. Find cyclic imports in any project
Stars: ✭ 278 (-79.27%)
Mutual labels:  cli, utilities
Anon
A UNIX Command To Anonymise Data
Stars: ✭ 341 (-74.57%)
Mutual labels:  cli, data
Saws
A supercharged AWS command line interface (CLI).
Stars: ✭ 4,886 (+264.35%)
Mutual labels:  cli, utilities
Geeksforgeeks Dsa 2
This repository contains all the assignments and practice questions solved during the Data Structures and Algorithms course in C++ taught by the Geeks For Geeks team.
Stars: ✭ 53 (-96.05%)
Mutual labels:  recursion, data
Lab
lab is a cli client of gitlab like hub
Stars: ✭ 94 (-92.99%)
Mutual labels:  cli

glom

Restructuring data, the Python way

Real applications have real data, and real data nests. Objects inside of objects inside of lists of objects.

glom is a new and powerful way to handle real-world data, featuring:

  • Path-based access for nested data structures
  • Readable, meaningful error messages
  • Declarative data transformation, using lightweight, Pythonic specifications
  • Built-in data exploration and debugging features

All of that and more, available as a fully-documented, pure-Python package, tested on Python 2.7-3.7, as well as PyPy. Installation is as easy as:

  pip install glom

And when you install glom, you also get the glom command-line interface, letting you experiment at the console, but never limiting you to shell scripts:

Usage: glom [FLAGS] [spec [target]]

Command-line interface to the glom library, providing nested data access and data
restructuring with the power of Python.

Flags:

  --help / -h                     show this help message and exit
  --target-file TARGET_FILE       path to target data source (optional)
  --target-format TARGET_FORMAT   format of the source data (json or python) (defaults
                                  to 'json')
  --spec-file SPEC_FILE           path to glom spec definition (optional)
  --spec-format SPEC_FORMAT       format of the glom spec definition (json, python,
                                  python-full) (defaults to 'python')
  --indent INDENT                 number of spaces to indent the result, 0 to disable
                                  pretty-printing (defaults to 2)
  --debug                         interactively debug any errors that come up
  --inspect                       interactively explore the data

Anything you can do at the command line readily translates to Python code, so you've always got a path forward when complexity starts to ramp up.

Examples

Without glom

>>> data = {'a': {'b': {'c': 'd'}}}
>>> data['a']['b']['c']
'd'
>>> data2 = {'a': {'b': None}}
>>> data2['a']['b']['c']
Traceback (most recent call last):
...
TypeError: 'NoneType' object is not subscriptable

With glom

>>> glom(data, 'a.b.c')
'd'
>>> glom(data2, 'a.b.c')
Traceback (most recent call last):
...
PathAccessError: could not access 'c', index 2 in path Path('a', 'b', 'c'), got error: ...

Learn more

If all this seems interesting, continue exploring glom below:

All of the links above are overflowing with examples, but should you find anything about the docs, or glom itself, lacking, please submit an issue!

In the meantime, just remember: When you've got nested data, glom it! ☄️

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].