{ "info": { "author": "John Reese", "author_email": "john@noswap.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Topic :: Software Development :: Libraries" ], "description": "Objects In Python\n=================\n\nInterface to [Objects In Space][ois] for [CircuitPython][] embedded hardware.\n\n[![build status](https://travis-ci.org/jreese/objectsinpython.svg?branch=master)](https://travis-ci.org/jreese/objectsinpython)\n[![version](https://img.shields.io/pypi/v/objectsinpython.svg)](https://pypi.org/project/objectsinpython)\n[![license](https://img.shields.io/pypi/l/objectsinpython.svg)](https://github.com/jreese/objectsinpython/blob/master/LICENSE)\n[![code style](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)\n\n\nInstall\n-------\n\nDownload the [compiled module][builds] and copy them to your board. Note there are two\nversions: \"full\" or regular for boards with more memory (eg, M4/samd51) and \"tiny\" for\nboards with less memory (eg, M0/samd21). When using the tiny build, be sure to rename\nthe module to `oip.mpy`.\n\n```bash\n$ cp -X oip.mpy /Volumes/CIRCUITPY/oip.mpy\n```\n\nOR\n\n```bash\n$ cp -X oip-tiny.mpy /Volumes/CIRCUITPY/oip.mpy\n```\n\n\nOverview\n--------\n\nObjects In Python uses a simple, event-based API to execute your functions when buttons\nare pressed or game values update. Getting started is as easy as importing the module,\ncreating the interface, and starting the connection:\n\n```python\nfrom oip import OIP\n\noip = OIP()\n...\noip.start()\n```\n\nTurn lights on or off when game state changes: \n\n```python\n@oip.on(\"IFF_ACTIVE\")\ndef iff_active(now, value):\n pixels[0] = BLUE if value else RED\n```\n\nConnect buttons to game commands:\n\n```python\n@oip.press(board.BUTTON_A)\ndef thrust_while_holding(now, value):\n oip.execute(\"BURN_MAIN_ENGINE\" if value else \"STOP_MAIN_ENGINE\")\n```\n\nWith the full build, use helper classes to mitigate typoes:\n\n```python\n@oip.on(Boolean.IFF_ACTIVE)\ndef iff_active(now, value):\n ...\n\n@oip.press(board.BUTTON_A)\ndef thrust_while_holding(now, value):\n oip.execute(Command.BURN_MAIN_ENGINE if value else Command.STOP_MAIN_ENGINE)\n```\n\nCheck out the [example projects][examples] for more ideas.\n\n\nLicense\n-------\n\nObjects In Python is copyright [John Reese](https://jreese.sh), and licensed under the\nMIT license. I am providing code in this repository to you under an open source\nlicense. This is my personal repository; the license you receive to my code\nis from me and not from my employer. See the `LICENSE` file for details.\n\n[ois]: http://objectsgame.com/\n[CircuitPython]: https://circuitpython.org\n[builds]: https://github.com/jreese/objectsinpython/releases/latest\n[examples]: https://github.com/jreese/objectsinpython/tree/master/examples", "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/jreese/cpgame", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "objectsinpython", "package_url": "https://pypi.org/project/objectsinpython/", "platform": "", "project_url": "https://pypi.org/project/objectsinpython/", "project_urls": { "Homepage": "https://github.com/jreese/cpgame" }, "release_url": "https://pypi.org/project/objectsinpython/0.9/", "requires_dist": null, "requires_python": ">=3.6", "summary": "Interface to Objects In Space from CircuitPython embedded hardware", "version": "0.9" }, "last_serial": 4937487, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "fba6ae559ac8d7dce76eee2e9126678e", "sha256": "2ab2d1de60808e2a28e0e4f1f87712c18c149b2ba59c74afcb64bdc1e14ff68e" }, "downloads": -1, "filename": "objectsinpython-0.1.tar.gz", "has_sig": false, "md5_digest": "fba6ae559ac8d7dce76eee2e9126678e", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 12276, "upload_time": "2019-03-14T02:59:32", "url": "https://files.pythonhosted.org/packages/47/36/2150170910e9bc2c799864e043209adab0145eb323c74ffe9eed5241844c/objectsinpython-0.1.tar.gz" } ], "0.9": [ { "comment_text": "", "digests": { "md5": "51a8497201399ef38e95f8771996a271", "sha256": "13e8c332309d83db9982cdcb64ee8294425a5457c61e0e95d962614bb183d769" }, "downloads": -1, "filename": "objectsinpython-0.9.tar.gz", "has_sig": false, "md5_digest": "51a8497201399ef38e95f8771996a271", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 12273, "upload_time": "2019-03-14T03:05:05", "url": "https://files.pythonhosted.org/packages/17/2d/93c2d7050554e1b2345e721dde36f4a07d18005cff826f4a1b268ccc7c0e/objectsinpython-0.9.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "51a8497201399ef38e95f8771996a271", "sha256": "13e8c332309d83db9982cdcb64ee8294425a5457c61e0e95d962614bb183d769" }, "downloads": -1, "filename": "objectsinpython-0.9.tar.gz", "has_sig": false, "md5_digest": "51a8497201399ef38e95f8771996a271", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 12273, "upload_time": "2019-03-14T03:05:05", "url": "https://files.pythonhosted.org/packages/17/2d/93c2d7050554e1b2345e721dde36f4a07d18005cff826f4a1b268ccc7c0e/objectsinpython-0.9.tar.gz" } ] }