{ "info": { "author": "Nicholas Brochu", "author_email": "nicholas@serpent.ai", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3.6" ], "description": "sneakysnek\n==========\n\n``sneakysnek`` is a minimalistic, cross-platform global input capture\nsolution for Python 3.6+. While there are certainly already offerings in\nterms of input libraries, they generally focus more on sending input,\nwith capturing only being an afterthought. ``sneakysnek`` is dead simple\nin both its design and how you end up using it. You will be up and\nrunning in less than 5 lines of code and will start receiving lean &\nuniversal events on all 3 supported platforms (Linux, Windows, macOS).\n\nThis library was built with the goal of powering the Gameplay Recording\nfeature in the `Serpent.AI\nFramework `__ where keyboard &\nmouse inputs are collected alongside frame sequences to build machine\nlearning datasets.\n\nFeel free to study the code to learn more about input capturing and use\nit responsibly!\n\n|image0|\n\nInstallation\n------------\n\n::\n\n pip install sneakysnek\n\nZero dependencies on Windows. Will install ``pyobjc-framework-Quartz``\non macOS and ``python-xlib`` on Linux.\n\nDemo\n----\n\nOnce installed in your Python environment, you can take it for a quick\nspin to test it on your platform. Just run ``sneakysnek``.\n\nUsage\n-----\n\nUsing ``sneakysnek`` is ridiculously simple:\n\n.. code:: python\n\n from sneakysnek.recorder import Recorder\n\n recorder = Recorder.record(print) # Replace print with any callback that accepts an 'event' arg\n # Some blocking code in your main thread...\n\n``sneakysnek`` runs its capturing and callbacks in separate threads. It\nshould not leave anything behind in most cases. For optimal cleanliness,\nrun ``recorder.stop()`` from your main thread when you are done\nrecording.\n\nEvents\n------\n\nThe callback you provide your recorder with will receive one of the\nfollowing 2 event objects:\n\nKeyboardEvent\n~~~~~~~~~~~~~\n\nRepresents an event captured from the keyboard.\n\n**Attributes**\n\n- *event*: One of ``KeyboardEvents.DOWN``, ``KeyboardEvents.UP``\n- *keyboard_key*: One entry from the `KeyboardKey\n enumeration `__\n- *timestamp*: A ``time.time()`` timestamp\n\nMouseEvent\n~~~~~~~~~~\n\nRepresents an event captured from the mouse.\n\n**Attributes**\n\n- *event*: One of ``MouseEvents.CLICK``. ``MouseEvents.SCROLL``,\n ``MouseEvents.MOVE``\n- *button*: One entry from the `MouseButton\n enumeration `__\n- *direction*: One of ``\"DOWN\"``, ``\"UP\"``\n- *velocity*: An integer representing the velocity of scroll events\n (only >1 on macOS)\n- *x*: An integer representing the x coordinate of the mouse position\n- *y*: An integer representing the y coordinate of the mouse position\n- *timestamp*: A ``time.time()`` timestamp\n\nEnjoying this?\n==============\n\nAwesome! For more content, feel free to:\n\n- Learn more about the Serpent.AI Python Framework -\n `Website `__ - `Blog `__ -\n `Repo `__\n- Watch some Python development on\n `Twitch `__ &\n `YouTube `__\n- Follow Serpent.AI on `Twitter `__\n\n<3\n~~\n\n.. |image0| image:: https://s3.ca-central-1.amazonaws.com/serpent-ai-assets/sneakysnek.gif\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/SerpentAI/sneakysnek", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "sneakysnek", "package_url": "https://pypi.org/project/sneakysnek/", "platform": "", "project_url": "https://pypi.org/project/sneakysnek/", "project_urls": { "Homepage": "https://github.com/SerpentAI/sneakysnek" }, "release_url": "https://pypi.org/project/sneakysnek/0.1.1/", "requires_dist": null, "requires_python": "", "summary": "Dead simple cross-platform keyboard & mouse global input capture solution for Python 3.6+", "version": "0.1.1" }, "last_serial": 3549099, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "5e2830afba532c1115fae194f3069df0", "sha256": "df45033850047e0ffa01fab647ee0d44065fd0f31a8a76e97b39d40b82b99cdb" }, "downloads": -1, "filename": "sneakysnek-0.0.1.tar.gz", "has_sig": false, "md5_digest": "5e2830afba532c1115fae194f3069df0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8640, "upload_time": "2018-01-29T10:11:59", "url": "https://files.pythonhosted.org/packages/95/40/ab80f0ae462eae8b429b12418339f9f0e14a9f5f3449c1cc776289ba83c4/sneakysnek-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "82c85b22b19394204999651484a20d37", "sha256": "730f113b623841a144e6a1b919a888562801d208c01545427ed030f262601ac3" }, "downloads": -1, "filename": "sneakysnek-0.0.2.tar.gz", "has_sig": false, "md5_digest": "82c85b22b19394204999651484a20d37", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10099, "upload_time": "2018-01-29T10:30:41", "url": "https://files.pythonhosted.org/packages/89/20/82329577deecc5bc63e5cd5ce084759ee41d99d7dcdc202b76d642421810/sneakysnek-0.0.2.tar.gz" } ], "0.1.0": [ { "comment_text": "", "digests": { "md5": "3400841cf207dadefa2c8e33cae22166", "sha256": "7f0f7ae9f51302a81b2ef35c41f5c98e9635d2d5d7106b7b72c318f00a51bb74" }, "downloads": -1, "filename": "sneakysnek-0.1.0.tar.gz", "has_sig": false, "md5_digest": "3400841cf207dadefa2c8e33cae22166", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10099, "upload_time": "2018-01-29T10:46:36", "url": "https://files.pythonhosted.org/packages/69/e0/a2dc31f4b14e8863b1b707448c32e017bd9a863349b47955a6a172a24b3d/sneakysnek-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "064783f1a8449c2f2e1c0bacfd77b5a8", "sha256": "a16255af32cc6c0fa88f7337efcec3e5e51a2f9696634590dbed2f1c542399e1" }, "downloads": -1, "filename": "sneakysnek-0.1.1.tar.gz", "has_sig": false, "md5_digest": "064783f1a8449c2f2e1c0bacfd77b5a8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10114, "upload_time": "2018-02-03T20:12:03", "url": "https://files.pythonhosted.org/packages/ae/d6/b8db7b4d7640e81cbbc89c66dbbdd59e9a42e0f3f72f15748a11b77cf592/sneakysnek-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "064783f1a8449c2f2e1c0bacfd77b5a8", "sha256": "a16255af32cc6c0fa88f7337efcec3e5e51a2f9696634590dbed2f1c542399e1" }, "downloads": -1, "filename": "sneakysnek-0.1.1.tar.gz", "has_sig": false, "md5_digest": "064783f1a8449c2f2e1c0bacfd77b5a8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10114, "upload_time": "2018-02-03T20:12:03", "url": "https://files.pythonhosted.org/packages/ae/d6/b8db7b4d7640e81cbbc89c66dbbdd59e9a42e0f3f72f15748a11b77cf592/sneakysnek-0.1.1.tar.gz" } ] }