pycairo


Namepycairo JSON
Version 1.26.0 PyPI version JSON
download
home_pagehttps://pycairo.readthedocs.io
SummaryPython interface for cairo
upload_time2024-02-11 21:26:09
maintainerChristoph Reiter
docs_urlNone
author
requires_python>=3.8
licenseLGPL-2.1-only OR MPL-1.1
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            .. image:: https://raw.githubusercontent.com/pygobject/pycairo/main/docs/images/pycairo.svg
   :align: center
   :width: 370px

|

Pycairo is a Python module providing bindings for the `cairo graphics library
<https://cairographics.org/>`__. It depends on **cairo >= 1.15.10** and works
with **Python 3.8+** and **PyPy3**. Pycairo, including this documentation, is
licensed under the `LGPL-2.1-only OR MPL-1.1 <https://spdx.dev/ids>`__.

The Pycairo bindings are designed to match the cairo C API as closely as
possible, and to deviate only in cases which are clearly better implemented in
a more ‘Pythonic’ way.

.. code:: shell

    pip install pycairo

Installing Pycairo requires cairo including its headers. For more info see
"`Getting Started
<https://pycairo.readthedocs.io/en/latest/getting_started.html>`__".

----

.. code:: python

    import cairo

    with cairo.SVGSurface("example.svg", 200, 200) as surface:
        context = cairo.Context(surface)
        x, y, x1, y1 = 0.1, 0.5, 0.4, 0.9
        x2, y2, x3, y3 = 0.6, 0.1, 0.9, 0.5
        context.scale(200, 200)
        context.set_line_width(0.04)
        context.move_to(x, y)
        context.curve_to(x1, y1, x2, y2, x3, y3)
        context.stroke()
        context.set_source_rgba(1, 0.2, 0.2, 0.6)
        context.set_line_width(0.02)
        context.move_to(x, y)
        context.line_to(x1, y1)
        context.move_to(x2, y2)
        context.line_to(x3, y3)
        context.stroke()

.. image:: https://raw.githubusercontent.com/pygobject/pycairo/main/docs/images/example.svg
    :width: 320px
    :align: center

----

Features of the Pycairo bindings:

* Provides an object oriented interface to cairo.
* Queries the error status of objects and translates them to exceptions.
* Provides a C API that can be used by other Python extensions.
* Fully typed and documented API.

For more information visit https://pycairo.readthedocs.io

            

