{
"info": {
"author": "Josue Kouka",
"author_email": "josuebrunel@gmail.com",
"bugtrack_url": null,
"classifiers": [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Software Development :: Libraries :: Python Modules"
],
"description": "`mYQL `__\n=================================================\n\n|Build Status| |Documentation Status| |Code Health| |PyPI| |PyPI| |PyPI|\n|PyPI| |PyPI| |Coverage Status| |PyPI|\n\nmYQL is a Python wrapper of the Yahoo Query Language.\n\nYahoo! Query Language Documentation and Support\n===============================================\n\n- Yahoo! Query Language - http://developer.yahoo.com/yql/\n- Yahoo! Developer Network: http://developer.yahoo.com\n- Yahoo! Application Platform - http://developer.yahoo.com/yap/\n- Yahoo! Social APIs - http://developer.yahoo.com/social/\n- Yahoo! QUery Language Console\n https://developer.yahoo.com/yql/console/\n\nFeatures\n~~~~~~~~\n\n- Simple YQL Query\n- Authenticated YQL Query ( OAuth )\n- StockScraper\n- YQL Open Table (Classes and Metaclasses) Generator\n- Response prettyfier\n\nInstallation\n============\n\n.. code:: shell\n\n $ pip install myql\n\nQuick Start\n===========\n\nIt's important to know that **response** is a just\n**requests.models.Response** object. Yes indeed, ***mYQL*** uses\n***requests*** :smile:\n\nBy default, you have access to the **community tables**. If for\nwhatsoever reason you would like to not have access to those tables\n\n.. code:: python\n\n >>> import myql\n >>> yql = myql.MYQL(community=False)\n\nChanging response format (xml or json)\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nThe response format is by default ***json***.\n\n.. code:: python\n\n >>> import myql\n >>> from myql.utils import pretty_json, pretty_xml\n >>> yql = myql.MYQL(format='xml', community=True)\n >>> resp = yql.raw_query('select name, woeid from geo.states where place=\"Congo\"')\n >>> print(pretty_xml(resp.content))\n \n \n \n \n Cuvette-Ouest Department\n 55998384\n \n \n Cuvette Department\n 2344968\n \n \n Plateaux District\n 2344973\n \n \n Sangha\n 2344974\n \n \n Lekoumou\n 2344970\n \n \n Pool Department\n 2344975\n \n \n Likouala Department\n 2344971\n \n \n Niari Department\n 2344972\n \n \n Brazzaville\n 2344976\n \n \n Bouenza Department\n 2344967\n \n \n Kouilou\n 2344969\n \n \n \n \n \n\n >>> resp = yql.raw_query('select name, woeid from geo.states where place=\"Congo\"', format='json')\n >>> print(pretty_json(resp.content))\n {\n \"query\": {\n \"count\": 11, \n \"created\": \"2015-06-07T11:58:20Z\", \n \"lang\": \"en-US\", \n \"results\": {\n \"place\": [\n {\n \"name\": \"Cuvette-Ouest Department\", \n \"woeid\": \"55998384\"\n }, \n {\n \"name\": \"Cuvette Department\", \n \"woeid\": \"2344968\"\n }, \n {\n \"name\": \"Plateaux District\", \n \"woeid\": \"2344973\"\n }, \n {\n \"name\": \"Sangha\", \n \"woeid\": \"2344974\"\n }, \n {\n \"name\": \"Lekoumou\", \n \"woeid\": \"2344970\"\n }, \n {\n \"name\": \"Pool Department\", \n \"woeid\": \"2344975\"\n }, \n {\n \"name\": \"Likouala Department\", \n \"woeid\": \"2344971\"\n }, \n {\n \"name\": \"Niari Department\", \n \"woeid\": \"2344972\"\n }, \n {\n \"name\": \"Brazzaville\", \n \"woeid\": \"2344976\"\n }, \n {\n \"name\": \"Bouenza Department\", \n \"woeid\": \"2344967\"\n }, \n {\n \"name\": \"Kouilou\", \n \"woeid\": \"2344969\"\n }\n ]\n }\n }\n }\n\n >>>\n\nMethods\n-------\n\nuse(yql\\_table\\_url,name=yql\\_table\\_name)\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nMaps a table name to the URL of an Open Data Table.\n\n.. code:: python\n\n >>> yql.use('http://www.josuebrunel.org//users.xml', name='myusers') \n\ndesc(tablename)\n^^^^^^^^^^^^^^^\n\nReturns table description\n\n.. code:: python\n\n >>> response = yql.desc('weather.forecast')\n >>> print(pretty_json(response.content))\n {\n \"query\": {\n \"count\": 1, \n \"created\": \"2015-06-07T12:00:27Z\", \n \"lang\": \"en-US\", \n \"results\": {\n \"table\": {\n \"hash\": \"aae78b1462a6a8fbc748aec4cf292767\", \n \"meta\": {\n \"author\": \"Yahoo! Inc\", \n \"description\": \"Weather forecast table\", \n \"documentationURL\": \"http://developer.yahoo.com/weather/\", \n \"sampleQuery\": \"select * from weather.forecast where woeid=2502265\"\n }, \n \"name\": \"weather.forecast\", \n \"request\": {\n \"select\": [\n {\n \"key\": [\n {\n \"name\": \"location\", \n \"required\": \"true\", \n \"type\": \"xs:string\"\n }, \n {\n \"name\": \"u\", \n \"type\": \"xs:string\"\n }\n ]\n }, \n {\n \"key\": [\n {\n \"name\": \"woeid\", \n \"required\": \"true\", \n \"type\": \"xs:string\"\n }, \n {\n \"name\": \"u\", \n \"type\": \"xs:string\"\n }\n ]\n }\n ]\n }, \n \"security\": \"ANY\"\n }\n }\n }\n }\n\n >>>\n\nraw\\_query(query)\n^^^^^^^^^^^^^^^^^\n\nAllows you to directly type your query\n\n.. code:: python\n\n >>> response = yql.raw_query(\"select * from geo.countries where place='North America'\")\n >>> # deal with the response\n\nselect(table, fields, limit).where(filters, ...)\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n***NB*** : A simple select doesn't return any data. Use ***GET***\ninstead.\n\n.. code:: python\n\n >>> response = yql.select('geo.countries', ['name', 'code', 'woeid']).where(['name', '=', 'Canada'])\n >>> print(pretty_json(response.content))\n {\n \"query\": {\n \"count\": 1, \n \"created\": \"2015-06-07T12:10:39Z\", \n \"lang\": \"en-US\", \n \"results\": {\n \"place\": {\n \"name\": \"Canada\", \n \"woeid\": \"23424775\"\n }\n }\n }\n }\n\n >>> ...\n >>> response = yql.select('geo.countries', ['name', 'woeid'], 2).where(['place', 'in', ('Africa', 'Europe')])\n >>> from myql.utils import dump\n >>> dump(response)\n {\n \"query\": {\n \"count\": 2, \n \"created\": \"2015-06-07T12:27:04Z\", \n \"lang\": \"en-US\", \n \"results\": {\n \"place\": [\n {\n \"name\": \"Algeria\", \n \"woeid\": \"23424740\"\n }, \n {\n \"name\": \"Angola\", \n \"woeid\": \"23424745\"\n }\n ]\n }\n }\n }\n\n >>>\n\nget(table, fields, limit)\n^^^^^^^^^^^^^^^^^^^^^^^^^\n\nSame as ***SELECT***, but instead returns data.\n\n**REMINDER** : Some tables require a **where clause**, therefore\n***GET*** won't work on those tables, use *select(...).where(...)*\ninstead .\n\n.. code:: python\n\n >>> from myql.utils import dump\n >>> response = yql.get('geo.countries', ['name', 'woeid'], 1)\n >>> dump(response)\n {\n \"query\": {\n \"count\": 1, \n \"created\": \"2015-06-07T12:29:01Z\", \n \"lang\": \"en-US\", \n \"results\": {\n \"place\": {\n \"name\": \"Sao Tome and Principe\", \n \"woeid\": \"23424966\"\n }\n }\n }\n }\n\n >>>\n\ninsert(table, (field1, field2, ..., fieldN),(value1, value2, ..., valueN))\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nInsert values into a table. Arguments 2 and 3 may be **tuples** or\n**list**.\n\n.. code:: python\n\n >>> from myql.utils import pretty_json\n >>> response = yql.insert('yql.storage.admin',('value',),('http://josuebrunel.org',))\n >>> print(pretty_json(response.content))\n {\n \"query\": {\n \"count\": 1,\n \"created\": \"2015-05-14T13:25:56Z\",\n \"lang\": \"en-US\",\n \"results\": {\n \"inserted\": {\n \"execute\": \"store://KkkC5xDw4v32IcWWSQ4YRe\",\n \"select\": \"store://Zc5LHXcmYM7XBfSbo9tzFL\",\n \"update\": \"store://Rqb5fbQyDvrfHJiClWnZ6q\"\n }\n }\n }\n }\n\nupdate(table,[field1, ..., fieldN],[value1, ..., ...valueN]).where(filters, ...)\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nUpdate fields values. This method **is always followed by\n***where()*****. Arguments 2 and 3 may be **tuples** or **list**.\n\n.. code:: python\n\n >>> from myql.utils import pretty_json\n >>> response = yql.update('yql.storage',('value',),('https://josuebrunel.org',)).where(['name','=','store://Rqb5fbQyDvrfHJiClWnZ6q'])\n >>> print(pretty_json(response.content))\n {\n \"query\": {\n \"count\": 1,\n \"created\": \"2015-05-14T13:32:52Z\",\n \"lang\": \"en-US\",\n \"results\": {\n \"success\": \"Updated store://KkkC5xDw4v32IcWWSQ4YRe\"\n }\n }\n }\n\ndelete(table).where(filters, ...)\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nDelete records\n\n.. code:: python\n\n >>> from myql.utils import pretty_json\n >>> response = self.yql.delete('yql.storage').where(['name','=','store://Rqb5fbQyDvrfHJiClWnZ6q'])\n >>> print(pretty_json(response.content))\n {\n \"query\": {\n \"count\": 1,\n \"created\": \"2015-05-14T13:38:28Z\",\n \"lang\": \"en-US\",\n \"results\": {\n \"success\": \"store://Rqb5fbQyDvrfHJiClWnZ6q deleted\"\n }\n }\n }\n\nUsing OAuth\n^^^^^^^^^^^\n\n***mYQL*** comes with\n***`yahoo\\_oauth `__***,\nwhich is an OAuth library for Yahoo! APIs.\n\n.. code:: python\n\n >>> from yahoo_oauth import OAuth1\n >>> oauth = OAuth1(None, None, from_file='credentials.json') # only consumer_key and consumer_secret are required.\n >>> from myql import MYQL\n >>> yql = MYQL(format='xml', oauth=oauth)\n >>> response = yql.get_guid('josue_brunel') # Deal with the response\n\nStocks Scraper\n^^^^^^^^^^^^^^\n\nThe full documentation on ***StockScraper*** is\n`here `__\n\nRelease Notes\n^^^^^^^^^^^^^\n\n##### 1.2.6\n-----------\n\n- Fixed `#148 `__\n\n##### 1.2.5\n-----------\n\n- camelCase dropped for underscore\n- Support for substitution variable i.e @myvar\n- Support of Remote Filters\n- Support of Post Query Filters\n\n##### 1.2.4\n-----------\n\n- Weather module added\n- StockScraper now under Finance namespace\n\n##### 1.2.3\n-----------\n\n- Fixed issue related to date in StockRetriver.get\\_historical\\_info\n `#107 `__\n- Fixed issue with **IN** condition in **where** clause\n `#106 `__\n- Fix definition of raw\\_input for python3\n `#105 `__\n- Yahoo-OAuth included as main oauth library\n `#112 `__\n\n##### 1.2.2\n-----------\n\n- **Python3** support OK\n `#71 `__\n- **PyPy/PyPy3** support OK\n- Fixed issue with **IN** condition in **where** clause\n- Fixed issue when passing an empty list/tuple (**[]/()**) in a\n **where** clause besides first argument\n- Import of\n ***`StockParser `__*** from\n Gurchet Rai OK\n `#68 `__\n- Insert, Update, Delete methods added\n `#67 `__\n- Dummy *try/except* removed from main module\n- Fixed **Invalid OAuth Signature** when using a refreshed token\n `#64 `__\n- Fixed misused of ***MYQL.use(...)***\n `#76 `__\n- Fixed format issue\n `#82 `__\n- Added useful functions in utils\n `#81 `__\n- Default access to community tables\n- Response prettyfier : *pretty\\_json, pretty\\_xml*\n\n##### v 1.2.1\n-------------\n\n- Multiple requests while using OAuth fixed\n\n##### 1.2.0\n-----------\n\n- OpenTable classes\n- Access to resources requiring authentication\n\n##### 0.5.6\n-----------\n\n- fetch data\n- access to community data\n- select data format (xml/json)\n- change data source\n- filter data\n- fix handling of default response format on the fly\n- fix limit on ***select(...).where(...)*** when no limit value is\n passed\n- fix limit on ***get(...)***\n\n.. |Build Status| image:: https://travis-ci.org/josuebrunel/myql.svg?branch=master\n :target: https://travis-ci.org/josuebrunel/myql\n.. |Documentation Status| image:: https://readthedocs.org/projects/myql/badge/?version=latest\n :target: https://myql.readthedocs.org\n.. |Code Health| image:: https://landscape.io/github/josuebrunel/myql/master/landscape.svg?style=flat\n :target: https://landscape.io/github/josuebrunel/myql/master\n.. |PyPI| image:: https://img.shields.io/pypi/status/myql.svg?style=flat\n :target: https://pypi.python.org/pypi/myql\n.. |PyPI| image:: https://img.shields.io/pypi/v/myql.svg?style=flat\n :target: https://pypi.python.org/pypi/myql\n.. |PyPI| image:: https://img.shields.io/pypi/dm/myql.svg?style=flat\n :target: https://pypi.python.org/pypi/myql\n.. |PyPI| image:: https://img.shields.io/pypi/pyversions/myql.svg\n :target: https://pypi.python.org/pypi/myql\n.. |PyPI| image:: https://img.shields.io/pypi/implementation/myql.svg?style=flat\n :target: https://pypi.python.org/pypi/myql\n.. |Coverage Status| image:: https://coveralls.io/repos/josuebrunel/myql/badge.svg?branch=testing\n :target: https://coveralls.io/r/josuebrunel/myql?branch=master\n.. |PyPI| image:: https://img.shields.io/pypi/l/myql.svg?style=flat\n :target: https://pypi.python.org/pypi/myql",
"description_content_type": null,
"docs_url": null,
"download_url": "https://github.com/josuebrunel/myql/archive/1.2.7.tar.gz",
"downloads": {
"last_day": -1,
"last_month": -1,
"last_week": -1
},
"home_page": "https://github.com/josuebrunel/MYQL",
"keywords": "myql,yql,yahoo,query,language",
"license": "MIT",
"maintainer": null,
"maintainer_email": null,
"name": "myql",
"package_url": "https://pypi.org/project/myql/",
"platform": "Any",
"project_url": "https://pypi.org/project/myql/",
"project_urls": {
"Download": "https://github.com/josuebrunel/myql/archive/1.2.7.tar.gz",
"Homepage": "https://github.com/josuebrunel/MYQL"
},
"release_url": "https://pypi.org/project/myql/1.2.7/",
"requires_dist": null,
"requires_python": null,
"summary": "Python Wrapper for the Yahoo! Query Language. Allowing to run YQL queries, fetch financial data and create YQL Open Tables",
"version": "1.2.7"
},
"last_serial": 1758148,
"releases": {
"1.2": [
{
"comment_text": "",
"digests": {
"md5": "3516ac676cad6fa78353535b68c1a39d",
"sha256": "fa7ebeb72468dc2b0eb39fabdeddc3c68cbb43abc0dbaadc7383bc3b89272c00"
},
"downloads": -1,
"filename": "myql-1.2.tar.gz",
"has_sig": false,
"md5_digest": "3516ac676cad6fa78353535b68c1a39d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 12420,
"upload_time": "2015-05-03T13:11:55",
"url": "https://files.pythonhosted.org/packages/42/95/a25b985040e8eae888cd06b38145fa46e8190a5abba9cde4f37858a4f2ce/myql-1.2.tar.gz"
}
],
"1.2.1": [
{
"comment_text": "",
"digests": {
"md5": "93cb9436c6ae06631dc6caefed2f4038",
"sha256": "25249668016e7e03a6cd2b4d55512b9339855b2fa4f32fd19f2e23e40549245c"
},
"downloads": -1,
"filename": "myql-1.2.1.tar.gz",
"has_sig": false,
"md5_digest": "93cb9436c6ae06631dc6caefed2f4038",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 19090,
"upload_time": "2015-05-09T14:58:00",
"url": "https://files.pythonhosted.org/packages/ee/2a/fe57023146e1c5c39c219f9b4a4e1dde6c409dfffaf706b1e7ed37539086/myql-1.2.1.tar.gz"
}
],
"1.2.2": [
{
"comment_text": "",
"digests": {
"md5": "a79576caf22608c10ee41c86508eff07",
"sha256": "def6a361cdf858c58daa0f01c7f17a9e82aa2c77b18c4deef41d2cc9e76f20c2"
},
"downloads": -1,
"filename": "myql-1.2.2.tar.gz",
"has_sig": false,
"md5_digest": "a79576caf22608c10ee41c86508eff07",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 18393,
"upload_time": "2015-05-31T02:58:52",
"url": "https://files.pythonhosted.org/packages/68/01/e08ea53eb068b2fde87a96fe5c2e6da256dbd71ec6e5b0e1bd8e7f4f5704/myql-1.2.2.tar.gz"
}
],
"1.2.3": [
{
"comment_text": "",
"digests": {
"md5": "82afb3e191f638764d76ce7a6d866e4f",
"sha256": "53acd0b653cb63d533bd8c1b080e6773aaec355ab242a557f314951487fbd010"
},
"downloads": -1,
"filename": "myql-1.2.3.tar.gz",
"has_sig": false,
"md5_digest": "82afb3e191f638764d76ce7a6d866e4f",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 18645,
"upload_time": "2015-06-08T13:09:14",
"url": "https://files.pythonhosted.org/packages/32/a7/25dd7c9d92c96b0b424be330ed20340d2081affcfe5ef48c7a2e50c69a57/myql-1.2.3.tar.gz"
}
],
"1.2.4": [
{
"comment_text": "",
"digests": {
"md5": "7c12be9a994000d46548078530d7b20e",
"sha256": "fc42c449f67dd929c5f60c335e09f4fac2a1862a904ee1908212abd26c09da8b"
},
"downloads": -1,
"filename": "myql-1.2.4.tar.gz",
"has_sig": false,
"md5_digest": "7c12be9a994000d46548078530d7b20e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 19279,
"upload_time": "2015-07-08T12:52:09",
"url": "https://files.pythonhosted.org/packages/5b/49/28a84ecfab5d8ac57c1e2866c90a6d3185b117425cbcbfc49b3fac951ac7/myql-1.2.4.tar.gz"
}
],
"1.2.5": [
{
"comment_text": "",
"digests": {
"md5": "ae6e57f0eb23d5e0d3f6332f7cf7b479",
"sha256": "08921db0c80acf7785812bcb32cc70b58247f05f9cc81bd9b40fd3fb15dd4fa5"
},
"downloads": -1,
"filename": "myql-1.2.5.tar.gz",
"has_sig": false,
"md5_digest": "ae6e57f0eb23d5e0d3f6332f7cf7b479",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 21163,
"upload_time": "2015-08-22T19:38:45",
"url": "https://files.pythonhosted.org/packages/a1/82/af39a60228a5272e370b6ef150338bf493ee2fdae046b0d7cc7e209a585b/myql-1.2.5.tar.gz"
}
],
"1.2.6": [
{
"comment_text": "",
"digests": {
"md5": "d6ae892708a48477fe0496506c607186",
"sha256": "23054c2298a154b7186ad366fde39fd188bd26c0f522db8287af17a738fda8cb"
},
"downloads": -1,
"filename": "myql-1.2.6.tar.gz",
"has_sig": false,
"md5_digest": "d6ae892708a48477fe0496506c607186",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 21696,
"upload_time": "2015-08-23T11:47:38",
"url": "https://files.pythonhosted.org/packages/37/b6/8e5202acd4a965ebf29014862ba02c6312a9ff6c3be4020772661cee601d/myql-1.2.6.tar.gz"
}
],
"1.2.7": [
{
"comment_text": "",
"digests": {
"md5": "a4726f50bb37653e7f88e363f98ce751",
"sha256": "3a79e5179ed94ac5894f19441b38092005a970f25015295e2b14675d88ec829d"
},
"downloads": -1,
"filename": "myql-1.2.7.tar.gz",
"has_sig": false,
"md5_digest": "a4726f50bb37653e7f88e363f98ce751",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 26020,
"upload_time": "2015-10-08T11:46:15",
"url": "https://files.pythonhosted.org/packages/49/73/02327197e262eab9cb2a4cdcd2cd1d77a677ec9d8c1bb0b8ebbe80ea0d20/myql-1.2.7.tar.gz"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "a4726f50bb37653e7f88e363f98ce751",
"sha256": "3a79e5179ed94ac5894f19441b38092005a970f25015295e2b14675d88ec829d"
},
"downloads": -1,
"filename": "myql-1.2.7.tar.gz",
"has_sig": false,
"md5_digest": "a4726f50bb37653e7f88e363f98ce751",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 26020,
"upload_time": "2015-10-08T11:46:15",
"url": "https://files.pythonhosted.org/packages/49/73/02327197e262eab9cb2a4cdcd2cd1d77a677ec9d8c1bb0b8ebbe80ea0d20/myql-1.2.7.tar.gz"
}
]
}