Skip to content

Commit 3d5bef4

Browse files
author
facetoe
committed
Add setup* for packaging with Pip
1 parent 3408ba7 commit 3d5bef4

File tree

3 files changed

+34
-3
lines changed

3 files changed

+34
-3
lines changed

setup.cfg

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[metadata]
2+
description-file = README.md

setup.py

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
from setuptools import setup
2+
import setuptools
3+
4+
5+
setup(
6+
name='zenpy',
7+
packages=setuptools.find_packages(),
8+
version='0.0.13',
9+
description='Python wrapper for the Zendesk API',
10+
long_description=open('README.md').read(),
11+
license='GPLv3',
12+
author='Face Toe',
13+
author_email='facetoe@facetoe.com.au',
14+
url='https://github.com/facetoe/zenpy',
15+
download_url='https://github.com/facetoe/zenpy/releases/tag/0.0.13',
16+
install_requires=[
17+
'requests',
18+
'python-dateutil',
19+
'cachetools'
20+
],
21+
keywords=['zendesk', 'api', 'wrapper'],
22+
classifiers=[
23+
'Development Status :: 3 - Alpha',
24+
'Intended Audience :: Developers',
25+
'Programming Language :: Python :: 2',
26+
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)'
27+
],
28+
)

zenpy/__init__.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@
44
from zenpy.lib.endpoint import Endpoint
55

66
log = logging.getLogger()
7-
log.setLevel(logging.DEBUG)
7+
log.setLevel(logging.INFO)
88
ch = logging.StreamHandler(sys.stdout)
9-
ch.setLevel(logging.DEBUG)
109
formatter = logging.Formatter('%(levelname)s - %(message)s')
1110
ch.setFormatter(formatter)
1211
log.addHandler(ch)
@@ -16,7 +15,9 @@
1615

1716

1817
class Zenpy(object):
19-
def __init__(self, subdomain, email, token):
18+
def __init__(self, subdomain, email, token, debug=False):
19+
if debug:
20+
log.setLevel(logging.DEBUG)
2021
endpoint = Endpoint()
2122
self.users = UserApi(
2223
subdomain,

0 commit comments

Comments
 (0)