Raw data

            {
    "_id": null,
    "home_page": "https://pycairo.readthedocs.io",
    "name": "pycairo",
    "maintainer": "Christoph Reiter",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "reiter.christoph@gmail.com",
    "keywords": "",
    "author": "",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/1c/41/91955188e97c7b85fbaac6bbf4e33de028899e0aa31bdce99b1afe2eeb17/pycairo-1.26.0.tar.gz",
    "platform": null,
    "description": ".. image:: https://raw.githubusercontent.com/pygobject/pycairo/main/docs/images/pycairo.svg\r\n   :align: center\r\n   :width: 370px\r\n\r\n|\r\n\r\nPycairo is a Python module providing bindings for the `cairo graphics library\r\n<https://cairographics.org/>`__. It depends on **cairo >= 1.15.10** and works\r\nwith **Python 3.8+** and **PyPy3**. Pycairo, including this documentation, is\r\nlicensed under the `LGPL-2.1-only OR MPL-1.1 <https://spdx.dev/ids>`__.\r\n\r\nThe Pycairo bindings are designed to match the cairo C API as closely as\r\npossible, and to deviate only in cases which are clearly better implemented in\r\na more \u2018Pythonic\u2019 way.\r\n\r\n.. code:: shell\r\n\r\n    pip install pycairo\r\n\r\nInstalling Pycairo requires cairo including its headers. For more info see\r\n\"`Getting Started\r\n<https://pycairo.readthedocs.io/en/latest/getting_started.html>`__\".\r\n\r\n----\r\n\r\n.. code:: python\r\n\r\n    import cairo\r\n\r\n    with cairo.SVGSurface(\"example.svg\", 200, 200) as surface:\r\n        context = cairo.Context(surface)\r\n        x, y, x1, y1 = 0.1, 0.5, 0.4, 0.9\r\n        x2, y2, x3, y3 = 0.6, 0.1, 0.9, 0.5\r\n        context.scale(200, 200)\r\n        context.set_line_width(0.04)\r\n        context.move_to(x, y)\r\n        context.curve_to(x1, y1, x2, y2, x3, y3)\r\n        context.stroke()\r\n        context.set_source_rgba(1, 0.2, 0.2, 0.6)\r\n        context.set_line_width(0.02)\r\n        context.move_to(x, y)\r\n        context.line_to(x1, y1)\r\n        context.move_to(x2, y2)\r\n        context.line_to(x3, y3)\r\n        context.stroke()\r\n\r\n.. image:: https://raw.githubusercontent.com/pygobject/pycairo/main/docs/images/example.svg\r\n    :width: 320px\r\n    :align: center\r\n\r\n----\r\n\r\nFeatures of the Pycairo bindings:\r\n\r\n* Provides an object oriented interface to cairo.\r\n* Queries the error status of objects and translates them to exceptions.\r\n* Provides a C API that can be used by other Python extensions.\r\n* Fully typed and documented API.\r\n\r\nFor more information visit https://pycairo.readthedocs.io\r\n",
    "bugtrack_url": null,
    "license": "LGPL-2.1-only OR MPL-1.1",
    "summary": "Python interface for cairo",
    "version": "1.26.0",
    "project_urls": {
        "Homepage": "https://pycairo.readthedocs.io",
        "Source": "https://github.com/pygobject/pycairo"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "379217fcf820b590af2283a0888f0b493bf00fe8a837d002548a2ed4774076a5",
                "md5": "e7acaefb61a4c85f4142170b76f2f228",
                "sha256": "696ba8024d2827e66e088a6e05a3b0aea30d289476bcb2ca47c9670d40900a50"
            },
            "downloads": -1,
            "filename": "pycairo-1.26.0-cp310-cp310-win32.whl",
            "has_sig": false,
            "md5_digest": "e7acaefb61a4c85f4142170b76f2f228",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": ">=3.8",
            "size": 764524,
            "upload_time": "2024-02-11T21:25:30",
            "upload_time_iso_8601": "2024-02-11T21:25:30.598414Z",
            "url": "https://files.pythonhosted.org/packages/37/92/17fcf820b590af2283a0888f0b493bf00fe8a837d002548a2ed4774076a5/pycairo-1.26.0-cp310-cp310-win32.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "84a879aab9217cf08817fbc425a5a36f67837cbc877456546b658db7ae7d9dc8",
                "md5": "6c45a34e72f2bdff96c095b00c0a24d6",
                "sha256": "b6690a00fb225c19f42d76660e676aba7ae7cb18f3632cb02bce7f0d9b9c3800"
            },
            "downloads": -1,
            "filename": "pycairo-1.26.0-cp310-cp310-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "6c45a34e72f2bdff96c095b00c0a24d6",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": ">=3.8",
            "size": 859143,
            "upload_time": "2024-02-11T21:25:34",
            "upload_time_iso_8601": "2024-02-11T21:25:34.101777Z",
            "url": "https://files.pythonhosted.org/packages/84/a8/79aab9217cf08817fbc425a5a36f67837cbc877456546b658db7ae7d9dc8/pycairo-1.26.0-cp310-cp310-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "62543f564d9a87b394318f5d4c50a9c35501ff7b754dcaf173ae923bed433ca9",
                "md5": "39bb3acb2fa65dbfec81acdad2b925ac",
                "sha256": "1d54e28170a5e790269d9db4c195cca5152ff018ba7e330d0ed05d86ccc2ea7d"
            },
            "downloads": -1,
            "filename": "pycairo-1.26.0-cp310-cp310-win_arm64.whl",
            "has_sig": false,
            "md5_digest": "39bb3acb2fa65dbfec81acdad2b925ac",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": ">=3.8",
            "size": 677885,
            "upload_time": "2024-02-11T21:25:36",
            "upload_time_iso_8601": "2024-02-11T21:25:36.682049Z",
            "url": "https://files.pythonhosted.org/packages/62/54/3f564d9a87b394318f5d4c50a9c35501ff7b754dcaf173ae923bed433ca9/pycairo-1.26.0-cp310-cp310-win_arm64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3de5dee0835e467f75dfca888ba372fee8001e77ab3ed13a512c6eeb57c9fe74",
                "md5": "5fc9deea922ecc34c906cb48ebf34f2b",
                "sha256": "5986b8da3e7de7ab931d7ad527938df38f75d3a3bdea2b515c786c5ca2c5093c"
            },
            "downloads": -1,
            "filename": "pycairo-1.26.0-cp311-cp311-win32.whl",
            "has_sig": false,
            "md5_digest": "5fc9deea922ecc34c906cb48ebf34f2b",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": ">=3.8",
            "size": 764529,
            "upload_time": "2024-02-11T21:25:39",
            "upload_time_iso_8601": "2024-02-11T21:25:39.666048Z",
            "url": "https://files.pythonhosted.org/packages/3d/e5/dee0835e467f75dfca888ba372fee8001e77ab3ed13a512c6eeb57c9fe74/pycairo-1.26.0-cp311-cp311-win32.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5ee2c6a5d093aade4d3c176026cfd4d2ae2c7c071bbbb296fd39458c1853ce92",
                "md5": "8aafcc29ac99697cf63cb8e92f9f6255",
                "sha256": "d374d9ec6d2f791bf57105d87a9028db1ef2b687848f64a524e447033eae7229"
            },
            "downloads": -1,
            "filename": "pycairo-1.26.0-cp311-cp311-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "8aafcc29ac99697cf63cb8e92f9f6255",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": ">=3.8",
            "size": 859139,
            "upload_time": "2024-02-11T21:25:42",
            "upload_time_iso_8601": "2024-02-11T21:25:42.976540Z",
            "url": "https://files.pythonhosted.org/packages/5e/e2/c6a5d093aade4d3c176026cfd4d2ae2c7c071bbbb296fd39458c1853ce92/pycairo-1.26.0-cp311-cp311-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e3e6d9c4e3e1c32883c4f43edfd575d9ecdccac9ba78e23912d74400e14535ed",
                "md5": "ea10848a97f27435e333c15f95c48e22",
                "sha256": "20a31af89d92ffd5fc60c08e65ff649f16e18621a14a40dbdb049fc74942d7a9"
            },
            "downloads": -1,
            "filename": "pycairo-1.26.0-cp311-cp311-win_arm64.whl",
            "has_sig": false,
            "md5_digest": "ea10848a97f27435e333c15f95c48e22",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": ">=3.8",
            "size": 677874,
            "upload_time": "2024-02-11T21:25:45",
            "upload_time_iso_8601": "2024-02-11T21:25:45.963049Z",
            "url": "https://files.pythonhosted.org/packages/e3/e6/d9c4e3e1c32883c4f43edfd575d9ecdccac9ba78e23912d74400e14535ed/pycairo-1.26.0-cp311-cp311-win_arm64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b0884b99e251eff23fcebbc155f076741830b349a2180bb00cd8cc37c91db267",
                "md5": "ee6aa99c4ccfb4b4b4184eb5a054e61f",
                "sha256": "d63929ab5a2f890a333f2f2f51de9f1c9fe20d1bddc982c2ca577b737448d72f"
            },
            "downloads": -1,
            "filename": "pycairo-1.26.0-cp312-cp312-win32.whl",
            "has_sig": false,
            "md5_digest": "ee6aa99c4ccfb4b4b4184eb5a054e61f",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": ">=3.8",
            "size": 764963,
            "upload_time": "2024-02-11T21:25:49",
            "upload_time_iso_8601": "2024-02-11T21:25:49.091005Z",
            "url": "https://files.pythonhosted.org/packages/b0/88/4b99e251eff23fcebbc155f076741830b349a2180bb00cd8cc37c91db267/pycairo-1.26.0-cp312-cp312-win32.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3f48f6642ee50110498afdf7e52fc0c60d65a7f01574e4dc8830096102bf13f3",
                "md5": "b078efd012e4d6d4c76b6c0bed5a76e1",
                "sha256": "8616408ae93de4824a3777ec532ea75643e4bf74e49d601062c0b1788180c962"
            },
            "downloads": -1,
            "filename": "pycairo-1.26.0-cp312-cp312-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "b078efd012e4d6d4c76b6c0bed5a76e1",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": ">=3.8",
            "size": 859450,
            "upload_time": "2024-02-11T21:25:52",
            "upload_time_iso_8601": "2024-02-11T21:25:52.148949Z",
            "url": "https://files.pythonhosted.org/packages/3f/48/f6642ee50110498afdf7e52fc0c60d65a7f01574e4dc8830096102bf13f3/pycairo-1.26.0-cp312-cp312-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2ac5e4ea63efeca28a3bfafbceccf7101de8b2dd83fc7174490e2d294dbe5860",
                "md5": "fc12e6a20203dadf92ab15068ada5b6e",
                "sha256": "a611e4d82ad8470138bb46d465d47e8db826d9d80b6a520ccd83ee007f2073e4"
            },
            "downloads": -1,
            "filename": "pycairo-1.26.0-cp312-cp312-win_arm64.whl",
            "has_sig": false,
            "md5_digest": "fc12e6a20203dadf92ab15068ada5b6e",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": ">=3.8",
            "size": 677852,
            "upload_time": "2024-02-11T21:25:55",
            "upload_time_iso_8601": "2024-02-11T21:25:55.061228Z",
            "url": "https://files.pythonhosted.org/packages/2a/c5/e4ea63efeca28a3bfafbceccf7101de8b2dd83fc7174490e2d294dbe5860/pycairo-1.26.0-cp312-cp312-win_arm64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ee234a316b5f5119f9858e54200253b016c3777a589c440795c84972645e5b8b",
                "md5": "b1e94bf3c29c73f75808f6e906305ef4",
                "sha256": "675578bc6d62d15ff8669f264783efc9c8c73e3a6f564b294a70fb45a2f78667"
            },
            "downloads": -1,
            "filename": "pycairo-1.26.0-cp38-cp38-win32.whl",
            "has_sig": false,
            "md5_digest": "b1e94bf3c29c73f75808f6e906305ef4",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": ">=3.8",
            "size": 765038,
            "upload_time": "2024-02-11T21:25:57",
            "upload_time_iso_8601": "2024-02-11T21:25:57.751830Z",
            "url": "https://files.pythonhosted.org/packages/ee/23/4a316b5f5119f9858e54200253b016c3777a589c440795c84972645e5b8b/pycairo-1.26.0-cp38-cp38-win32.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d64801dc41664c9dd6b4710027cfd5e0afabdceb243f9871d050c47a1c34c2d2",
                "md5": "a6d6e8a327517f6eafe0f836b149faae",
                "sha256": "aac447b423b33b64119ecdd1ffebf9163b07f5401c5da50c707197efdd1c918a"
            },
            "downloads": -1,
            "filename": "pycairo-1.26.0-cp38-cp38-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "a6d6e8a327517f6eafe0f836b149faae",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": ">=3.8",
            "size": 859868,
            "upload_time": "2024-02-11T21:26:00",
            "upload_time_iso_8601": "2024-02-11T21:26:00.455548Z",
            "url": "https://files.pythonhosted.org/packages/d6/48/01dc41664c9dd6b4710027cfd5e0afabdceb243f9871d050c47a1c34c2d2/pycairo-1.26.0-cp38-cp38-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3d114df901467eec63a8955858538729780ba1068731c502c9475ef0aeed61a6",
                "md5": "7dda5df7b637ceba4f6625333d9ab635",
                "sha256": "9fa51168010e2dfb45499df071fca2d921893f724646f3454951000a7ad0cabb"
            },
            "downloads": -1,
            "filename": "pycairo-1.26.0-cp39-cp39-win32.whl",
            "has_sig": false,
            "md5_digest": "7dda5df7b637ceba4f6625333d9ab635",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": ">=3.8",
            "size": 764962,
            "upload_time": "2024-02-11T21:26:02",
            "upload_time_iso_8601": "2024-02-11T21:26:02.784829Z",
            "url": "https://files.pythonhosted.org/packages/3d/11/4df901467eec63a8955858538729780ba1068731c502c9475ef0aeed61a6/pycairo-1.26.0-cp39-cp39-win32.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "bd18e5b103fb0c64bc0009a8261892755699eb2be54538a8bbf41e1bf7e26a61",
                "md5": "435869de15670dde1e8de60319776a94",
                "sha256": "3e4e18ea03122e60abe3eb611e2849859cc950083ff85d8369328eadf3df63f5"
            },
            "downloads": -1,
            "filename": "pycairo-1.26.0-cp39-cp39-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "435869de15670dde1e8de60319776a94",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": ">=3.8",
            "size": 859838,
            "upload_time": "2024-02-11T21:26:05",
            "upload_time_iso_8601": "2024-02-11T21:26:05.858836Z",
            "url": "https://files.pythonhosted.org/packages/bd/18/e5b103fb0c64bc0009a8261892755699eb2be54538a8bbf41e1bf7e26a61/pycairo-1.26.0-cp39-cp39-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "cfa56799d7456bb455eab71b0e0624cd7f3eebd382945da147f00055c7f2d295",
                "md5": "525c157775dda796b2f0ca052edcf8db",
                "sha256": "a8f3b567ba2ad55624a809823ccf75aff8d768c20216cb5888365f6fc695c1d2"
            },
            "downloads": -1,
            "filename": "pycairo-1.26.0-cp39-cp39-win_arm64.whl",
            "has_sig": false,
            "md5_digest": "525c157775dda796b2f0ca052edcf8db",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": ">=3.8",
            "size": 678036,
            "upload_time": "2024-02-11T21:26:08",
            "upload_time_iso_8601": "2024-02-11T21:26:08.044190Z",
            "url": "https://files.pythonhosted.org/packages/cf/a5/6799d7456bb455eab71b0e0624cd7f3eebd382945da147f00055c7f2d295/pycairo-1.26.0-cp39-cp39-win_arm64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1c4191955188e97c7b85fbaac6bbf4e33de028899e0aa31bdce99b1afe2eeb17",
                "md5": "395b9eb21bb2d18801ebe26501ff2b8e",
                "sha256": "2dddd0a874fbddb21e14acd9b955881ee1dc6e63b9c549a192d613a907f9cbeb"
            },
            "downloads": -1,
            "filename": "pycairo-1.26.0.tar.gz",
            "has_sig": false,
            "md5_digest": "395b9eb21bb2d18801ebe26501ff2b8e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 346850,
            "upload_time": "2024-02-11T21:26:09",
            "upload_time_iso_8601": "2024-02-11T21:26:09.800382Z",
            "url": "https://files.pythonhosted.org/packages/1c/41/91955188e97c7b85fbaac6bbf4e33de028899e0aa31bdce99b1afe2eeb17/pycairo-1.26.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-11 21:26:09",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "pygobject",
    "github_project": "pycairo",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "pycairo"
}
        
Elapsed time: 0.19379s