{"id":18410588,"url":"https://github.com/vesche/pyba","last_synced_at":"2025-04-12T22:45:07.936Z","repository":{"id":85570742,"uuid":"115149422","full_name":"vesche/pyba","owner":"vesche","description":null,"archived":false,"fork":false,"pushed_at":"2017-12-24T00:31:46.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-12T22:45:05.170Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/vesche.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}},"created_at":"2017-12-22T20:52:40.000Z","updated_at":"2017-12-23T21:41:07.000Z","dependencies_parsed_at":"2023-05-06T20:18:18.659Z","dependency_job_id":null,"html_url":"https://github.com/vesche/pyba","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vesche%2Fpyba","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vesche%2Fpyba/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vesche%2Fpyba/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vesche%2Fpyba/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vesche","download_url":"https://codeload.github.com/vesche/pyba/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248643047,"owners_count":21138353,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-11-06T03:32:58.726Z","updated_at":"2025-04-12T22:45:07.914Z","avatar_url":"https://github.com/vesche.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pyba\n\nPython API for [ByteArena](https://doc.bytearena.com/). Still a work in progress, but it's functional.\n\nWithin `test-agent/agent/` is `agent.py` and `pyba.py`.\n  * `agent.py` is the agent that will run inside your docker container.\n  * `pyba.py` is a Python API for ByteArena.\n\nThe provided agent moves around randomly similar to the [example nodejs agent](https://doc.bytearena.com/guides/getting-started/). Here's how it works:\n\n```python\n#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\n# import the pyba ByteArena API\nimport pyba\nimport random\n\n# create an instance of the ByteArena class from pyba\ncomm = pyba.ByteArena()\n\n# start a loop\nwhile True:\n    # start getting perception of the world\n    if comm.stream(\"perception\"):\n        # get a random direction to move in\n        direction = random.choice([-1, 1])\n        x = direction * random.random()\n        y = 3\n\n        # give actions to steer and shoot in this direction\n        comm.steer(x, y)\n        comm.shoot(x, y)\n\n        # execute those actions\n        comm.sendActions()\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvesche%2Fpyba","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvesche%2Fpyba","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvesche%2Fpyba/lists"}