From fac3c0b81aa9903f749226f30e3b29560310434d Mon Sep 17 00:00:00 2001 From: zWaR Date: Fri, 9 Feb 2018 02:46:11 +0000 Subject: [PATCH] v1.0.1 --- README.rst | 4 ++-- csv2json/__init__.py | 5 +++++ {src => csv2json}/csv2json.py | 0 {src => csv2json}/main.py | 0 setup.py | 6 +++--- 5 files changed, 10 insertions(+), 5 deletions(-) create mode 100644 csv2json/__init__.py rename {src => csv2json}/csv2json.py (100%) rename {src => csv2json}/main.py (100%) diff --git a/README.rst b/README.rst index c25c50a..26e0cad 100644 --- a/README.rst +++ b/README.rst @@ -36,9 +36,9 @@ Usage Module can also be imported to your source code:: - import Src2Json + import csv2json - Src2Json().run( + csv2json.run( csv_file_path: str, json_file_path: str, has_header: bool = False, diff --git a/csv2json/__init__.py b/csv2json/__init__.py new file mode 100644 index 0000000..376b9c1 --- /dev/null +++ b/csv2json/__init__.py @@ -0,0 +1,5 @@ +from .csv2json import Csv2Json + +def run(*args, **kwargs): + obj = Csv2Json() + obj.run(*args, **kwargs) diff --git a/src/csv2json.py b/csv2json/csv2json.py similarity index 100% rename from src/csv2json.py rename to csv2json/csv2json.py diff --git a/src/main.py b/csv2json/main.py similarity index 100% rename from src/main.py rename to csv2json/main.py diff --git a/setup.py b/setup.py index f098e68..56421fd 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ setup( name="csv2json", - version="1.0.0", + version="1.0.1", description="A tool for csv to json file conversion", author="zWaR", author_email="zwar@sharklasers.com", @@ -13,7 +13,7 @@ "Programming Language :: Python :: 3.6" ], keywords="csv json conversion tool", - packages=["src"], + packages=["csv2json"], setup_requires=["pytest-runner"], tests_require=["pytest", "pytest-cov", "pyfakefs", "pytest-mypy"], url="https://github.com/zWaR/csv2json", @@ -24,7 +24,7 @@ }, entry_points={ "console_scripts": [ - "csv2json = src.main:main" + "csv2json = csv2json.main:main" ] } )