跳转到主要内容

properties_image

项目描述

Latest PyPI version MIT license Travis tests Code coverage

为什么

properties 为你在类中使用的属性提供结构(和文档!)properties-image 扩展了这一点,包括图像文件。

范围

properties 包允许你以一致的方式创建 强类型 对象。这允许你挂钩到 通知 和其他库。 properties-image 包包含额外的图像文件属性,这些属性不包括在 properties 中。

目标

  • properties 模块提供补充的属性类

  • 允许依赖性重的类单独安装

替代方案

properties 的替代方案

  • traits 由Enthought使用

  • traitlets 在Jupyter项目中使用

  • mypyPEP0484,它们记录了类型但不包括强制或通知

其他图像库

连接

安装

要安装存储库,请确保您已安装 pip 并运行

pip install properties_image

对于开发版本

git clone https://github.com/3ptscience/properties-image.git
cd properties-image
pip install -e .

示例

要包含图像属性,导入 propertiesproperties_image。然后图像属性类将位于 ext 模块中。有关更多示例,请参阅 properties

import properties
import properties_image
class NamedImage(properties.HasProperties):
    name = properties.String('Name of the image')
    image = properties.ext.ImagePNG('The image')

项目详情


下载文件

下载适合您平台的自定义文件。如果您不确定选择哪个,请了解更多关于 安装包 的信息。

源分发

properties_image-0.0.1.tar.gz (3.8 kB 查看哈希值)

上传时间

由以下支持