Skip to content

Commit 4186a28

Browse files
author
Alex Schworer
committed
add __version__ to package
1 parent cbc9357 commit 4186a28

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

zencoder/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,6 @@
22
from core import ZencoderResponseError
33

44
from core import Account
5+
6+
from core import __version__
7+

zencoder/core.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
from urllib import urlencode
44
from datetime import datetime
55

6-
LIB_VERSION = '0.5.2'
7-
86
# Note: I've seen this pattern for dealing with json in different versions of
97
# python in a lot of modules -- if there's a better way, I'd love to use it.
108
try:
@@ -21,6 +19,8 @@
2119
from django.utils import simplejson
2220
json = simplejson
2321

22+
__version__ = '0.5.2'
23+
2424
class ZencoderError(Exception):
2525
pass
2626

@@ -67,7 +67,7 @@ def headers(self):
6767
'Content-Type': 'application/{0}'.format(content_type),
6868
'Accept': 'application/{0}'.format(content_type),
6969
'Zencoder-Api-Key': self.api_key,
70-
'User-Agent': 'zencoder-py v{0}'.format(LIB_VERSION)
70+
'User-Agent': 'zencoder-py v{0}'.format(__version__)
7171
}
7272

7373
return headers

0 commit comments

Comments
 (0)