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.0.1.tar.gz
(15.3 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.0.1-py3-none-any.whl
(19.3 kB
view details)
File details
Details for the file nepattern-1.0.1.tar.gz.
File metadata
- Download URL: nepattern-1.0.1.tar.gz
- Upload date:
- Size: 15.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: pdm/2.19.1 CPython/3.9.13 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2f735b5f4a250954e3d27d85f75edd61f5bd724f29d21aed10a2e29b55407957
|
|
| MD5 |
8da5e0b60ef77939525d927b956c3e1b
|
|
| BLAKE2b-256 |
7161c980d9dd8ff4b69115a1b376d1735bccb937aa36dff8b1d749b4615cd517
|
File details
Details for the file nepattern-1.0.1-py3-none-any.whl.
File metadata
- Download URL: nepattern-1.0.1-py3-none-any.whl
- Upload date:
- Size: 19.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: pdm/2.19.1 CPython/3.9.13 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
744c8619a63401bd0816dca6c2b835aa46ab179bbd133c6737bbdcf852a2cacb
|
|
| MD5 |
353d0c9a6025752132bc41052968be3f
|
|
| BLAKE2b-256 |
73cfb4a3f0cc60ad95ef3a47822e500e886354a64f4a4602d0d9bf0ddef45207
|