{"id":18756487,"url":"https://github.com/octoprint/plugin-examples","last_synced_at":"2025-04-13T02:02:51.391Z","repository":{"id":25851966,"uuid":"29291665","full_name":"OctoPrint/Plugin-Examples","owner":"OctoPrint","description":null,"archived":false,"fork":false,"pushed_at":"2022-02-02T12:39:26.000Z","size":44,"stargazers_count":20,"open_issues_count":2,"forks_count":19,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-26T19:44:34.175Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OctoPrint.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-01-15T10:08:48.000Z","updated_at":"2024-02-01T13:05:41.000Z","dependencies_parsed_at":"2022-08-24T14:15:20.158Z","dependency_job_id":null,"html_url":"https://github.com/OctoPrint/Plugin-Examples","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/OctoPrint%2FPlugin-Examples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OctoPrint%2FPlugin-Examples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OctoPrint%2FPlugin-Examples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OctoPrint%2FPlugin-Examples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OctoPrint","download_url":"https://codeload.github.com/OctoPrint/Plugin-Examples/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248654044,"owners_count":21140235,"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-07T17:36:50.383Z","updated_at":"2025-04-13T02:02:51.346Z","avatar_url":"https://github.com/OctoPrint.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OctoPrint Plugin Examples\n\nThis repository collects the sources of examples for writing plugins for [OctoPrint](https://octoprint.org).\n\nCurrently the following example plugins and more can be found here:\n\n  * **add_tornado_route**: Single file plugin (place it in ``~/.octoprint/plugins``) that shows how to utilize the\n    [octoprint.server.http.routes](http://docs.octoprint.org/en/master/plugins/hooks.html#octoprint-server-http-routes) hook\n    to add additional routes with custom ``RequestHandlers`` to the server configuration.\n  * **custom_action_command**: Single file plugin (place it in ``~/.octoprint/plugins``) that shows how to utilize the\n    [octoprint.comm.protocol.action hook](http://docs.octoprint.org/en/master/plugins/hooks.html#octoprint-comm-protocol-action)\n    hook and how to register hook handlers that are part of a mixin implementation. The plugin will listen for \n    firmware messages of the form ``// action:custom`` and if received will log that it received the \"custom\" action\n    from the firmware.\n  * **custom_template_consumer**: Single directory plugin (place it in ``~/.octoprint/plugins``) that shows how to\n    have a plugin inject itself into custom places provided through other plugins in the web interface through utilizing\n    a custom template type if the presence of the provider of that template is detected.\n  * **custom_template_provider**: Single directory plugin (place it in ``~/.octoprint/plugins``) that shows how to\n    provide a custom template type through the [octoprint.ui.web.templatetypes hook](http://docs.octoprint.org/en/master/plugins/hooks.html#octoprint-ui-web-templatetypes)\n    and how to display templates of that type.\n  * **helloworld**: A simple plugin that injects itself into various places in OctoPrint's web interface to display\n    \"Hello World\". Shows the basic structure of a plugin, how plugins can execute code at startup, inject themselves into\n    the interface and how they can control when their content is shown based on internal state of the UI such as login\n    information.\n  * **increase_bodysize**: Single file plugin (place it in ``~/.octoprint/plugins``) that shows how to increase the \n    maximum allowed request body size for specific endpoints by utilizing the \n    [octoprint.server.http.bodysize hook](http://docs.octoprint.org/en/master/plugins/hooks.html#octoprint-server-http-bodysize).\n  * **message_on_connect**: Single file plugin (place it in ``~/.octoprint/plugins``) that shows how to utilize the\n    [octoprint.comm.protocol.scripts hook](http://docs.octoprint.org/en/master/plugins/hooks.html#octoprint-comm-protocol-scripts)\n    by adding an ``M117 OctoPrint connected`` to the GCODE script sent to the printer after OctoPrint connected to\n    it.\n  * **rewrite_m107**: Single file plugin (place it in ``~/.octoprint/plugins``) that shows how to utilize the\n    [octoprint.comm.protocol.gcode hook](http://docs.octoprint.org/en/master/plugins/hooks.html#octoprint-comm-protocol-gcode)\n    by swapping the (deprecated) ``M107`` command with the equivalent ``M106 S0``.\n  * **strip_all_comments**: Single file plugin (place it in ``~/.octoprint/plugins``) that shows how to utilize the\n    [octoprint.filemanager.preprocessor hook](http://docs.octoprint.org/en/master/plugins/hooks.html#octoprint-filemanager-preprocessor)\n    by removing the comments (and empty lines) from all uploaded/generated GCODE files ending on the name postfix \"_strip\".\n\n## Further Links\n\n  * [OctoPrint](https://octoprint.org)\n  * [OctoPrint Source Repository](https://github.com/foosel/OctoPrint)\n  * [OctoPrint Plugin Documentation](http://docs.octoprint.org/en/master/plugins/index.html)\n  \n## License\n\nThese examples are licensed under the MIT license. See also `LICENSE` in the source folder.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foctoprint%2Fplugin-examples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foctoprint%2Fplugin-examples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foctoprint%2Fplugin-examples/lists"}