字
字典数据是 此库 中的 data/word.json,成语数据是 idiom.json。
字形数据来自 这里。
接口
查成语
from chinese_characters_words import 词典
词典.查成语('一石二鸟')
如果查不到,返回 None;否则信息如下:
{
'词'
'释义'
'例句'
'渊源'
'拼音'
'缩写'
}
如:
{'词': '一石二鸟', '释义': '扔一颗石子打到两只鸟。比喻做一件事情得到两样好处。', '例句': '无', '渊源': '无', '拼音': 'yī shí èr niǎo', '缩写': 'ysen'}
找包含某字的成语
> print(词典.包含('精神'))
['抖搂精神', '抖擞精神', '精神百倍', '精神抖擞', '精神焕发', '精神恍惚', '精神满腹', '龙马精神', '人逢喜事精神爽', '桃李精神', '颐养精神']
查单字
from chinese_characters_words import 字典
字典.查单字('好')
如果查不到,返回 None;否则信息如下:
{
'字'
'旧体'
'笔画数'
'拼音'
'部首'
'释义'
'其他'
}
字的结构描述
> print(字典.的结构('花'))
{'字型': '⿱', '部分': ['艹', '化']}
找包含某部分的字
> print(字典.包含('吴'))
['俣', '吴', '噳', '娱', '悮', '洖', '澞', '祦', '筽', '脵', '茣', '虞', '蜈', '誤', '误', '鋘', '鸆', '麌']
> print(字典.左边('甘'))
['甛', '邯']
> print(字典.上面('口'))
['兄', '另', '叧', '只', '号', '叾', '吊', '吕', '吴', '呆', '呈', '员', '呙', '咠', '品', '員', '啚', '肙', '虽', '足', '黾']
> print(字典.下面('天'))
['关', '吴', '昊', '癸', '龑']
参与开发
依赖的第三方 Python 包:
Metadata
Release files for chinese-characters-words 0.0.13
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| chinese_characters_words-0.0.13.tar.gz | 14.4 MB | Without provenance | Details for chinese_characters_words-0.0.13.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| chinese_characters_words-0.0.13-py3-none-any.whl | Python 3 | none | any | Details for chinese_characters_words-0.0.13-py3-none-any.whl |
Total release size: 29.0 MB
Release files / chinese_characters_words-0.0.13.tar.gz
| Download URL | chinese_characters_words-0.0.13.tar.gz |
|---|---|
| Size | 14.4 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
39c42168afd9ba28ea1bf9fe760a91477d2c285c96b7170fcb3d66ac3aeff237
|
|
BLAKE2b-256 checksum How to use checksums |
f1f94aa9cc7fddb631bff2c8401c0b0cf8a62ca6725a32c3e710e7a64c15410a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.1
|
Release files / chinese_characters_words-0.0.13-py3-none-any.whl
| Download URL | chinese_characters_words-0.0.13-py3-none-any.whl |
|---|---|
| Size | 14.5 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
99fccdca1344c629f79d1db6fef598f9c2ef527ce5267a6ead9a7c11df222eb5
|
|
BLAKE2b-256 checksum How to use checksums |
477161804f6a220f64f10efead83c152472f64deb951eda56cd8bf05615760d7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.1
|
Security for chinese-characters-words 0.0.13
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.