Slide 1

Slide 1 text

Restructuring Data in Python Mahmoud Hashemi - PyCon 2018

Slide 2

Slide 2 text

“ Flat is better than nested. — Tim Peters PEP20 (The Zen of Python) 2

Slide 3

Slide 3 text

“ Namespaces are one honking great idea—let’s do more of those! — Also Tim Peters PEP20 (The Zen of Python) 3

Slide 4

Slide 4 text

4 ...

Slide 5

Slide 5 text

glom! Python’s nested data operator http:/ /github.com/mahmoud/glom 5

Slide 6

Slide 6 text

Path-based declarative access 6

Slide 7

Slide 7 text

Readable, meaningful error messages 7

Slide 8

Slide 8 text

Declarative data transformation 8

Slide 9

Slide 9 text

Features: ● Path-based access ● Declarative data transformation ● Readable, meaningful error messages ● Built-in data exploration and debugging ● Command-line tool ○ Like jq, but you no DSL, just Python 9

Slide 10

Slide 10 text

10 Thanks! pip install glom sedimental.org @mhashemi Open Session Tomorrow 5/12 at 4pm