Skip to main content

Stubs for cairocffi.

Project description

cairocffi-stubs

This package contains type stubs to provide more precise static types and type inference for cairocffi.

Installation

pip install cairocffi-stubs

Usage

from io import BytesIO
import cairocffi as cairo
import matplotlib.pyplot as plt

surface = cairo.ImageSurface(cairo.FORMAT_ARGB32, 300, 200)
context = cairo.Context(surface)
context.show_text('Hello World!')
img = BytesIO(surface.write_to_png())  # overloaded
plt.imshow(plt.imread(img))
plt.show()

Static type checker can correctly recognize the return type of surface.write_to_png() as bytes when passing no arguments. No type errors will be raised.

Style Guidelines

Follow the same style guidelines as typeshed.

Project details


Download files

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

Source Distribution

cairocffi-stubs-0.1.2.tar.gz (7.1 kB view details)

Uploaded Source

Built Distribution

cairocffi_stubs-0.1.2-py3-none-any.whl (9.4 kB view details)

Uploaded Python 3

File details

Details for the file cairocffi-stubs-0.1.2.tar.gz.

File metadata

  • Download URL: cairocffi-stubs-0.1.2.tar.gz
  • Upload date:
  • Size: 7.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.9.7 Windows/10

File hashes

Hashes for cairocffi-stubs-0.1.2.tar.gz
Algorithm Hash digest
SHA256 02c250aa7626549a39811ed6f8a8be60d5a0d1a8a1190decd8f4b49c1dee3ce6
MD5 1eb009883822b4747ad909cabb58a6d8
BLAKE2b-256 8bf6ec686b31333dee2060b4494d05fc2571b1955a0a491c452ccf0e0753b519

See more details on using hashes here.

File details

Details for the file cairocffi_stubs-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for cairocffi_stubs-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1208023f17f6261debd01000b86818cc1c8cba8597a6fa134cd0217c53a59478
MD5 325e4242d7dd23846f3d2a52d1a40728
BLAKE2b-256 6b3ce2dca7798514cc15a485790a51094c7e2ace5451794e1eefa846d0c8fe17

See more details on using hashes here.

Supported by

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