a complex pattern, support typing
Project description
NEPattern
NEPattern (Not-Enough-Pattern) 是一个高效的负责类型验证与类型转换的库,独立自 Alconna
简单实例
from nepattern import Pattern
pat = Pattern(str).accept(int).convert(lambda _, x: str(x))
assert pat.execute(13).success
assert pat.execute(42).value() == '42'
assert not pat << 13.0
特点
- 高效的类型转化功能
- 多种预置的实例
- 良好的 typing 支持
- 自由的环境控制
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
nepattern-1.1.0.tar.gz
(15.6 kB
view details)
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
nepattern-1.1.0-py3-none-any.whl
(19.4 kB
view details)
File details
Details for the file nepattern-1.1.0.tar.gz.
File metadata
- Download URL: nepattern-1.1.0.tar.gz
- Upload date:
- Size: 15.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: pdm/2.25.6 CPython/3.11.7 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e8809fc82a9c230672117f625b804c9e60891ddeec9481caaa0ebf12ed66e7b8
|
|
| MD5 |
71a9a0badfb5ddf946996a099f35514b
|
|
| BLAKE2b-256 |
d7265bf7c48c75483b5976a101ff729c0eec3a087014c2d7e6277d006591170a
|
File details
Details for the file nepattern-1.1.0-py3-none-any.whl.
File metadata
- Download URL: nepattern-1.1.0-py3-none-any.whl
- Upload date:
- Size: 19.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: pdm/2.25.6 CPython/3.11.7 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7acac32210fae682574d9d9a12717d7dccddbaf7cc76b4a668f36435c0a39a87
|
|
| MD5 |
96fd13a20c1d4d16c45e7eb9009044f6
|
|
| BLAKE2b-256 |
2e34b110a4723a3bd4c9875b4ee4b428afd0660a7eafe890d755a384ffa80087
|