diff --git a/README.md b/README.md index 15f227c..fffdbc8 100644 --- a/README.md +++ b/README.md @@ -50,14 +50,13 @@ botan.shortenUrl(uid, url, function (err, res, body) { ``` ## Python example -You need to install requests library to use python botan lib. -You can do it with +You need to install botanio library using pip. - pip install requests + pip install botanio Code: ```python - import botan + from botanio import botan botan_token = '.........' # Token got from @botaniobot uid = message.from_user diff --git a/python/__init__.py b/python/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/python/botanio/__init__.py b/python/botanio/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/botan.py b/python/botanio/botan.py similarity index 91% rename from botan.py rename to python/botanio/botan.py index 3c08ffc..98923cb 100644 --- a/botan.py +++ b/python/botanio/botan.py @@ -1,9 +1,6 @@ -# ---------------- -# dont forget 'pip install requests' first -# ---------------- # usage example: # -# import botan +# from botanio import botan # # print botan.track(1111, 1, {'text':2}, 'Search') diff --git a/test.py b/python/botanio/test.py old mode 100755 new mode 100644 similarity index 81% rename from test.py rename to python/botanio/test.py index 81d1785..23097e8 --- a/test.py +++ b/python/botanio/test.py @@ -1,5 +1,6 @@ #!/usr/bin/env python2 -import botan +from botanio import botan + print botan.track(1111, 1, {'text':2}, 'Search') print botan.track('ab', 1, {'text':2}, 'Search') diff --git a/python/setup.py b/python/setup.py new file mode 100644 index 0000000..5a003e8 --- /dev/null +++ b/python/setup.py @@ -0,0 +1,14 @@ +from setuptools import setup + +setup(name='botanio', + version='1.0.0', + description='Botan SDK: Advanced analytics for your Telegram bot', + url='https://github.com/botanio/sdk', + author='Botan.io team', + author_email='team@botan.io', + license='MIT', + packages=['botanio'], + install_requires=[ + 'requests', + ], + zip_safe=False)