Skip to main content
https://raw.githubusercontent.com/pygobject/pycairo/main/docs/images/pycairo.svg

Pycairo is a Python module providing bindings for the cairo graphics library. It depends on cairo >= 1.15.10 and works with Python 3.10+ and PyPy3. Pycairo, including this documentation, is licensed under the LGPL-2.1-only OR MPL-1.1.

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.

pip install pycairo

Installing Pycairo requires cairo including its headers. For more info see “Getting Started”.


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()
https://raw.githubusercontent.com/pygobject/pycairo/main/docs/images/example.svg

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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pycairo-1.29.1.tar.gz (666.3 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

pycairo-1.29.1-cp315-cp315t-win_arm64.whl (721.5 kB view details)

Uploaded CPython 3.15tWindows ARM64

pycairo-1.29.1-cp315-cp315t-win_amd64.whl (874.5 kB view details)

Uploaded CPython 3.15tWindows x86-64

pycairo-1.29.1-cp315-cp315-win_arm64.whl (719.6 kB view details)

Uploaded CPython 3.15Windows ARM64

pycairo-1.29.1-cp315-cp315-win_amd64.whl (872.0 kB view details)

Uploaded CPython 3.15Windows x86-64

pycairo-1.29.1-cp314-cp314t-win_arm64.whl (721.5 kB view details)

Uploaded CPython 3.14tWindows ARM64

pycairo-1.29.1-cp314-cp314t-win_amd64.whl (874.5 kB view details)

Uploaded CPython 3.14tWindows x86-64

pycairo-1.29.1-cp314-cp314-win_arm64.whl (719.6 kB view details)

Uploaded CPython 3.14Windows ARM64

pycairo-1.29.1-cp314-cp314-win_amd64.whl (872.1 kB view details)

Uploaded CPython 3.14Windows x86-64

pycairo-1.29.1-cp314-cp314-win32.whl (767.1 kB view details)

Uploaded CPython 3.14Windows x86

pycairo-1.29.1-cp313-cp313-win_arm64.whl (693.6 kB view details)

Uploaded CPython 3.13Windows ARM64

pycairo-1.29.1-cp313-cp313-win_amd64.whl (844.5 kB view details)

Uploaded CPython 3.13Windows x86-64

pycairo-1.29.1-cp313-cp313-win32.whl (750.8 kB view details)

Uploaded CPython 3.13Windows x86

pycairo-1.29.1-cp312-cp312-win_arm64.whl (694.6 kB view details)

Uploaded CPython 3.12Windows ARM64

pycairo-1.29.1-cp312-cp312-win_amd64.whl (846.0 kB view details)

Uploaded CPython 3.12Windows x86-64

pycairo-1.29.1-cp312-cp312-win32.whl (751.4 kB view details)

Uploaded CPython 3.12Windows x86

pycairo-1.29.1-cp311-cp311-win_arm64.whl (694.6 kB view details)

Uploaded CPython 3.11Windows ARM64

pycairo-1.29.1-cp311-cp311-win_amd64.whl (845.5 kB view details)

Uploaded CPython 3.11Windows x86-64

pycairo-1.29.1-cp311-cp311-win32.whl (751.3 kB view details)

Uploaded CPython 3.11Windows x86

pycairo-1.29.1-cp310-cp310-win_arm64.whl (694.6 kB view details)

Uploaded CPython 3.10Windows ARM64

pycairo-1.29.1-cp310-cp310-win_amd64.whl (845.5 kB view details)

Uploaded CPython 3.10Windows x86-64

pycairo-1.29.1-cp310-cp310-win32.whl (751.3 kB view details)

Uploaded CPython 3.10Windows x86

File details

Details for the file pycairo-1.29.1.tar.gz.

File metadata

  • Download URL: pycairo-1.29.1.tar.gz
  • Upload date:
  • Size: 666.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.4

File hashes

Hashes for pycairo-1.29.1.tar.gz
Algorithm Hash digest
SHA256 4fbd26b4af24c9787d84cf5448e34eb8dca064b732479aaecd03109520eebd5f
MD5 fc7c3b4104e88df7dea34af4314b9d12
BLAKE2b-256 267cab4637b028d9ee12280ab9342f28310e613d5ca30c4d72d2aebeaa6a4969

See more details on using hashes here.

File details

Details for the file pycairo-1.29.1-cp315-cp315t-win_arm64.whl.

File metadata

  • Download URL: pycairo-1.29.1-cp315-cp315t-win_arm64.whl
  • Upload date:
  • Size: 721.5 kB
  • Tags: CPython 3.15t, Windows ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.4

File hashes

Hashes for pycairo-1.29.1-cp315-cp315t-win_arm64.whl
Algorithm Hash digest
SHA256 e5dde8dc08d92ad6935d1a45ff6ea71ea6d5739ed08dbf8677313935f94d5c6d
MD5 13b6b4353835ebcaa84f10df7ad6fc0e
BLAKE2b-256 ab0481a13cde3c6685186fd79770d619c9b861d51de7450975618a85e8676772

See more details on using hashes here.

File details

Details for the file pycairo-1.29.1-cp315-cp315t-win_amd64.whl.

File metadata

  • Download URL: pycairo-1.29.1-cp315-cp315t-win_amd64.whl
  • Upload date:
  • Size: 874.5 kB
  • Tags: CPython 3.15t, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.4

File hashes

Hashes for pycairo-1.29.1-cp315-cp315t-win_amd64.whl
Algorithm Hash digest
SHA256 12515e71e2f17db8c40911ff089c23c465f92ddbabb89cd01304f275030c80ec
MD5 c302533c709aedbcbf4811d682268d3d
BLAKE2b-256 14dfb163de08eb5307eacda6ee98001a4b920df8432d49f1da9b8d1c8d0342f5

See more details on using hashes here.

File details

Details for the file pycairo-1.29.1-cp315-cp315-win_arm64.whl.

File metadata

  • Download URL: pycairo-1.29.1-cp315-cp315-win_arm64.whl
  • Upload date:
  • Size: 719.6 kB
  • Tags: CPython 3.15, Windows ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.4

File hashes

Hashes for pycairo-1.29.1-cp315-cp315-win_arm64.whl
Algorithm Hash digest
SHA256 e923875c96cfe935d632de50aeebf49db7dffdd23f9042587c3f34af7596868e
MD5 1203a81d42a853d8a81bf115822fd8f8
BLAKE2b-256 9203214ee759a86bd821e306c2071aef0de9c201020e7690f9cf165fa2d61d42

See more details on using hashes here.

File details

Details for the file pycairo-1.29.1-cp315-cp315-win_amd64.whl.

File metadata

  • Download URL: pycairo-1.29.1-cp315-cp315-win_amd64.whl
  • Upload date:
  • Size: 872.0 kB
  • Tags: CPython 3.15, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.4

File hashes

Hashes for pycairo-1.29.1-cp315-cp315-win_amd64.whl
Algorithm Hash digest
SHA256 5c51bd98d2190841389845deae8243479393c1f2d9423de85e9fb4c95afebc10
MD5 9fe76da70d66133decc942dc45e45dcc
BLAKE2b-256 ceec4466cce6363c07759d04f9481f81d84a6dc506b735e795c193eb63e4f9ef

See more details on using hashes here.

File details

Details for the file pycairo-1.29.1-cp314-cp314t-win_arm64.whl.

File metadata

  • Download URL: pycairo-1.29.1-cp314-cp314t-win_arm64.whl
  • Upload date:
  • Size: 721.5 kB
  • Tags: CPython 3.14t, Windows ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.4

File hashes

Hashes for pycairo-1.29.1-cp314-cp314t-win_arm64.whl
Algorithm Hash digest
SHA256 85127fb834a8a37a550fa5c684a4c49fc546b465a64ac8df94d7728914a56279
MD5 ffcce57b39a9009c2f1a330252e4e0ba
BLAKE2b-256 c2ee006df2caa60f2df242b9baf13ab95d4575b47acabc54f3ab6d757d3a9691

See more details on using hashes here.

File details

Details for the file pycairo-1.29.1-cp314-cp314t-win_amd64.whl.

File metadata

  • Download URL: pycairo-1.29.1-cp314-cp314t-win_amd64.whl
  • Upload date:
  • Size: 874.5 kB
  • Tags: CPython 3.14t, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.4

File hashes

Hashes for pycairo-1.29.1-cp314-cp314t-win_amd64.whl
Algorithm Hash digest
SHA256 3836feabfaf35ef9c502234c5924f3b2db935b6c55d8850ed190b3a58ab3b4ca
MD5 f0c8974fd6c1d12f6559d8942d06851b
BLAKE2b-256 ef254cd521dd9e0f280930717bb93499c50008a6f14b312649d34a54dbd1df71

See more details on using hashes here.

File details

Details for the file pycairo-1.29.1-cp314-cp314-win_arm64.whl.

File metadata

  • Download URL: pycairo-1.29.1-cp314-cp314-win_arm64.whl
  • Upload date:
  • Size: 719.6 kB
  • Tags: CPython 3.14, Windows ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.4

File hashes

Hashes for pycairo-1.29.1-cp314-cp314-win_arm64.whl
Algorithm Hash digest
SHA256 b5db545cc8e59fe9bb68039db86c5ebcf9d1e6417695d0d2cb5530e67d925af9
MD5 60cef8c3fc6b3c85bf91462fedefdb3d
BLAKE2b-256 6895fc823a255ed1967ec5bda7243247a2fb484faf868c0cd1ffd1425ae515e8

See more details on using hashes here.

File details

Details for the file pycairo-1.29.1-cp314-cp314-win_amd64.whl.

File metadata

  • Download URL: pycairo-1.29.1-cp314-cp314-win_amd64.whl
  • Upload date:
  • Size: 872.1 kB
  • Tags: CPython 3.14, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.4

File hashes

Hashes for pycairo-1.29.1-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 f635a60b7525661b562061e4b1635670b804d1efc9c7f40796c2fa14b24c3ddf
MD5 732eb1fe70b820e6227f4df843ed032d
BLAKE2b-256 1d13aef0ea29661a2fa0cadb3cbb470b514d439efe763cafc956c8b740ad1480

See more details on using hashes here.

File details

Details for the file pycairo-1.29.1-cp314-cp314-win32.whl.

File metadata

  • Download URL: pycairo-1.29.1-cp314-cp314-win32.whl
  • Upload date:
  • Size: 767.1 kB
  • Tags: CPython 3.14, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.4

File hashes

Hashes for pycairo-1.29.1-cp314-cp314-win32.whl
Algorithm Hash digest
SHA256 7222587a4ae1674287c17d10d1c42c4219914f7ef64cac4b2fb995df4f7918cb
MD5 3389532f2d443c692e64c239cbfd1f97
BLAKE2b-256 9def87408894ebef901c2accde14dcacfbdbd9bc9abe617039ee6ff382847b75

See more details on using hashes here.

File details

Details for the file pycairo-1.29.1-cp313-cp313-win_arm64.whl.

File metadata

  • Download URL: pycairo-1.29.1-cp313-cp313-win_arm64.whl
  • Upload date:
  • Size: 693.6 kB
  • Tags: CPython 3.13, Windows ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.4

File hashes

Hashes for pycairo-1.29.1-cp313-cp313-win_arm64.whl
Algorithm Hash digest
SHA256 0c6159117680798da1457404b648e69b0a0eb23597b22f8a97315eaeea19f917
MD5 e19ac827d710759ed50f44131fa61be4
BLAKE2b-256 91c1f83f25aab64418d4de6527cbf951988fc9449020e416113e3a7a4ad7e7b8

See more details on using hashes here.

File details

Details for the file pycairo-1.29.1-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: pycairo-1.29.1-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 844.5 kB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.4

File hashes

Hashes for pycairo-1.29.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 859f5f29d7c30fc28dbc5ce91eb30a45e0b7e447a7bd738c231dd7f9be368d1a
MD5 37d579ef189eabce23383acdf6b103f2
BLAKE2b-256 81ba3499ae0f6f8be6d55ef5db620a60693b4ef925b710890bf66c17aeff036e

See more details on using hashes here.

File details

Details for the file pycairo-1.29.1-cp313-cp313-win32.whl.

File metadata

  • Download URL: pycairo-1.29.1-cp313-cp313-win32.whl
  • Upload date:
  • Size: 750.8 kB
  • Tags: CPython 3.13, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.4

File hashes

Hashes for pycairo-1.29.1-cp313-cp313-win32.whl
Algorithm Hash digest
SHA256 4506a15f0dcd9d65b2706f417f8e5633e1456867d5cf272dc69c0b48e2302842
MD5 a84a635509c94800d2649d3a72af5dbe
BLAKE2b-256 957d26191cac03e8c0d957856839736ee9fb45c6d4ae68c30393895558f1f7ad

See more details on using hashes here.

File details

Details for the file pycairo-1.29.1-cp312-cp312-win_arm64.whl.

File metadata

  • Download URL: pycairo-1.29.1-cp312-cp312-win_arm64.whl
  • Upload date:
  • Size: 694.6 kB
  • Tags: CPython 3.12, Windows ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.4

File hashes

Hashes for pycairo-1.29.1-cp312-cp312-win_arm64.whl
Algorithm Hash digest
SHA256 7cb6279cf0a7951ae9aaa21c6a0adff0fce62c0a68797b6a26a54f9a0859ad4d
MD5 5375d1075db61213f4503e3c137dd649
BLAKE2b-256 049740966895bc12319ff3173cbb5d7876149a8e90e99bbf3b70e4af492c73a9

See more details on using hashes here.

File details

Details for the file pycairo-1.29.1-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: pycairo-1.29.1-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 846.0 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.4

File hashes

Hashes for pycairo-1.29.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 839cd8c98e1933426d8959168b466901b398bf4867454451023b93d91030cca9
MD5 6ea6d6dd49d2de38101f563077bbae98
BLAKE2b-256 697e7be1346df5ab8cd7f748f2d17d25d61f34550cfd141f60e8319e9c70df87

See more details on using hashes here.

File details

Details for the file pycairo-1.29.1-cp312-cp312-win32.whl.

File metadata

  • Download URL: pycairo-1.29.1-cp312-cp312-win32.whl
  • Upload date:
  • Size: 751.4 kB
  • Tags: CPython 3.12, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.4

File hashes

Hashes for pycairo-1.29.1-cp312-cp312-win32.whl
Algorithm Hash digest
SHA256 cf25a97a15bedd0cdabee5b18652de45eff70b4a7999416ed18dcee2144d17f5
MD5 9c00fafd99748aaeb26646c6b4465e2e
BLAKE2b-256 72f6b6a2e016cf0df97b2cd094c228c9303af21d626993607d8ea750ea8b704b

See more details on using hashes here.

File details

Details for the file pycairo-1.29.1-cp311-cp311-win_arm64.whl.

File metadata

  • Download URL: pycairo-1.29.1-cp311-cp311-win_arm64.whl
  • Upload date:
  • Size: 694.6 kB
  • Tags: CPython 3.11, Windows ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.4

File hashes

Hashes for pycairo-1.29.1-cp311-cp311-win_arm64.whl
Algorithm Hash digest
SHA256 59eb4a6d1101834a7ba2c7a8096fccd54eb8514d8189f896b4a8e24a19cfa1f0
MD5 1f76d6d2abdf10d3c1477ef14b3960da
BLAKE2b-256 69a684415dce82c4865169847acc2de7895a1463956569383f17cb39e89f1287

See more details on using hashes here.

File details

Details for the file pycairo-1.29.1-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: pycairo-1.29.1-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 845.5 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.4

File hashes

Hashes for pycairo-1.29.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 73a364341ce6b382200d13cfdf814f8ea50a8a2e0f8280c2d2e7dfb3ba52edcf
MD5 478d63caf5dba9e2a6dabdac3aa8652f
BLAKE2b-256 34e6f09d1c0ca4a887aea020774c59adabc04b7e1d2f00287ef48473540001e5

See more details on using hashes here.

File details

Details for the file pycairo-1.29.1-cp311-cp311-win32.whl.

File metadata

  • Download URL: pycairo-1.29.1-cp311-cp311-win32.whl
  • Upload date:
  • Size: 751.3 kB
  • Tags: CPython 3.11, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.4

File hashes

Hashes for pycairo-1.29.1-cp311-cp311-win32.whl
Algorithm Hash digest
SHA256 50da6e8eb1525f216e564b3e634b19ede5465080d4fa813416ed45a69b3f6605
MD5 59e7597bf87790eb6235bce85c56c3cd
BLAKE2b-256 4d83d2dfb322cc3acc583aa6e8e601e7c320108804f3f3c677383f23a0de8624

See more details on using hashes here.

File details

Details for the file pycairo-1.29.1-cp310-cp310-win_arm64.whl.

File metadata

  • Download URL: pycairo-1.29.1-cp310-cp310-win_arm64.whl
  • Upload date:
  • Size: 694.6 kB
  • Tags: CPython 3.10, Windows ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.4

File hashes

Hashes for pycairo-1.29.1-cp310-cp310-win_arm64.whl
Algorithm Hash digest
SHA256 eae57db7719c8b717f0d69fe81a1586621dcbfd7f92a1277a181dd89e754be25
MD5 c1723e74cb0c3a6931ff780590f8d6b4
BLAKE2b-256 b31ca8f3649b867fd7e176ac530935fd00fb0e22dd9863c84f304ccb80b1878b

See more details on using hashes here.

File details

Details for the file pycairo-1.29.1-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: pycairo-1.29.1-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 845.5 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.4

File hashes

Hashes for pycairo-1.29.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 507fefbddc8eeb27862a815c4a4ec648f06d6e22a671e00dcbe766a899e4bcef
MD5 e5b01f693a62d2ab5f3ce97971dcf2f5
BLAKE2b-256 b729359b2bacc7e2d85e02e18fc4edd6e6f9c3807c518e04e95c5222c5980d05

See more details on using hashes here.

File details

Details for the file pycairo-1.29.1-cp310-cp310-win32.whl.

File metadata

  • Download URL: pycairo-1.29.1-cp310-cp310-win32.whl
  • Upload date:
  • Size: 751.3 kB
  • Tags: CPython 3.10, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.4

File hashes

Hashes for pycairo-1.29.1-cp310-cp310-win32.whl
Algorithm Hash digest
SHA256 46abf30e61d4c27022296e858af900d3e5dae764c1e6acfb9b9e4082af860131
MD5 09c3c049eb5fea6a879a2533dbcbaeb1
BLAKE2b-256 1d70358f2a617c024d491a8db8cc40f090c2fdb771c13ae5afb2c82471166663

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page