Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/thulio/dict-to-csv

dict-to-csv transforms nested Python dictionaries into CSV lines.
https://github.com/thulio/dict-to-csv

csv csv-lines json python python-library python2 python3

Last synced: 2 months ago
JSON representation

dict-to-csv transforms nested Python dictionaries into CSV lines.

Awesome Lists containing this project

README

        

# dict-to-csv

[![Build Status](https://travis-ci.org/thulio/dict-to-csv.svg?branch=master)](https://travis-ci.org/thulio/dict-to-csv)

dict-to-csv transforms nested Python dictionaries into CSV lines.

Example:

```json
[{
"customer": {
"name": "John",
"address": {
"street": "Street 1",
"number": "42"
}
},
"product": {
"sku": "1",
"price": 9.99
}
},
{
"customer": {
"name": "Bob",
"address": {
"street": "Street 2",
"number": "314"
}
},
"product": {
"sku": "2",
"price": 15.00
}
}
]
```

```csv
customer.address.number,customer.address.street,customer.name,product.price,product.sku
42,Street 1,John,9.99,1
314,Street 2,Bob,15.0,2
```