File tree Expand file tree Collapse file tree 6 files changed +42
-25
lines changed
Expand file tree Collapse file tree 6 files changed +42
-25
lines changed Original file line number Diff line number Diff line change 1+ include LICENSE *.md *.rst
2+
3+ # Tests
4+ include tox.ini .coveragerc conftest.py *-requirements.txt
5+ recursive-include tests *.py
6+ exclude .travis.yml
Original file line number Diff line number Diff line change 11[metadata]
2- description-file = README.md
2+ description-file = README.md
3+ license-file = LICENSE
4+
5+ [bdist_wheel]
6+ universal = 1
Original file line number Diff line number Diff line change 1- #!/usr/bin/env python
1+ """A library that provides a Python interface to the Zillow API."""
22
3-
4- """
5- A library that provides a Python interface to the Zillow API
6- """
73from __future__ import absolute_import
84
5+ import os as _os
6+ import pkg_resources as _pkg_resources
7+
8+ from .error import ZillowError # noqa: F401
9+ from .place import Place # noqa: F401
10+ from .api import ValuationApi # noqa: F401
11+
12+
913__author__ = 'python-zillow@googlegroups.com'
10- __version__ = '0.1'
1114
1215
13- from .error import ZillowError
14- from .place import Place
15- from .api import ValuationApi
16+ try :
17+ _dist = _pkg_resources .get_distribution ('python-' + __package__ )
18+ if not _os .path .abspath (__file__ ).startswith (
19+ _os .path .join (_dist .location , __package__ )):
20+ # Manually raise the exception if there is a distribution but
21+ # it's installed from elsewhere.
22+ raise _pkg_resources .DistributionNotFound
23+ except _pkg_resources .DistributionNotFound :
24+ __version__ = 'development'
25+ else :
26+ __version__ = _dist .version
Original file line number Diff line number Diff line change 1- from zillow import ( __author__ , ZillowError , Place )
1+ import requests
22import xmltodict
33
4- import requests
54try :
6- # python 3
7- from urllib .parse import urlparse , urlunparse , urlencode
8- from urllib .request import urlopen
9- from urllib .request import __version__ as urllib_version
5+ # python 3
6+ from urllib .parse import urlparse , urlunparse , urlencode
107except ImportError :
11- from urlparse import urlparse , urlunparse
12- from urllib2 import urlopen
13- from urllib import urlencode
14- from urllib import __version__ as urllib_version
8+ from urlparse import urlparse , urlunparse
9+ from urllib import urlencode
10+
11+ from .error import ZillowError
12+ from .place import Place
1513
1614
1715class ValuationApi (object ):
Original file line number Diff line number Diff line change 1- #!/usr/bin/env python
2-
31class ZillowError (Exception ):
4- """Base class for Twitter errors"""
2+ """Base class for Zillow errors"""
53
64 @property
75 def message (self ):
86 """
97 :return: The first argument used to construct this error.
108 """
11- return self .args [0 ]
9+ return self .args [0 ]
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ def set_data(self, source_data):
1414 @abstractmethod
1515 def debug (self ):
1616 for i in self .__dict__ .keys ():
17- print ("%s: %s" % (i , self .__dict__ [i ]))
17+ print ("%s: %s" % (i , self .__dict__ [i ]))
1818
1919 @abstractmethod
2020 def get_dict (self ):
You can’t perform that action at this time.
0 commit comments