cairocffi-stubs-0.1.2
توضیحات
Stubs for cairocffi.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | cairocffi-stubs-0.1.2 |
| نام | cairocffi-stubs |
| نسخه کتابخانه | 0.1.2 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | 忘忧北萱草 |
| ایمیل نویسنده | wybxc@qq.com |
| آدرس صفحه اصلی | https://github.com/Wybxc/cairocffi-stubs |
| آدرس اینترنتی | https://pypi.org/project/cairocffi-stubs/ |
| مجوز | - |
# cairocffi-stubs
This package contains type stubs to provide more precise static types and type inference for cairocffi.
## Installation
```
pip install cairocffi-stubs
```
## Usage
```python
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](https://github.com/python/typeshed/blob/master/CONTRIBUTING.md).
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.8,<4.0 | Python |
نحوه نصب
نصب پکیج whl cairocffi-stubs-0.1.2:
pip install cairocffi-stubs-0.1.2.whl
نصب پکیج tar.gz cairocffi-stubs-0.1.2:
pip install cairocffi-stubs-0.1.2.tar.gz