From a509f3d67a86252c6e355171218de48b35e78d0e Mon Sep 17 00:00:00 2001 From: josuebrunel Date: Wed, 20 May 2015 11:44:09 +0200 Subject: [PATCH] #1 : might the right rst file --- README.rst | 145 +++++++++++++++++++++++------------------------------ 1 file changed, 62 insertions(+), 83 deletions(-) diff --git a/README.rst b/README.rst index 9cfb9cc..dc9a05a 100644 --- a/README.rst +++ b/README.rst @@ -1,81 +1,52 @@ +`MYQL <.>`_ + +- `MYQL `_ +- `YOAuth `_ +- `Open Table `_ +- `Contribute `_ + +  ** ` <.>`_ + +- `Docs <.>`_ » +- Home +- `Edit on GitHub `_ + +-------------- + MYQL ==== -` `_ `|Documentation -Status| `_ `|Latest -Version| `_ -`|Downloads| `_ -`|Status| `_ -`|image4| `_ `|Join the chat at -https://gitter.im/josuebrunel/myql| `_ -`|Code -Issues| `_ - MYQL is a Python wrapper of the Yahoo Query Language. Yahoo! Query Language Documentation and Support =============================================== -- Yahoo! Query Language - http://developer.yahoo.com/yql/ -- Yahoo! Developer Network: http://developer.yahoo.com -- Yahoo! Application Platform - http://developer.yahoo.com/yap/ -- Yahoo! Social APIs - http://developer.yahoo.com/social/ -- Yahoo! QUery Language Console - https://developer.yahoo.com/yql/console/ - -Release Notes -============= - -v 1.2.2 ( development ) ------------------------ - -- Fixed issue with **IN** condition in **where** clause -- Fixed issue when passing an empty list/tuple (**[]/()**) in a - **where** clause -- Import of StockParser from Gurchet Rai - https://github.com/gurch101/StockScraper OK - `#68 `_ -- Insert, Update, Delete methods added - `#67 `_ -- Dummy *try/except* removed from main module -- Fixed **Invalid OAuth Signature** when using a refreshed token - `#64 `_ -- Fixed misused of ***MYQL.use(...)*** - `#76 `_ - -v 1.2.1 -------- +- `Yahoo! Query Language `_ +- `Yahoo! Developer Network `_ +- `Yahoo! Application Platform `_ +- `Yahoo! Social APIs `_ +- `Yahoo! Query Language + Console `_ -- Multiple requests while using OAuth fixed +Installation +============ -v 1.2.0 -------- +:: -- OpenTable classes -- Access to resources requiring authentication + $ pip install myql -v 0.5.6 -------- +:: -- fetch data -- access to community data -- select data format (xml/json) -- change data source -- filter data -- fix handling of default and on the fly response format -- fix limit on ***select(...).where(...)*** when no limit value is - passed -- fix limit on ***get(...)*** - -installation -============ + $ pip install git+https://github.com/josuebrunel/myql.git + +Or download the package and run :: - $ pip install myql + $ python setup.py install --record files_path.txt -how to use -========== +Quick Start +=========== :: @@ -83,7 +54,7 @@ how to use >>> yql = myql.MYQL() >>> yql.diagnostics = True # To turn diagnostics on -access to community tables +Access to community tables ^^^^^^^^^^^^^^^^^^^^^^^^^^ :: @@ -98,7 +69,7 @@ access to community tables {u'query': {u'count': 1, u'lang': u'en-US', u'results': {u'table': {u'src': u'http://www.datatables.org/yahoo/finance/yahoo.finance.quotes.xml', u'hash': u'061616a1c033ae89aaf2cbe83790b979', u'name': u'yahoo.finance.quotes', u'request': {u'select': {u'key': {u'required': u'true', u'type': u'xs:string', u'name': u'symbol'}}}, u'meta': {u'sampleQuery': u'\n\t\t\tselect * from yahoo.finance.quotes where symbol in ("YHOO","AAPL","GOOG","MSFT")\n\t\t'}, u'security': u'ANY'}}, u'created': u'2014-08-24T11:26:48Z'}} >>> -***OR*** +or :: @@ -106,7 +77,7 @@ access to community tables >>> yql = myql.MYQL(community=True) >>> # do your magic -changing response format (xml or json) +Changing response format (xml or json) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ The response format is by default ***json***. @@ -126,8 +97,8 @@ The response format is by default ***json***. Methods ------- -use(yql\_table\_url,name=yql\_table\_name ) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +use(yql\_table\_url,name=yql\_table\_name) +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Changes the data provider @@ -193,7 +164,7 @@ instead . :: - >>> rep = yql.get('geo.countries', ['name', 'woeid'], 1) + >>> yql.get('geo.countries', ['name', 'woeid'], 1) >>> rep.json() {u'query': {u'count': 1, u'lang': u'en-US', u'results': {u'place': {u'woeid': u'23424966', u'name': u'Sao Tome and Principe'}}, u'created': u'2014-08-17T10:32:25Z'}} >>> @@ -247,13 +218,22 @@ Update fields values. This method **is always followed by delete(table).where(filters, ...) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Delete records \`\`\`python >>> response = -self.yql.delete('yql.storage').where(['name','=','store://Rqb5fbQyDvrfHJiClWnZ6q']) ->>> response.json() # result prettyfied just for the example { "query": -{ "count": 1, "created": "2015-05-14T13:38:28Z", "lang": "en-US", -"results": { "success": "store://Rqb5fbQyDvrfHJiClWnZ6q deleted" } } } +Delete records -\`\`\` +:: + + >>> response = self.yql.delete('yql.storage').where(['name','=','store://Rqb5fbQyDvrfHJiClWnZ6q']) + >>> response.json() # result prettyfied just for the example + { + "query": { + "count": 1, + "created": "2015-05-14T13:38:28Z", + "lang": "en-US", + "results": { + "success": "store://Rqb5fbQyDvrfHJiClWnZ6q deleted" + } + } + } Using OAuth to fetch protected resources ======================================== @@ -266,13 +246,12 @@ Using OAuth to fetch protected resources >>> yql = MYQL(format='xml', oauth=oauth) >>> response = yql.getGUID('josue_brunel') # Deal with the response -.. |Documentation -Status| image:: https://readthedocs.org/projects/myql/badge/?version=latest -.. |Latest Version| image:: https://pypip.in/version/myql/badge.svg -.. |Downloads| image:: https://pypip.in/download/myql/badge.svg -.. |Status| image:: https://pypip.in/py_versions/myql/badge.svg -.. |image4| image:: https://pypip.in/implementation/myql/badge.svg -.. |Join the chat at -https://gitter.im/josuebrunel/myql| image:: https://badges.gitter.im/Join%20Chat.svg -.. |Code -Issues| image:: https://www.quantifiedcode.com/project/gh:josuebrunel:myql/badge.svg +` `_\ Next + +-------------- + +Built with `MkDocs `_ using a +`theme `_ provided by `Read +the Docs `_. + +GitHub `« Previous <>`_ `Next » `_