pyfragments


Namepyfragments JSON
Version 0.3.0 PyPI version JSON
download
home_page
SummaryAdd animations to revealjs presentations from Python code-blocks.
upload_time2024-01-09 09:59:37
maintainer
docs_urlNone
author
requires_python>=3.7
licenseMIT License Copyright (c) 2023 Mauro Silberberg Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords quarto revealjs presentation fragments animations matplotlib
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # PyFragments

Add animated figures to your [Quarto](https://quarto.org) presentations.

## Install

```
pip install pyfragments
```

## Example

A [Revealjs](https://quarto.org/docs/presentations/revealjs/)
presentation created with Quarto,
which displays an *animated* matplotlib figure:

![Animated figure](https://raw.githubusercontent.com/maurosilber/pyfragments/main/docs/animated_figure.gif)

This is created with the following code,
in a Quarto `.qmd` file.

````
---
format: revealjs
---

## Example of an animated figure

Move to the next slide to see the transitions.

```{python}
# | output: asis
import matplotlib.pyplot as plt
from pyfragments import AnimatedFigure

with AnimatedFigure() as ani:
    plt.xlim(0, 10)
    plt.ylim(0, 10)
    for i in range(10):
        with ani.fragment():
            plt.scatter(i, i)

```
````

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "pyfragments",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "quarto,revealjs,presentation,fragments,animations,matplotlib",
    "author": "",
    "author_email": "Mauro Silberberg <maurosilber@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/80/c6/bacae627c5816b5778bf352fe30d7fd0069a3dcc8418f7d18f2663e3fdda/pyfragments-0.3.0.tar.gz",
    "platform": null,
    "description": "# PyFragments\n\nAdd animated figures to your [Quarto](https://quarto.org) presentations.\n\n## Install\n\n```\npip install pyfragments\n```\n\n## Example\n\nA [Revealjs](https://quarto.org/docs/presentations/revealjs/)\npresentation created with Quarto,\nwhich displays an *animated* matplotlib figure:\n\n![Animated figure](https://raw.githubusercontent.com/maurosilber/pyfragments/main/docs/animated_figure.gif)\n\nThis is created with the following code,\nin a Quarto `.qmd` file.\n\n````\n---\nformat: revealjs\n---\n\n## Example of an animated figure\n\nMove to the next slide to see the transitions.\n\n```{python}\n# | output: asis\nimport matplotlib.pyplot as plt\nfrom pyfragments import AnimatedFigure\n\nwith AnimatedFigure() as ani:\n    plt.xlim(0, 10)\n    plt.ylim(0, 10)\n    for i in range(10):\n        with ani.fragment():\n            plt.scatter(i, i)\n\n```\n````\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2023 Mauro Silberberg  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "Add animations to revealjs presentations from Python code-blocks.",
    "version": "0.3.0",
    "project_urls": {
        "Bug Tracker": "https://github.com/maurosilber/pyfragments/issues",
        "Homepage": "https://github.com/maurosilber/pyfragments"
    },
    "split_keywords": [
        "quarto",
        "revealjs",
        "presentation",
        "fragments",
        "animations",
        "matplotlib"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b81f1b0c5b7d1b57cb731823cce97ba905bfbf4934d018606cc70e20161a2219",
                "md5": "b157a77876c0af8762257e63f6619aee",
                "sha256": "4a88a48ec302f4556f97c58aff5e20c1daad06401a09fb9c0f373a09c86661f3"
            },
            "downloads": -1,
            "filename": "pyfragments-0.3.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b157a77876c0af8762257e63f6619aee",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 4834,
            "upload_time": "2024-01-09T09:59:35",
            "upload_time_iso_8601": "2024-01-09T09:59:35.874500Z",
            "url": "https://files.pythonhosted.org/packages/b8/1f/1b0c5b7d1b57cb731823cce97ba905bfbf4934d018606cc70e20161a2219/pyfragments-0.3.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "80c6bacae627c5816b5778bf352fe30d7fd0069a3dcc8418f7d18f2663e3fdda",
                "md5": "d9a1febb1c28b05c449216f73e61e681",
                "sha256": "687ed2cdf4ea5b4dfbf2a1db8342529ca1a5b7ab0fdbb9e21ca75cfdc81c0aba"
            },
            "downloads": -1,
            "filename": "pyfragments-0.3.0.tar.gz",
            "has_sig": false,
            "md5_digest": "d9a1febb1c28b05c449216f73e61e681",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 48606,
            "upload_time": "2024-01-09T09:59:37",
            "upload_time_iso_8601": "2024-01-09T09:59:37.151531Z",
            "url": "https://files.pythonhosted.org/packages/80/c6/bacae627c5816b5778bf352fe30d7fd0069a3dcc8418f7d18f2663e3fdda/pyfragments-0.3.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-09 09:59:37",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "maurosilber",
    "github_project": "pyfragments",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "pyfragments"
}
        
Elapsed time: 0.16445s