From 4aa3b6711136fb0232bf149a64afa4b49c2b28f3 Mon Sep 17 00:00:00 2001 From: Marcus Kazmierczak Date: Sat, 4 Sep 2021 07:51:26 -0700 Subject: [PATCH] Add import in __init__.py to enable API Adds an import to the __init__.py to enable importing via API Props to @krazykoder Fixes #86 --- setup.py | 2 +- termgraph/__init__.py | 4 ++++ termgraph/termgraph.py | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 846fa07..bc1b66a 100644 --- a/setup.py +++ b/setup.py @@ -19,7 +19,7 @@ name='termgraph', packages=['termgraph'], entry_points={'console_scripts': ['termgraph=termgraph.termgraph:main']}, - version='0.5.2', + version='0.5.3', author="mkaz", author_email="marcus@mkaz.com", url='https://github.com/mkaz/termgraph', diff --git a/termgraph/__init__.py b/termgraph/__init__.py index e69de29..c52a28c 100644 --- a/termgraph/__init__.py +++ b/termgraph/__init__.py @@ -0,0 +1,4 @@ +import sys +from os.path import dirname +sys.path.append(dirname(__file__)) +from termgraph import * \ No newline at end of file diff --git a/termgraph/termgraph.py b/termgraph/termgraph.py index de828db..9facbdd 100755 --- a/termgraph/termgraph.py +++ b/termgraph/termgraph.py @@ -16,7 +16,7 @@ import os import re -VERSION = "0.5.2" +VERSION = "0.5.3" init()