commit python-Trolly for openSUSE:Factory
Hello community, here is the log from the commit of package python-Trolly for openSUSE:Factory checked in at 2013-07-02 12:28:51 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-Trolly (Old) and /work/SRC/openSUSE:Factory/.python-Trolly.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "python-Trolly" Changes: -------- --- /work/SRC/openSUSE:Factory/python-Trolly/python-Trolly.changes 2013-04-12 20:35:27.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.python-Trolly.new/python-Trolly.changes 2013-07-02 14:30:21.000000000 +0200 @@ -1,0 +2,6 @@ +Tue Jun 25 10:57:15 UTC 2013 - speilicke@suse.com + +- Update to version 0.1.1: + + setup.py now requires httplib2 + +------------------------------------------------------------------- Old: ---- Trolly-0.1.0.tar.gz New: ---- Trolly-0.1.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-Trolly.spec ++++++ --- /var/tmp/diff_new_pack.dU6Iav/_old 2013-07-02 14:30:22.000000000 +0200 +++ /var/tmp/diff_new_pack.dU6Iav/_new 2013-07-02 14:30:22.000000000 +0200 @@ -13,15 +13,16 @@ # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Name: python-Trolly -Version: 0.1.0 +Version: 0.1.1 Release: 0 -License: MIT Summary: Trello api -Url: https://github.com/plish/Trolly +License: MIT Group: Development/Languages/Python +Url: https://github.com/plish/Trolly Source: http://pypi.python.org/packages/source/T/Trolly/Trolly-%{version}.tar.gz BuildRequires: python-devel ## Test requirements: ++++++ Trolly-0.1.0.tar.gz -> Trolly-0.1.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Trolly-0.1.0/PKG-INFO new/Trolly-0.1.1/PKG-INFO --- old/Trolly-0.1.0/PKG-INFO 2013-02-15 16:04:15.000000000 +0100 +++ new/Trolly-0.1.1/PKG-INFO 2013-06-25 12:50:58.000000000 +0200 @@ -1,26 +1,23 @@ -Metadata-Version: 1.0 +Metadata-Version: 1.1 Name: Trolly -Version: 0.1.0 +Version: 0.1.1 Summary: Trello api Home-page: https://github.com/plish/Trolly Author: plish Author-email: plish.development@gmail.com License: LICENCE.txt -Description: Trolly - ====== +Description: # Trolly - A Python wrapper around the Trello API. Provides a group of Python classes to represent Trello Objects. None of the - classes cache values as they are designed to be inherited and extended to suit the needs of each user. Each class - includes a basic set of methods based on general use cases. This library was based on work done by - [sarumont](https://github.com/sarumont/py-trello). Very little was kept from this code, but still props on the initial + A Python wrapper around the Trello API. Provides a group of Python classes to represent Trello Objects. None of the + classes cache values as they are designed to be inherited and extended to suit the needs of each user. Each class + includes a basic set of methods based on general use cases. This library was based on work done by + [sarumont](https://github.com/sarumont/py-trello). Very little was kept from this code, but still props on the initial work. - Getting Started - ---------------- + ## Getting Started - Dependencies - ~~~~~~~~~~~~~ + ### Dependencies This library requires python 2.5 and above. @@ -29,108 +26,110 @@ - An [API key](https://trello.com/docs/gettingstarted/index.html#getting-an-application-key) for your Trello user - User authorisation token ( see below for how to obtain ) - Authorisation - ~~~~~~~~~~~~~ + ### Installation + To install either download the source and run: - User Authorisation Token - ________________________ + sudo python setup.py install - A user authorisation token isn't too hard to get hold of. There are instruction on how to get one on the - [Trello Documentation](https://trello.com/docs/gettingstarted/index.html#getting-a-token-from-a-use...). For those too - lazy there is a python class in the library called Authorise(). To use this class simply navigate to authorise.py in a + Alternatively you can use: + + sudo pip install Trolly + + ### Authorisation + + #### User Authorisation Token + + A user authorisation token isn't too hard to get hold of. There are instruction on how to get one on the + [Trello Documentation](https://trello.com/docs/gettingstarted/index.html#getting-a-token-from-a-use...). For those too + lazy there is a python class in the library called Authorise(). To use this class simply navigate to authorise.py in a terminal and type: - - python authorise.py -a API_KEY APPLICATION_NAME WHEN_TO_EXPIRE + + python authorise.py -a API_KEY APPLICATION_NAME WHEN_TO_EXPIRE The API key and application names are required but the "WHEN_TO_EXPIRE" will default to 1day if not specified. Running this file will return a URL. Copy and paste it into your browser and away you go. You might want to store this somewhere for future use, especially if you have set it to never expire. - Oauth - _____ + #### Oauth - This library (currently) has no Oauth support however the code this was based on includes Oauth support. So for + This library (currently) has no Oauth support however the code this was based on includes Oauth support. So for inspiration on how to extend the Client class to include this check out the link above. - Overview - --------- + ## Overview - There are a number of methods for each of the Trello objects. Some accept query parameters, these are for API methods - that will accept a wide range of values and return a lot of information. For example - [GET Boards](https://trello.com/docs/api/board/index.html#get-1-boards-board-id) will take a lot of query parameters to - allow you to whittle down the information to the bar minimum. This is extremely useful for extending the classes without + There are a number of methods for each of the Trello objects. Some accept query parameters, these are for API methods + that will accept a wide range of values and return a lot of information. For example + [GET Boards](https://trello.com/docs/api/board/index.html#get-1-boards-board-id) will take a lot of query parameters to + allow you to whittle down the information to the bar minimum. This is extremely useful for extending the classes without much extra programming. - Trello Client - ~~~~~~~~~~~~~ + ### Trello Client - This class holds the bulk of all the methods for communicating with the trello API and returning the Trello objects. + This class holds the bulk of all the methods for communicating with the trello API and returning the Trello objects. A client instance is required by every Trello object, because of this it makes extending and overiding methods in this - class very effective. This is where you would override the creating of an object, e.g. a Card, with your own object. + class very effective. This is where you would override the creating of an object, e.g. a Card, with your own object. - Trello Object - ~~~~~~~~~~~~~ + ### Trello Object - This class is inhereted my all Trello object classes ( Board, List, Card, etc ). The class takes only one argument, a + This class is inhereted my all Trello object classes ( Board, List, Card, etc ). The class takes only one argument, a Trello client instance. It masks calls to the client as belonging to the class ( for the purposes of modularity ). - There are also a number of methods for fetching ( Board, List, etc ) JSON from the API. Since the only thing that - differs from class to class is the base URI, this is taken as the only argument. + There are also a number of methods for fetching ( Board, List, etc ) JSON from the API. Since the only thing that + differs from class to class is the base URI, this is taken as the only argument. There are a number of methods for creating Trello objects. The createOBJECTNAME methods in this class can be extended easily by passing them keyword arguments. - Extending Trello Classes - ~~~~~~~~~~~~~~~~~~~~~~~~ + ### Extending Trello Classes Extending these classes is the premise on which they were built. Below outlines an example of how this can be acheived. If for example we wanted to pass extra variables to our a Trello Card object then we can do the below: - class MyList( List ): + class MyList( List ): - def __init__( self, trello_client, list_id, name = '' ): - super( MyList, self ).__init__( trello_client, list_id, name ) + def __init__( self, trello_client, list_id, name = '' ): + super( MyList, self ).__init__( trello_client, list_id, name ) - def getCards( self ): - cards = self.getCardsJson( self.base_uri ) - return self.createCard( card_json = cards[0], test = 'this is a test argument' ) + def getCards( self ): + cards = self.getCardsJson( self.base_uri ) + return self.createCard( card_json = cards[0], test = 'this is a test argument' ) - This MyList class overrides the getCards method to add the extra variable we need. This would need to be done to any + This MyList class overrides the getCards method to add the extra variable we need. This would need to be done to any Trello object that will return a custom card. - We declare and pass the extra ('test') variable as a keyword argument here. We then need to extend the card class to + We declare and pass the extra ('test') variable as a keyword argument here. We then need to extend the card class to allow for the extra variables: - class MyCard( Card ): + class MyCard( Card ): - def __init__( self, trello_client, card_id, test, name = '' ): - super( MyCard, self ).__init__( trello_client, card_id, name ) - self.test_arg = test + def __init__( self, trello_client, card_id, test, name = '' ): + super( MyCard, self ).__init__( trello_client, card_id, name ) + self.test_arg = test - Finally, we extend and override the Client. Overriding the client means that any object that calls createCard will + Finally, we extend and override the Client. Overriding the client means that any object that calls createCard will create one of our new client classes. - class MyClient( Client ): + class MyClient( Client ): + + def __init__( self, api_key, user_auth_token ): + super( MyClient, self ).__init__( api_key, user_auth_token ) - def __init__( self, api_key, user_auth_token ): - super( MyClient, self ).__init__( api_key, user_auth_token ) + def createCard( self, card_json, **kwargs ): - def createCard( self, card_json, \*\*kwargs ): - - return MyCard( - trello_client = self, - card_id = card_json['id'], - name = card_json['name'], - test = kwargs['test'] - ) + return MyCard( + trello_client = self, + card_id = card_json['id'], + name = card_json['name'], + test = kwargs['test'] + ) The above client will fail though if you fail to pass a "test" keyword argument. To get around this you could use: - kwargs.get('test',"default value") + kwargs.get('test',"default value") This will help avoid a value not being passed. You could also, instead of extending the object creation, add a method to cache the details you want using the objects getObjectInformation method. @@ -138,8 +137,7 @@ Hope this helps and happy Trelloing! - Running Test - ------------- + ## Running Test In order to run the tests you will need: - API Key @@ -151,18 +149,18 @@ - A checklist ID - A member ID - It's quite a lot of information to get hold of (sorry). If you don't need everything you can just comment out + It's quite a lot of information to get hold of (sorry). If you don't need everything you can just comment out the tests you don't need. - To run the tests navigate to the Trolly in a terminal and run: + To run the tests navigate to the Trolly in a terminal and run: - PYTHONPATH=. python test/tests.py + PYTHONPATH=. python test/tests.py - Licence - ------- + ## Licence This code is licenced under the [MIT Licence](http://opensource.org/licenses/mit-license.php) Platform: UNKNOWN +Requires: httplib2 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Trolly-0.1.0/README.md new/Trolly-0.1.1/README.md --- old/Trolly-0.1.0/README.md 2013-02-15 15:59:39.000000000 +0100 +++ new/Trolly-0.1.1/README.md 2013-06-25 12:28:33.000000000 +0200 @@ -1,5 +1,4 @@ -Trolly -====== +# Trolly A Python wrapper around the Trello API. Provides a group of Python classes to represent Trello Objects. None of the classes cache values as they are designed to be inherited and extended to suit the needs of each user. Each class @@ -8,11 +7,9 @@ work. -Getting Started ----------------- +## Getting Started -Dependencies -~~~~~~~~~~~~~ +### Dependencies This library requires python 2.5 and above. @@ -21,11 +18,18 @@ - An [API key](https://trello.com/docs/gettingstarted/index.html#getting-an-application-key) for your Trello user - User authorisation token ( see below for how to obtain ) -Authorisation -~~~~~~~~~~~~~ +### Installation +To install either download the source and run: + + sudo python setup.py install + +Alternatively you can use: + + sudo pip install Trolly -User Authorisation Token -________________________ +### Authorisation + +#### User Authorisation Token A user authorisation token isn't too hard to get hold of. There are instruction on how to get one on the [Trello Documentation](https://trello.com/docs/gettingstarted/index.html#getting-a-token-from-a-use...). For those too @@ -38,32 +42,28 @@ this file will return a URL. Copy and paste it into your browser and away you go. You might want to store this somewhere for future use, especially if you have set it to never expire. -Oauth -_____ +#### Oauth This library (currently) has no Oauth support however the code this was based on includes Oauth support. So for inspiration on how to extend the Client class to include this check out the link above. -Overview ---------- +## Overview There are a number of methods for each of the Trello objects. Some accept query parameters, these are for API methods that will accept a wide range of values and return a lot of information. For example [GET Boards](https://trello.com/docs/api/board/index.html#get-1-boards-board-id) will take a lot of query parameters to -allow you to whittle down the information to the bar minimum. This is extremely useful for extending the classes without -much extra programming. +allow you to whittle down the information to the bar minimum. This is extremely useful for extending the classes without + much extra programming. -Trello Client -~~~~~~~~~~~~~ +### Trello Client This class holds the bulk of all the methods for communicating with the trello API and returning the Trello objects. A client instance is required by every Trello object, because of this it makes extending and overiding methods in this class very effective. This is where you would override the creating of an object, e.g. a Card, with your own object. -Trello Object -~~~~~~~~~~~~~ +### Trello Object This class is inhereted my all Trello object classes ( Board, List, Card, etc ). The class takes only one argument, a Trello client instance. It masks calls to the client as belonging to the class ( for the purposes of modularity ). @@ -74,8 +74,7 @@ easily by passing them keyword arguments. -Extending Trello Classes -~~~~~~~~~~~~~~~~~~~~~~~~ +### Extending Trello Classes Extending these classes is the premise on which they were built. Below outlines an example of how this can be acheived. @@ -111,8 +110,8 @@ def __init__( self, api_key, user_auth_token ): super( MyClient, self ).__init__( api_key, user_auth_token ) - def createCard( self, card_json, \*\*kwargs ): - + def createCard( self, card_json, **kwargs ): + return MyCard( trello_client = self, card_id = card_json['id'], @@ -130,8 +129,7 @@ Hope this helps and happy Trelloing! -Running Test -------------- +## Running Test In order to run the tests you will need: - API Key @@ -152,7 +150,6 @@ -Licence -------- +## Licence This code is licenced under the [MIT Licence](http://opensource.org/licenses/mit-license.php) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Trolly-0.1.0/setup.py new/Trolly-0.1.1/setup.py --- old/Trolly-0.1.0/setup.py 2013-02-15 16:00:01.000000000 +0100 +++ new/Trolly-0.1.1/setup.py 2013-06-25 12:33:17.000000000 +0200 @@ -8,12 +8,13 @@ setup( name = 'Trolly', - version = '0.1.0', + version = '0.1.1', author = 'plish', author_email = 'plish.development@gmail.com', url = 'https://github.com/plish/Trolly', packages = ['trolly'], license = 'LICENCE.txt', + requires = ['httplib2'], description = 'Trello api', long_description = open( 'README.md' ).read() ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Trolly-0.1.0/trolly/authorise.py new/Trolly-0.1.1/trolly/authorise.py --- old/Trolly-0.1.0/trolly/authorise.py 2013-02-15 14:28:54.000000000 +0100 +++ new/Trolly-0.1.1/trolly/authorise.py 2013-06-25 12:28:33.000000000 +0200 @@ -30,7 +30,7 @@ authorisation_url = self.buildUri( path = '/authorize', - query_params = query_params + query_params = self.addAuthorisation(query_params) ) print 'Please go to the following URL and get the user authorisation token:\n', authorisation_url -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@hilbert.suse.de