# xy_type **Repository Path**: xy-opensource/xy_type ## Basic Information - **Project Name**: xy_type - **Description**: 类型辅助模块 - **Primary Language**: Python - **License**: MulanPSL-2.0 - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-11-05 - **Last Updated**: 2024-11-12 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # xy_type | [简体中文](./README.md) | [繁體中文](readme/README.zh-hant.md) | [English](readme/README.en.md) | | ----------- | -------------|---------------------------------------| # 说明 类型工具. ## 源码仓库 | [Github](https://github.com/xy-base/xy_type.git) | [Gitee](https://gitee.com/xy-opensource/xy_type.git) | [GitCode](https://gitcode.com/xy-opensource/xy_type.git) | | ----------- | -------------|---------------------------------------| ## 安装 ``` pip install xy_type ``` ## 开始 ```python from xy_type.utils import count_of_function_arguments, validate_callable_func, validate_callable_init_func, has_func, empty_value class xyObject: def __init__(self, arg_0=0, arg_1=1): pass def xyFunc(self, arg_0=0, arg_1=1): pass @classmethod def xyClsFunc(cls, arg_0=0, arg_1=1) pass count_of_function_arguments(xyObject.xyClsFunc) # 2 validate_callable_func(xyObject.xyClsFunc) # True validate_callable_init_func(xyObject, 1) # True obj = xyObject() has_func(obj, "xyFunc", 2) # True has_func(obj, "xyFunc1", 2) # False has_func(obj, "xyFunc", 20) # False empty_value(obj, xyObject, None) # obj empty_value(obj, str, None) # None ``` ## 许可证 xy_type 根据 <木兰宽松许可证, 第2版> 获得许可。有关详细信息,请参阅 [LICENSE](LICENSE) 文件。 ## 捐赠 如果小伙伴们觉得这些工具还不错的话,能否请咱喝一杯咖啡呢? ![Pay-Total](./readme/Pay-Total.png) ## 联系方式 ``` 微信: yuyangiit 邮箱: yuyangit.0515@qq.com ```