Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sepandhaghighi/csv2yaml
🔧 Quick & Easy CSV To JSON, YAML & Pickle Converter
https://github.com/sepandhaghighi/csv2yaml
conversion converter csv csv2json csv2pickle csv2yaml json json-data pickle python python3 script yaml
Last synced: 3 months ago
JSON representation
🔧 Quick & Easy CSV To JSON, YAML & Pickle Converter
- Host: GitHub
- URL: https://github.com/sepandhaghighi/csv2yaml
- Owner: sepandhaghighi
- License: mit
- Created: 2017-09-13T20:40:10.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-10-06T20:42:40.000Z (over 7 years ago)
- Last Synced: 2024-09-18T06:19:11.769Z (4 months ago)
- Topics: conversion, converter, csv, csv2json, csv2pickle, csv2yaml, json, json-data, pickle, python, python3, script, yaml
- Language: Python
- Homepage:
- Size: 331 KB
- Stars: 10
- Watchers: 3
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
CSV2YAML
Convert CSV File To JSON, YAML & Pickle
----------
## Installation
### Source Code
- Download [Version 0.2](https://github.com/sepandhaghighi/csv2yaml/archive/v0.2.zip) or [Latest Source ](https://github.com/sepandhaghighi/csv2yaml/archive/master.zip)
- `pip3 install -r requirements.txt` or `pip install -r requirements.txt` (Need root access)
- `python3 setup.py install` or `python setup.py install`### PyPI
- Check [Python Packaging User Guide](https://packaging.python.org/installing/)
- `pip install csv2yaml` or `pip3 install csv2yaml` (Need root access)
## Usage
### Command Line
- Run csv2yaml with file as argument `python3 -m csv2yaml file.csv header_optional` or `python -m csv2yaml file.csv header_optional` on Mac,Linux or Windows
- Run `python3 -m csv2yaml all header_optional` or `python -m csv2yaml all header_optional` to convert all csv files in folder
- Default Header : Filename
## Automated Build## Input File Format
```
Key1,Key2,...,KeyN
Value11,Value12,...,Value1N
.
.
.
ValueN1,ValueN2,...,ValueNN
```
## Output File Format- [JSON(.json)](https://en.wikipedia.org/wiki/JSON)
```
{
"header_name": {
"data":[
{
"id" : "1",
"Key1": "Value11",
"Key2": "Value12",
.
.
.
"KeyN": "Value1N"
},.
.
.{
"id" : "N",
"Key1": "ValueN1",
"Key2": "ValueN2",
.
.
.
"KeyN": "ValueNN"
},
]
}
}
```- [YAML(.yaml)](https://en.wikipedia.org/wiki/YAML)
```
header_name:
data:
- Key1: "Value11"
Key2: "Value12"
.
.
.
KeyN: "Value1N"
id : "1"
.
.
.- Key1: "ValueN1"
Key2: "ValueN2"
.
.
.
KeyN: "ValueNN"
id : "N"```
- [Pickle(.p)](https://docs.python.org/3.5/library/pickle.html) (Binary Format)
## TODO- [x] Formats
- [x] JSON
- [x] YAML
- [x] Pickle
## Issues & Bug Reports
Just fill an issue and describe it. We'll check it ASAP!
or send an email to [[email protected]](mailto:[email protected] "[email protected]").## Contribution
You can fork the repository, improve or fix some part of it and then send the pull requests back if you want to see them here. I really appreciate that. ❤️
Remember to write a few tests for your code before sending pull requests.
## Donate to our projectIf you feel like our project is important can you please support us?
Our project is not and is never going to be working for profit. We need the money just so we can continue doing what we do.Bitcoin :
```1XGr9qbZjBpUQJJSB6WtgBQbDTgrhPLPA```
Payping (For Iranian citizens) :
## License