Metadata-Version: 2.1
Name: excel2json-3
Version: 0.1.5
Summary: Convert Excel Sheet into JSON file.
Home-page: https://github.com/toransahu/excel2json-3
Author: Toran Sahu
Author-email: toran.sahu@yahoo.com
License: Distributed under terms of the AGPL license.
Keywords: excel to json,xlsx to json,xls to json,xlsx,xls,json
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)
Classifier: Operating System :: OS Independent
Classifier: Topic :: Internet :: WWW/HTTP :: Indexing/Search
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: System :: Archiving :: Packaging
Classifier: Topic :: Text Processing
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: System Administrators
Classifier: Intended Audience :: End Users/Desktop
Classifier: Intended Audience :: Information Technology
Classifier: Natural Language :: English
Description-Content-Type: text/markdown
Requires-Dist: xlrd
Requires-Dist: openpyxl
Requires-Dist: requests

# Excel to JSON Converter
[![Build Status](https://travis-ci.org/toransahu/excel2json-3.svg?branch=master)](https://travis-ci.org/toransahu/excel2json-3)
[![PyPI version](https://badge.fury.io/py/excel2json-3.svg)](https://badge.fury.io/py/excel2json-3)
![Python Version](https://img.shields.io/badge/python-3%2C%203.6-yellow.svg)
[![Say Thanks](https://img.shields.io/badge/Say%20Thanks-!-1EAEDB.svg)](https://saythanks.io/to/toransahu)

A minimal API that converts MS Excel (.xls & .xlsx) files, or from a given URL into JSON files.

## Features
- Download as package using [`pip`](https://pypi.org/project/pip/) and use in your code. 
- Supports both type of MS Excel file formats
    - MS Excel 2003 (.xls)
    - MS Excel 2007 (.xlsx)

- It also comes with command line interface (CLI) which facilitates the conversion from URL or local MS Excel file to JSON files.

    Example:

    - GET file from URL & convert to JSON.
    ```bash
    excel2json-3 --urls https://example.com/example.xls
    ```

    - GET file from disk & convert to JSON.
    ```bash
    excel2json-3 --file /home/ubuntu/Documents/example.xlsx
    ```


## Contribution
You can contribute in following ways:

- Report bugs
- Add more "APIs" 
- Give suggestions to make it better
- Fix issues & submit a pull request
## Installation

### Using [`pipenv`](https://pypi.org/project/pipenv/) (Recommended)

```bash
pipenv install excel2json-3
```

### Using [`pip`](https://pypi.org/project/pip/)

```bash
pip install excel2json-3
```

## Uses

### Convert MS Excel File to JSON file

```python
from excel2json import convert_from_file


EXCEL_FILE = '../example.xls'  # or '../example.xlsx'
convert(EXCEL_FILE)
```
### Convert to JSON file directly from URL 

```python
from excel2json import convert_from_url


EXCEL_FILE_URL = 'https://www.example.com/example.xlsx'
convert(EXCEL_FILE_URL)
```
# DEVELOPEMENT

## Pre-requisites
1. Python 3

## Create Virtual Enviroment

### Using [`pipenv`](https://pypi.org/project/pipenv/) (Recommended)

1. Install pipenv
    ```
    pip install pipenv
    ```
2. Create env
    ```
    cd excel2json-3  # cd <repo_dir>
    pipenv --three install
    ```

3. Activate env
    ```
    pipenv shell
    ```

4. Install requirements from Pipefile
    ```
    pipenv sync
    ```

### Using [`virtualenv`](https://pypi.org/project/virtualenv/)

1. Install virtualenv

    ```
    pip install virtualenv
    ```
2. Create virtualenv

    ```
    mkdir myvenv
    cd myvenv
    virtualenv myvenv
    ```

3. Activate `myvenv` venv
    ```
    source myvenv/bin/activate

    or 

    . myvenv/bin/activate
    ```

4. Install from requirements.txt
    ```
    pip install -r requirements.txt
    ```

# Testing
    ```
    pytest tests/test.py
    ``` 


