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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
02c250aa7626549a39811ed6f8a8be60d5a0d1a8a1190decd8f4b49c1dee3ce6
|
|
| MD5 |
1eb009883822b4747ad909cabb58a6d8
|
|
| BLAKE2b-256 |
8bf6ec686b31333dee2060b4494d05fc2571b1955a0a491c452ccf0e0753b519
|
File details
Details for the file cairocffi_stubs-0.1.2-py3-none-any.whl.
File metadata
- Download URL: cairocffi_stubs-0.1.2-py3-none-any.whl
- Upload date:
- Size: 9.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.9.7 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1208023f17f6261debd01000b86818cc1c8cba8597a6fa134cd0217c53a59478
|
|
| MD5 |
325e4242d7dd23846f3d2a52d1a40728
|
|
| BLAKE2b-256 |
6b3ce2dca7798514cc15a485790a51094c7e2ace5451794e1eefa846d0c8fe17
|