{ "info": { "author": "Norman Kr\u00e4mer", "author_email": "kraemer.norman@googlemail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Programming Language :: Python :: 2", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "olap.rest\n=========\n\nThis package provides a REST interface to an object providing an IOLAPSource \nor IXMLASource interface.\n\nExample usage\n=============\n\nA mini program exposing two interfaces:\n\n```python\nfrom wsgiref.simple_server import make_server\nfrom pyramid.config import Configurator\nfrom pyramid.response import Response\nfrom pyramid.renderers import JSONP\nimport olap.rest.pyramid as orest\nimport olap.interfaces as oi\nimport olap.xmla.xmla as xmla\nimport cornice\n\n@orest.restify()\nclass ExposeAll(orest.OLAPREST):\n pass\n\n@orest.restify()\nclass SomeFixed(orest.OLAPREST):\n DATASOURCE=\"mondrian@localhost\"\n CATALOG=\"FoodMart\"\n CUBE=\"Sales\"\n\n\ndef reg_fixed(config):\n SomeFixed.register_service(config)\n\ndef reg_all(config):\n ExposeAll.register_service(config)\n\ndef main():\n config = Configurator()\n\n config.begin()\n config.add_renderer('jsonp', JSONP(param_name=\"callback\"))\n\n reg = config.registry\n reg.registerUtility(xmla.XMLASource(location = \"http://localhost:8080/mondrian/xmla\"),\n oi.IOLAPSource, \"mondrian@localhost\")\n reg.registerUtility(xmla.XMLASource(location = \"http://localhost:8080/mondrian/xmla\"),\n oi.IOLAPSource, \"mondrian2\")\n\n cornice.includeme(config)\n config.include(reg_all, route_prefix=\"/all\")\n config.include(reg_fixed, route_prefix=\"/fixed\")\n\n app = config.make_wsgi_app()\n server = make_server('0.0.0.0', 6543, app)\n server.serve_forever()\n\nif __name__ == '__main__':\n main()\n\n```\n\nThe interface\n=============\n\nThe following interface is exposed:\n\n* `(GET) /datasources`\n\n* `(GET) /datasource/{ds}`\n> Returns information of the OLAP connection known in the backend.\n\n* `(GET) /datasource/{ds}/catalogs`\n\n* `(GET) /datasource/{ds}/catalog/{cat}`\n > Retrieve information about the catalogs in a datasource.\n \n* `(GET) /datasource/{ds}/catalog/{cat}/sets`\n\n* `(GET) /datasource/{ds}/catalog/{cat}/set/{set}`\n > Retrieve information about the sets in a catalog.\n\n`(GET) /datasource/{ds}/catalog/{cat}/hierarchies`\n\n`(GET) /datasource/{ds}/catalog/{cat}/hierarchy/{huname}`\n Retrieve information about the hierarchies in a catalog.\n\n`(GET) /datasource/{ds}/catalog/{cat}/measures`\n\n`(GET) /datasource/{ds}/catalog/{cat}/measure/{muname}`\n Retrieve information about the measures in a catalog.\n\n`(GET) /datasource/{ds}/catalog/{cat}/queries` \n Returns all queries with attached results currently in the session cache.\n\n`(POST) /datasource/{ds}/catalog/{cat}/queries` \n Create a new query, execute it and return its result along with a query id.\n The query is expected in a `mdx` property.\n\n`(GET) /datasource/{ds}/catalog/{cat}/query/{qid}`\n Returns results of a query if still in session cache.\n\n`(GET) /datasource/{ds}/catalog/{cat}/dimensions`\n\n`(GET) /datasource/{ds}/catalog/{cat}/dimension/{duname}`\n Retrieve information about the dimensions in a catalog.\n\n`(GET) /datasource/{ds}/catalog/{cat}/dimension/{duname}/members`\n\n`(GET) /datasource/{ds}/catalog/{cat}/dimension/{duname}/member/{muname}`\n Retrieve information about the members of a dimension in a catalog.\n\n`(GET) /datasource/{ds}/catalog/{cat}/cubes`\n\n`(GET) /datasource/{ds}/catalog/{cat}/cube/{cube}`\n Retrieve information about the cubes in a catalog.\n\n`(GET) /datasource/{ds}/catalog/{cat}/cube/{cube}/sets`\n Return information about all sets in a cube.\n`(GET) /datasource/{ds}/catalog/{cat}/cube/{cube}/set/{set}`\n Return information about a set in a cube.\n`(GET) /datasource/{ds}/catalog/{cat}/cube/{cube}/measures`\n Return information about all measures in a cube.\n`(GET) /datasource/{ds}/catalog/{cat}/cube/{cube}/measure/{muname}`\n Return information about a measure in a cube.\n`(GET) /datasource/{ds}/catalog/{cat}/cube/{cube}/dimensions`\n Return information about all dimensions in a cube.\n`(GET) /datasource/{ds}/catalog/{cat}/cube/{cube}/dimension/{duname}`\n Return information about a dimension in a cube.\n`(GET) /datasource/{ds}/catalog/{cat}/cube/{cube}/hierarchies`\n Return information about all hierarchies in a cube.\n`(GET) /datasource/{ds}/catalog/{cat}/cube/{cube}/hierarchy/{huname}`\n Return information about a hierarchy in a cube.\n`(GET) /datasource/{ds}/catalog/{cat}/cube/{cube}/hierarchy/{huname}/members`\n Return information about all members of a hierarchy in a cube.\n`(GET) /datasource/{ds}/catalog/{cat}/cube/{cube}/hierarchy/{huname}/member/{muname}`\n Return information about a member of a hierarchy in a cube.\n`(GET) /datasource/{ds}/catalog/{cat}/cube/{cube}/hierarchy/{huname}/levels`\n Return information about all levels of a hierarchy in a cube.\n`(GET) /datasource/{ds}/catalog/{cat}/cube/{cube}/hierarchy/{huname}/level/{luname}`\n Return information about a level of a hierarchy in a cube.\n`(GET) /datasource/{ds}/catalog/{cat}/cube/{cube}/hierarchy/{huname}/level/{luname}/members`\n Return information about all members of a hierarchy's level in a cube.\n`(GET) /datasource/{ds}/catalog/{cat}/cube/{cube}/hierarchy/{huname}/level/{luname}/member/{muname}`\n Return information about a member of a hierarchy's level in a cube.\n\n`(GET) /datasource/{ds}/catalog/{cat}/cube/{cube}/dimension/{duname}/members`\n Return information about all members of a dimension in a cube.\n`(GET) /datasource/{ds}/catalog/{cat}/cube/{cube}/dimension/{duname}/member/{muname}`\n Return information about a member of a dimension in a cube.\n`(GET) /datasource/{ds}/catalog/{cat}/cube/{cube}/hierarchy/{huname}/member/{muname}/children`\n Return information about the children of a hierarchy's member in a cube.\n`(GET) /datasource/{ds}/catalog/{cat}/cube/{cube}/hierarchy/{huname}/level/{luname}/properties`\n Return information about all properties of a hierarchy's level in a cube.\n`(GET) /datasource/{ds}/catalog/{cat}/cube/{cube}/hierarchy/{huname}/level/{luname}/property/{pname}`\n Return information about a property of a hierarchy's level in a cube.\n`(GET) /datasource/{ds}/catalog/{cat}/cube/{cube}/hierarchy/{huname}/member/{muname}/existingchildren`\n Return information about the NON EMPTY children of a hierarchy's member in a cube w.r.t. a\n second set specified in the query string parameter called `set2`.\n\nPATH parameter:\n\n:ds:\n the name that was used to register the connection as an utility\n:cat:\n a catalog name\n:cube:\n a cube name\n:duname:\n the unique name of a dimension\n:huname:\n the unique name of a hierarchy\n:luname:\n the unique name of a level\n:muname:\n the unique name of a member\n:pname:\n a property name\n:qid:\n the query id as returned when a query is created\n\n\nCHANGES\n=======", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/may-day/olap", "keywords": null, "license": "Apache Software License 2.0", "maintainer": null, "maintainer_email": null, "name": "olap.rest", "package_url": "https://pypi.org/project/olap.rest/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/olap.rest/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/may-day/olap" }, "release_url": "https://pypi.org/project/olap.rest/0.1/", "requires_dist": null, "requires_python": null, "summary": "REST access to a pyramid backed olap connection.", "version": "0.1" }, "last_serial": 795700, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "7f61c26179476ccd470e1490c6323553", "sha256": "c3923ba8defa4bd2026e155ec0b19fd3a4e1bebe9a494972cd5730ed94158080" }, "downloads": -1, "filename": "olap.rest-0.1.tar.gz", "has_sig": false, "md5_digest": "7f61c26179476ccd470e1490c6323553", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8240, "upload_time": "2012-12-11T21:47:27", "url": "https://files.pythonhosted.org/packages/9e/1f/47eb5fd69933e36b13b5e8387b4640fbceb4598ccfc23b52921df24748ce/olap.rest-0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "7f61c26179476ccd470e1490c6323553", "sha256": "c3923ba8defa4bd2026e155ec0b19fd3a4e1bebe9a494972cd5730ed94158080" }, "downloads": -1, "filename": "olap.rest-0.1.tar.gz", "has_sig": false, "md5_digest": "7f61c26179476ccd470e1490c6323553", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8240, "upload_time": "2012-12-11T21:47:27", "url": "https://files.pythonhosted.org/packages/9e/1f/47eb5fd69933e36b13b5e8387b4640fbceb4598ccfc23b52921df24748ce/olap.rest-0.1.tar.gz" } ] }