{ "info": { "author": "Saravanabalagi Ramachandran", "author_email": "saravanabalagi@hotmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Software Development :: Libraries" ], "description": "# Gym HTTP Server\n\nThis project provides a local REST API to the [gym](https://github.com/openai/gym) open-source library, allowing development in languages other than python.\n\nA python client is included, to demonstrate how to interact with the server.\n\n## Installation\n\nInstall the package using pip:\n\n```\npip install gym-http-server\n```\n\n## Usage\n\n### Direct Usage\n\nUse it simply from anywhere by calling\n```\ngym-http-server\n```\n\nIf you would like to run on a specific port, use `--listen` and `--port`\n```\ngym-http-server -l 127.0.0.1 -p 5000\n```\n\n### Pythonic Usage\n\nIf you want to use this inside your python script,\n```\nfrom gym_http_server import start_server\nstart_server()\n```\n\nIf you want to specify ip and port,\n```\nstart_server(listen=='127.0.0.1', port==5000)\n```\n\n## API specification\n\n\n * POST `/v1/envs/`\n * Create an instance of the specified environment\n * param: `env_id` -- gym environment ID string, such as 'CartPole-v0'\n * returns: `instance_id` -- a short identifier (such as '3c657dbc')\n\t for the created environment instance. The instance_id is\n used in future API calls to identify the environment to be\n manipulated\n\n * GET `/v1/envs/`\n * List all environments running on the server\n\t * returns: `envs` -- dict mapping `instance_id` to `env_id`\n\t (e.g. `{'3c657dbc': 'CartPole-v0'}`) for every env on the server\n\n * POST `/v1/envs//reset/`\n * Reset the state of the environment and return an initial\n observation.\n * param: `instance_id` -- a short identifier (such as '3c657dbc')\n for the environment instance\n * returns: `observation` -- the initial observation of the space\n\n * POST `/v1/envs//step/`\n * Step though an environment using an action.\n * param: `instance_id` -- a short identifier (such as '3c657dbc')\n for the environment instance\n\t * param: `action` -- an action to take in the environment\n * returns: `observation` -- agent's observation of the current\n environment\n * returns: `reward` -- amount of reward returned after previous action\n * returns: `done` -- whether the episode has ended\n * returns: `info` -- a dict containing auxiliary diagnostic information\n\n * GET `/v1/envs//action_space/`\n * Get information (name and dimensions/bounds) of the env's\n `action_space`\n * param: `instance_id` -- a short identifier (such as '3c657dbc')\n for the environment instance\n * returns: `info` -- a dict containing 'name' (such as 'Discrete'), and\n additional dimensional info (such as 'n') which varies from\n space to space\n\n * GET `/v1/envs//observation_space/`\n * Get information (name and dimensions/bounds) of the env's\n `observation_space`\n * param: `instance_id` -- a short identifier (such as '3c657dbc')\n for the environment instance\n * returns: `info` -- a dict containing 'name' (such as 'Discrete'), and\n additional dimensional info (such as 'n') which varies from\n space to space\n\n * POST `/v1/envs//monitor/start/`\n * Start monitoring\n * param: `instance_id` -- a short identifier (such as '3c657dbc')\n for the environment instance\n * param: `force` (default=False) -- Clear out existing training\n data from this directory (by deleting every file\n prefixed with \"openaigym.\")\n * param: `resume` (default=False) -- Retain the training data\n already in this directory, which will be merged with\n our new data\n * (NOTE: the `video_callable` parameter from the native\n `env.monitor.start` function is NOT implemented)\n\n * POST `/v1/envs//monitor/close/`\n * Flush all monitor data to disk\n * param: `instance_id` -- a short identifier (such as '3c657dbc')\n for the environment instance\n\n * POST `/v1/upload/`\n * Flush all monitor data to disk\n * param: `training_dir` -- A directory containing the results of a\n training run.\n * param: `api_key` -- Your OpenAI API key\n * param: `algorithm_id` (default=None) -- An arbitrary string\n indicating the paricular version of the algorithm\n (including choices of parameters) you are running.\n\n * POST `/v1/shutdown/`\n * Request a server shutdown\n * Currently used by the integration tests to repeatedly create and destroy fresh copies of the server running in a separate thread\n\n\nForked from the archived [gym-http-api](https://github.com/openai/gym-http-api)\n\n\n## Licence\n\nThe MIT License\n\nCopyright (c) 2019 Saravanabalagi Ramachandran\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/saravanabalagi/gym-http-server", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "gym-http-server", "package_url": "https://pypi.org/project/gym-http-server/", "platform": "", "project_url": "https://pypi.org/project/gym-http-server/", "project_urls": { "Homepage": "https://github.com/saravanabalagi/gym-http-server" }, "release_url": "https://pypi.org/project/gym-http-server/0.0.1/", "requires_dist": [ "Flask (==0.12.3)", "numpy", "gym (==0.7.4)", "requests (==2.21.0)", "pytest" ], "requires_python": "", "summary": "Serve gym on a webserver and receive HTTP requests to play to the game from any client", "version": "0.0.1" }, "last_serial": 4955649, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "0ebe4f48bb60c7ebe1c4e83279357b45", "sha256": "9d818fea5e7c25c9b4e7db5caace88fa8359a4c8a78177167f07cad3804a1be9" }, "downloads": -1, "filename": "gym_http_server-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "0ebe4f48bb60c7ebe1c4e83279357b45", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 14144, "upload_time": "2019-03-18T19:38:41", "url": "https://files.pythonhosted.org/packages/36/a4/dbcba8c1cf84f8e3127200994aa7fc032a27d75222baf908bbede6f42422/gym_http_server-0.0.1-py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "0ebe4f48bb60c7ebe1c4e83279357b45", "sha256": "9d818fea5e7c25c9b4e7db5caace88fa8359a4c8a78177167f07cad3804a1be9" }, "downloads": -1, "filename": "gym_http_server-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "0ebe4f48bb60c7ebe1c4e83279357b45", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 14144, "upload_time": "2019-03-18T19:38:41", "url": "https://files.pythonhosted.org/packages/36/a4/dbcba8c1cf84f8e3127200994aa7fc032a27d75222baf908bbede6f42422/gym_http_server-0.0.1-py3-none-any.whl" } ] }