{"id":18729897,"url":"https://github.com/manimcommunity/manim-plugintemplate","last_synced_at":"2025-04-12T16:53:16.610Z","repository":{"id":52387119,"uuid":"319019637","full_name":"ManimCommunity/manim-plugintemplate","owner":"ManimCommunity","description":"A template project to both illustrate and serve as an example for plugin creations on top of the manim.","archived":false,"fork":false,"pushed_at":"2021-04-30T04:20:31.000Z","size":96,"stargazers_count":18,"open_issues_count":1,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-10T10:40:11.008Z","etag":null,"topics":["animation","manim","plugin","python"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/manim-plugintemplate/","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/ManimCommunity.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-12-06T11:45:00.000Z","updated_at":"2024-12-31T18:28:08.000Z","dependencies_parsed_at":"2022-09-26T17:20:35.615Z","dependency_job_id":null,"html_url":"https://github.com/ManimCommunity/manim-plugintemplate","commit_stats":null,"previous_names":[],"tags_count":2,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ManimCommunity%2Fmanim-plugintemplate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ManimCommunity%2Fmanim-plugintemplate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ManimCommunity%2Fmanim-plugintemplate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ManimCommunity%2Fmanim-plugintemplate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ManimCommunity","download_url":"https://codeload.github.com/ManimCommunity/manim-plugintemplate/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248601349,"owners_count":21131608,"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":["animation","manim","plugin","python"],"created_at":"2024-11-07T14:29:35.194Z","updated_at":"2025-04-12T16:53:16.582Z","avatar_url":"https://github.com/ManimCommunity.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Plugin Template\n\nPlugins are features that extend Manim's core functionality. This is a\ntemplate project that demonstrates how you can create and upload a manim\nplugin to PyPI using a PEP 517 compliant build system,\n[Poetry](https://python-poetry.org).\n\nPoetry is **NOT** required to create plugins, but is recommended because\nit provides build isolation and ensures users can reliably install your\nplugin without falling into dependency hell. You may use another build\nsystem (e.g. Flit, Setuptools, Pipenv, etc...) if you wish.\n\n# Plugin Website\n\nA gallery of current plugins can be found here: https://plugins.manim.community/\n\n## Creating Plugins\n\nThe only requirement of your preferred build system is that it specifies\nthe `manim.plugins` [entry\npoint](https://packaging.python.org/specifications/entry-points/).\n\n\u003e **note**\n\u003e\n\u003e The plugin naming convention is to add the prefix `manim-`. This\n\u003e allows users to easily search for plugins on organizations like PyPi,\n\u003e but it is not required.\n\n### Installing Poetry\n\nPoetry can be installed on Windows, MacOS and Linux. Please visit the\nofficial poetry website for [installation\ninstructions](https://python-poetry.org/docs/#installation). You may\nwant to see the official documentation for a list of all [available\ncommands](https://python-poetry.org/docs/cli/).\n\n### Setting Up Your Plugin Directory Structure\n\nTo create a Python project suitable for poetry, run:\n\n``` {.sourceCode .bash}\npoetry new --src manim-YourPluginName \n```\n\n\u003e **note**\n\u003e\n\u003e `--src` is both optional and recomended in order to create a src\n\u003e directory where all of your plugin code should live.\n\nThis will create the following project structure: :\n\n    manim-YourPluginName\n    ├── pyproject.toml\n    ├── README.rst\n    ├── src\n    │   └── manim_yourpluginname\n    │       └── __init__.py\n    └── tests\n        ├── __init__.py\n        └── test_manim_yourpluginname.py \n\nIf you have already extended manim's functionality, you can instead run:\n\n``` {.sourceCode .bash}\ncd path/to/plugin\npoetry init\n```\n\nThis will prompt you for basic information regarding your plugin and\nhelp create and populate a `pyproject.toml` similar to the one in this\ntemplate; however, you may wish to update your project directory\nstructure similarly.\n\nSee the official documentation for more information on the [init\ncommand](https://python-poetry.org/docs/cli/#init).\n\nFrom now on, when working on your plugin, ensure you are using the\nvirtual environment by running the following at the root of your\nproject:\n\n``` {.sourceCode .bash}\npoetry shell \n```\n\n### Updating Pyproject.toml\n\nThe `pyproject.toml` file is used by Poetry and other build systems to\nmanage and configure your project. Manim uses the package's entry point\nmetadata to discover available plugins. The entry point group,\n`\"manim.plugins\"`, is **REQUIRED** and can be [specified as\nfollows](https://python-poetry.org/docs/pyproject/#plugins):\n\n``` {.sourceCode .toml}\n[tool.poetry.plugins.\"manim.plugins\"]\n\"manim_yourpluginname\" = \"module:object.attr\"\n```\n\n\u003e **note**\n\u003e\n\u003e The left hand side represents the entry point name which should be\n\u003e unique among other plugin names. This is the internal name Manim will\n\u003e use to identify and handle plugins.\n\u003e\n\u003e The right hand side should reference a python object (i.e. module,\n\u003e class, function, method, etc...) and will be the first code run in\n\u003e your plugin. In the case of this template repository, the package name\n\u003e is used which Python interprets as the package's `__init__.py` module.\n\u003e\n\u003e See the python packaging\n\u003e [documentation](https://packaging.python.org/specifications/entry-points/)\n\u003e for more information on entry points.\n\n### Testing Your Plugin Locally\n\n\n``` {.sourceCode .bash}\npoetry install\n```\n\nThis command will read the `pyproject.toml`, install the dependencies of\nyour plugin, and create a `poetry.lock` file to ensure everyone using\nyour plugin gets the same version of dependencies. It is important that\nyour dependencies are properly annotated with a version constraint (e.g.\n`manim:^0.1.1`, `numpy:*`, etc...). Equally important to the\ndependencies specified here is that they do not directly conflict with\n[Manim's](https://github.com/ManimCommunity/manim/blob/master/pyproject.toml).\nIf you want to update the dependencies specified in `pyproject.toml`,\nuse:\n\n``` {.sourceCode .bash}\npoetry update\n```\n\nSee the official documentation for more information on\n[versioning](https://python-poetry.org/docs/dependency-specification/)\nor the [install command](https://python-poetry.org/docs/cli/#install).\n\nPoetry allows for dependencies that are strictly for project developers.\nThese are not installed by users. To add them to your project, update\nthe `pyproject.toml` file with the section followed by the dependencies:\n\n``` {.sourceCode .toml}\n[tool.poetry.dev-dependencies]\npytest = \"*\"\npylint = \"*\"\n```\n\nThe `pytest` package is a functional testing framework which you can use\nto run the test within the `manim-YourPluginName/tests` directory. You\nshould create files which test the behavior and functionality of your\nplugin here. Test first development is a good practice to ensure your\ncode behaves as intended before packaging and shipping your code\npublicly. Additionally, you can create Manimations that depend on your\nplugin which is another great way to ensure functionality.\n\n### Uploading Your Project\n\n\nBy default, poetry is set to register the package/plugin to PyPI. You'll\nneed to register an account there to upload/update your plugin. As soon\nas your plugin is useful locally, run the following:\n\n``` {.sourceCode .bash}\npoetry publish --build\n```\n\nYour project should now be available on PyPI for users to install via\n`pip install manim-YourPluginName` and usable within their respective\nenvironments.\n\nSee the official documentation for more information on the [publish\ncommand](https://python-poetry.org/docs/cli/#publish).\n\n## Code of Conduct\n\n\nOur full code of conduct, and how we enforce it, can be read on [our website](https://docs.manim.community/en/latest/conduct.html).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanimcommunity%2Fmanim-plugintemplate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmanimcommunity%2Fmanim-plugintemplate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanimcommunity%2Fmanim-plugintemplate/lists"}