# NEPattern
[![Licence](https://img.shields.io/github/license/ArcletProject/NEPattern)](https://github.com/ArcletProject/NEPattern/blob/master/LICENSE)
[![PyPI](https://img.shields.io/pypi/v/nepattern)](https://pypi.org/project/nepattern)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/nepattern)](https://www.python.org/)
[![codecov](https://codecov.io/gh/ArcletProject/NEPattern/branch/master/graph/badge.svg?token=DOMUPLN5XO)](https://codecov.io/gh/ArcletProject/NEPattern)
`NEPattern` (`Not-Enough-Pattern`) 是一个高效的负责类型验证与类型转换的库,独立自 [Alconna](https://github.com/ArcletProject/Alconna)
## 简单实例
```python
from nepattern import BasePattern
pat = BasePattern.of(int)
assert pat.validate(13).success
assert not 13.0 >> pat
```
## 特点
- 高效的类型转化功能
- 多种预置的实例
- 良好的 typing 支持
- 自由的环境控制
Raw data
{
"_id": null,
"home_page": null,
"name": "nepattern",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "typing, pattern, converter, validator",
"author": null,
"author_email": "RF-Tar-Railt <rf_tar_railt@qq.com>",
"download_url": "https://files.pythonhosted.org/packages/78/23/bf72be352c7c9f58e90ad0a3eaff845da0aeaa98addbcfe3c979c955c145/nepattern-0.7.2.tar.gz",
"platform": null,
"description": "# NEPattern\n\n[![Licence](https://img.shields.io/github/license/ArcletProject/NEPattern)](https://github.com/ArcletProject/NEPattern/blob/master/LICENSE)\n[![PyPI](https://img.shields.io/pypi/v/nepattern)](https://pypi.org/project/nepattern)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/nepattern)](https://www.python.org/)\n[![codecov](https://codecov.io/gh/ArcletProject/NEPattern/branch/master/graph/badge.svg?token=DOMUPLN5XO)](https://codecov.io/gh/ArcletProject/NEPattern)\n\n`NEPattern` (`Not-Enough-Pattern`) \u662f\u4e00\u4e2a\u9ad8\u6548\u7684\u8d1f\u8d23\u7c7b\u578b\u9a8c\u8bc1\u4e0e\u7c7b\u578b\u8f6c\u6362\u7684\u5e93\uff0c\u72ec\u7acb\u81ea [Alconna](https://github.com/ArcletProject/Alconna)\n\n## \u7b80\u5355\u5b9e\u4f8b\n\n```python\nfrom nepattern import BasePattern\n\n\npat = BasePattern.of(int)\nassert pat.validate(13).success\nassert not 13.0 >> pat\n```\n\n## \u7279\u70b9\n\n- \u9ad8\u6548\u7684\u7c7b\u578b\u8f6c\u5316\u529f\u80fd\n- \u591a\u79cd\u9884\u7f6e\u7684\u5b9e\u4f8b\n- \u826f\u597d\u7684 typing \u652f\u6301\n- \u81ea\u7531\u7684\u73af\u5883\u63a7\u5236",
"bugtrack_url": null,
"license": "MIT",
"summary": "a complex pattern, support typing",
"version": "0.7.2",
"project_urls": {
"Repository": "https://github.com/ArcletProject/NEPattern"
},
"split_keywords": [
"typing",
" pattern",
" converter",
" validator"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "a823e5dee6527a9bf0ed5be4d3be96e88ca33eddde18ae4abea00b0155bef6d2",
"md5": "2fe46ea0288b7a5fb47168356288fae1",
"sha256": "75406623a4a533628a6fb1996a7cc79d7b535a268e2a8bf4b405197175baecca"
},
"downloads": -1,
"filename": "nepattern-0.7.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "2fe46ea0288b7a5fb47168356288fae1",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 24179,
"upload_time": "2024-04-25T09:56:33",
"upload_time_iso_8601": "2024-04-25T09:56:33.438994Z",
"url": "https://files.pythonhosted.org/packages/a8/23/e5dee6527a9bf0ed5be4d3be96e88ca33eddde18ae4abea00b0155bef6d2/nepattern-0.7.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "7823bf72be352c7c9f58e90ad0a3eaff845da0aeaa98addbcfe3c979c955c145",
"md5": "733aeeaee393b2380d09696278689d5a",
"sha256": "7869e7998d870c920611b7a25649fb451c57bf2de450fb5d2e87408ff2917885"
},
"downloads": -1,
"filename": "nepattern-0.7.2.tar.gz",
"has_sig": false,
"md5_digest": "733aeeaee393b2380d09696278689d5a",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 20220,
"upload_time": "2024-04-25T09:56:35",
"upload_time_iso_8601": "2024-04-25T09:56:35.441001Z",
"url": "https://files.pythonhosted.org/packages/78/23/bf72be352c7c9f58e90ad0a3eaff845da0aeaa98addbcfe3c979c955c145/nepattern-0.7.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-04-25 09:56:35",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "ArcletProject",
"github_project": "NEPattern",
"travis_ci": false,
"coveralls": true,
"github_actions": true,
"lcname": "nepattern"
}