Metadata-Version: 1.0
Name: mortar-api-python
Version: 0.2.0
Summary: Python API for Mortar
Home-page: http://github.com/mortardata/mortar-api-python
Author: Mortar Data
Author-email: info@mortardata.com
License: LICENSE.txt
Description: ['# mortar-api-python\n', '\n', 'The Mortar API Client for Python is a Python wrapper to interact with [Mortar](http://www.mortardata.com/).\n', '\n', "See Mortar's help site for the [Mortar API specification](http://help.mortardata.com/reference/api/api_version_2).\n", '\n', '[![Build Status](https://travis-ci.org/mortardata/mortar-api-python.png?branch=master)](https://travis-ci.org/mortardata/mortar-api-python)\n', '\n', '# Installation\n', '\n', 'Pick up the latest version of mortar-api-python from PyPi:\n', '\n', '\n', 'pip install mortar-api-python\n', '\n', '# Examples\n', '\n', '## Running a Mortar Job\n', '\n', 'To run a job on a new cluster:\n', '\n', 'from mortar.api.v2 import API\n', 'from mortar.api.v2 import jobs\n', '\n', '# mortar credentials\n', "email = 'myemail@me.org'\n", "api_key = 'my-API-key'\n", '\n', '# job to run\n', "project_name = 'mortar-examples'\n", "script_name = 'top_density_songs'\n", 'cluster_size = 2\n', '\n', '# run and monitor the job\n', 'api = API(email, api_key)\n', 'job_id = jobs.post_job_new_cluster(api, project_name, script_name, cluster_size)\n', 'final_job_status = jobs.block_until_job_complete(api, job_id)\n', '\n', '## Listing Your Mortar Projects\n', '\n', 'To fetch a list of Mortar projects:\n', '\n', 'from mortar.api.v2 import API\n', 'from mortar.api.v2 import projects\n', '\n', '# mortar credentials\n', "email = 'myemail@me.org'\n", "api_key = 'my-API-key'\n", '\n', 'api = API(email, api_key)\n', 'my_projects = projects.get_projects(api)\n', '\n', '## Listing Your Running Clusters\n', '\n', 'from mortar.api.v2 import API\n', 'from mortar.api.v2 import clusters\n', '\n', '# mortar credentials\n', "email = 'myemail@me.org'\n", "api_key = 'my-API-key'\n", '\n', 'api = API(email, api_key)\n', 'recent_clusters = clusters.get_clusters(api)\n', '\n', "running_clusters = [c for c in recent_clusters if c['status_code] == clusters.CLUSTER_STATUS_RUNNING]\n", '# Documentation\n', '\n', '* [Mortar API specification](http://help.mortardata.com/reference/api/api_version_2).\n', '* [mortar-api-python doc](http://mortar-api-python.readthedocs.org/en/latest/)\n']
Platform: UNKNOWN
