diff --git a/CONTRIBUTORS b/CONTRIBUTORS index b2e719d..5149836 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -1,6 +1,7 @@ -Tyler G. Hicks-Wright -Luke Granger-Brown -Marwan Rabbâa -Amadeusz Deutry -Jakub Kulík -Carlos Muñoz Diaz \ No newline at end of file +Tyler G. Hicks-Wright +Luke Granger-Brown +Marwan Rabbâa +Amadeusz Deutry +Jakub Kulík +Carlos Muñoz Diaz +Peter Åslund diff --git a/setup.py b/setup.py index 4fb1426..38e8092 100644 --- a/setup.py +++ b/setup.py @@ -6,54 +6,64 @@ name='trello', version='0.9.7', packages=['trello'], - license=dedent(""" - Redistribution and use in source and binary forms, with or without modification, - are permitted provided that the following conditions are met: - - Redistributions of source code must retain the above copyright notice, this list - of conditions and the following disclaimer. Redistributions in binary form must - reproduce the above copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided with the - distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR - ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - """), + license='3-Clause BSD License (https://opensource.org/licenses/BSD-3-Clause)', description='Python library for interacting with the Trello API', long_description=dedent(""" Python Trello API Wrapper + ========================= + + This library is a Python wrapper around the [Trello](https://trello.com/) REST API. + + Requires Python 3.6 or later. + + If you wish to use this with Python 2 or Python 3.5 or lower, please use version 0.9.4. + + Getting Started + --------------- + + To use the Python API, first install it from PyPI using `pip`: - This Python API is simply a wrapper around the Trello API + pip install trello - Getting Started: + or from source: - To use the Trello API, install the package either by downloading the source and running + python setup.py install - $ python setup.py install + Once you have it installed, get an API key from [https://trello.com/app-key](https://trello.com/app-key). - or by using pip + >>> from trello import TrelloApi + >>> trello = TrelloApi(TRELLO_APP_KEY) + >>> trello.boards.get('4d5ea62fd76aa1136000000c') + { + "closed": false, + "desc": "Trello board used by the Trello team to track work on Trello. How meta!\n\nThe development of the Trello API is being tracked at https://trello.com/api\n\nThe development of Trello Mobile applications is being tracked at https://trello.com/mobile", + "id": "4d5ea62fd76aa1136000000c", + "idOrganization": "4e1452614e4b8698470000e0", + "name": "Trello Development", + "pinned": true, + "prefs": { + "comments": "public", + "invitations": "members", + "permissionLevel": "public", + "voting": "public" + }, + "url": "https://trello.com/board/trello-development/4d5ea62fd76aa1136000000c" + } - $ pip install trello + Because the Trello development board is public, we didn't need a user's token, but if we want to access private boards, we'll have to have one. We can get it by calling: - Documentation: + >>> trello.get_token_url('My App', expires='30days', write_access=True) + 'https://trello.com/1/authorize?key=TRELLO_APP_KEY&name=My+App&expiration=30days&response_type=token&scope=read,write' - You can find documentation for the Python API at: + If you send your user to the resulting URL, it will ask them to allow your app access to their account, and then it will give them a token (64-digit hex string) that they will pass back to your app. - http://packages.python.org/trello/ + >>> trello.set_token(user_token) - And documentation for the Trello API at: + (*Note: Trello does support OAuth, but the Python API does not have any support for it yet.*) - https://trello.com/docs/api/ + Once you have set the user's token, all calls to the API will include that token, as if the user was logged in. """), - author='tghw,kulikjak,waghanza,lukegb', + author='tghw,kulikjak,waghanza,lukegb,lazytarget', author_email='ty@tghw.com', url='https://github.com/tghw/trello-py', classifiers=[