{"id":34623206,"url":"https://github.com/pockerman/bitrl-rest-api","last_synced_at":"2026-05-29T05:31:27.479Z","repository":{"id":323296657,"uuid":"1092543307","full_name":"pockerman/bitrl-rest-api","owner":"pockerman","description":"An API for accessing reinforcement learning environments in a REST like manner","archived":false,"fork":false,"pushed_at":"2025-12-30T14:29:57.000Z","size":280,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-31T01:56:46.252Z","etag":null,"topics":["gymnasium-environment","reinforcment-learning","rest-api"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pockerman.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-08T20:26:58.000Z","updated_at":"2025-12-30T14:26:58.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/pockerman/bitrl-rest-api","commit_stats":null,"previous_names":["pockerman/bitrl","pockerman/bitrl-rest-api"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/pockerman/bitrl-rest-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pockerman%2Fbitrl-rest-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pockerman%2Fbitrl-rest-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pockerman%2Fbitrl-rest-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pockerman%2Fbitrl-rest-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pockerman","download_url":"https://codeload.github.com/pockerman/bitrl-rest-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pockerman%2Fbitrl-rest-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33639050,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-29T02:00:06.066Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gymnasium-environment","reinforcment-learning","rest-api"],"created_at":"2025-12-24T15:41:40.145Z","updated_at":"2026-05-29T05:31:27.464Z","avatar_url":"https://github.com/pockerman.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bitrl-envs-api\n\nAPI for reinforcement learning environments. Each environment exposes a Gymnasium like interface.\nThe API is based on \u003ca href=\"https://fastapi.tiangolo.com/\"\u003eFastAPI\u003c/a\u003e. You can launch a server using the ```entrypoint.sh``` script.\nAlternatively, you can use Docker. You can find examples with C++ at: \u003ca href=\"https://github.com/pockerman/bitrl\"\u003ebitrl\u003c/a\u003e\n\nThe available endpoints are described below.\n\n## Environment API\n\n### Query liveness\n\n```commandline\nGET /{idx}/is-alive\n```\n\n**Description:** Returns true if the environment with the given id is alive on the server. The response format is\n\n```commandline\n{\"result\": is_alive_}\n```\n\n### Close the environment\n\n```commandline\nPOST /{idx}/close\n```\n\n**Description:** Closes the environment with the given id. The response format on successful op is:\n\n```commandline\n{\"message\": \"OK\"}\n```\n\nreturns \n\n```commandline\n{\"message\": \"FAILED\"}\n```\n\nif the the op was not successful.\n\n### Create a new environment\n\n```commandline\nPOST /make\n```\n\n**Description:** Creates a new environment. Response format:\n\n```commandline\n{\"message\": \"OK\", \"idx\": \"idx\"}\n```\n#### Payload:\n```commandline\n{\n \"version\": \"version\",\n \"options\": json\n}\n```\n\n### Reset the environment\n\n```commandline\nPOST /{idx}/reset\n```\n\n**Description:** Reset the environment with the given id. Response format:\n\n```commandline\n{\"time_step\": step}\n```\n\nwhere _step_ has the following structure:\n\n```commandline\nclass TimeStep(BaseModel, Generic[_Reward, _Discount, _Observation]):\n    step_type: TimeStepType = Field(title=\"step_type\")\n    reward: Optional[_Reward] = Field(title=\"reward\")\n    discount: Optional[_Discount] = Field(title=\"discount\")\n    observation: _Observation = Field(title=\"observation\")\n    info: dict = Field(title=\"info\")\n\n    def first(self) -\u003e bool:\n        return self.step_type == TimeStepType.FIRST\n\n    def mid(self) -\u003e bool:\n        return self.step_type == TimeStepType.MID\n\n    def last(self) -\u003e bool:\n        return self.step_type == TimeStepType.LAST\n\n    @property\n    def done(self) -\u003e bool:\n        return self.last()\n```\n#### Payload:\n```commandline\n{\nseed: int = 42,\noptions: dict[str, Any] = {}\n}\n```\n\n### Step in the environment\n\n```commandline\nPOST /{idx}/step\n```\n\n**Description:** Step in the environment with the given id. Response format:\n\n```commandline\n{\"time_step\": step}\n```\n\n#### Payload:\n\n```commandline\n action: Any\n```\n\nwhere _action_ is the admissible action to be executed on the environment.\n\n### Query number of copies\n\n```commandline\nGET /copies\n```\n\n**Description:** Query the number of copies available for a specific environment. Response format:\n\n```commandline\n{\"copies\": len(manager)}\n```\n\n## Tensorboard API\n\nThere is also a limited API for Tensorboard:\n\n```commandline\nPOST /init\nPOST /close\nPOST /add-text\nPOST /add-scalar\nPOST /add-scalars\n```\n\n\n## Installation\n\nYou can use Docker to run the API:\n\n```commandline\ndocker build -t bitrl-rest-api:v1 .\ndocker run -p 8001:8001 bitrl-rest-api:v1\n```\n\nYou can access the API documentation at http://0.0.0.0:8001/docs\n\nThere is also a pre-built Docker image at: https://hub.docker.com/repository/docker/alexgiavaras/bitrl-rest-api/general\n\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpockerman%2Fbitrl-rest-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpockerman%2Fbitrl-rest-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpockerman%2Fbitrl-rest-api/lists"}