Commits

Steve Losh committed f209856

Add packaging stuff.

Comments (0)

Files changed (4)

+Copyright (c) 2010 Steve Losh and contributors
+
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+
+python-dribbble is a simple Python library for interacting with [Dribbble][].
+It's [MIT/X11 licensed][license]. It requires [Python][] 2.5+.
+
+It was written in about half an hour, so don't expect miracles.
+
+Install it with [pip][]:
+
+    pip install -e hg+http://bitbucket.org/sjl/python-dribbble#egg=dribbble
+
+    ... or ...
+
+    pip install -e git+http://github.org/sjl/python-dribbble#egg=dribbble
+
+Use it:
+
+    import dribbble
+    d = dribbble.Dribbble()
+
+    print 'Shots from everyone'
+    for shot in d.shots():
+        print shot.title, shot.url
+
+    print 'Popular shots'
+    for shot in d.shots('popular'):
+        print shot.title, shot.url
+
+    steve = d.player('stevelosh')
+
+    print 'Shots from %s (%s):' % (steve.name, steve.location)
+    for shot in steve.shots():
+        print '    ', shot.title, shot.url
+
+    print 'Shots from players %s is following:' % steve.name
+    for shot in steve.shots_following():
+        print '    ', shot.title, shot.url
+
+[Dribbble]: http://dribbble.com/
+[license]: http://en.wikipedia.org/wiki/MIT_License
+[Python]: http://python.org/
+[pip]: http://pip.openplans.org/

dribbble/__init__.py

+from api import Dribbble
+import os
+from setuptools import setup, find_packages
+
+install_requires = []
+try:
+    import json
+except ImportError, e:
+    install_requires.append('simplejson')
+
+README_PATH = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'README.markdown')
+
+description = 'A Python interface to the dribbble.com API.'
+
+if os.path.exists(README_PATH):
+    long_description = open(README_PATH).read()
+else:
+    long_description = description
+
+setup(
+    name='dribbble',
+    version='0.0.1',
+    install_requires=install_requires,
+    description=description,
+    long_description=long_description,
+    author='Steve Losh',
+    author_email='steve@stevelosh.com',
+    url='http://bitbucket.org/sjl/python-dribbble/',
+    packages=['dribbble'],
+)