semvec/pypi-packages huggingface dataset:
pytknet 1.0.1
TkinterHelper布局助手官方拓展和工具库
Requires Python: >=3.8

TkinterHelper布局助手官方拓展和工具库

## 安装方式

> pip install pytknet

## 工具函数

utils.py 整合了一些常用的工具函数

### 加载图片

> load_image(img_path, width, height):

### 加载图标

> load_font_icon(icon_name, size=100, color="#000")

## 组件

widgets.py 拓展组件类

### 图标组件 Icon

可以在tkinter上展示图标,图标数量众多大概1800多个,基于开源的bootstrap图标.

### 日期输入框 DateEntry

基于ttkbootstrap的DateEntry,重写部分代码,更符合国内使用.

### 拓展选项卡组件 ExtTabs

点击右侧选项菜单 切换视图

## 开源组件

本项目使用的开源项目如下

| 开源名称           |
|----------------|
| bootstrap icon |
| ttkbootstrap   |
json-matcher 0.0.14
Match json with lucece-like query

# json_matcher

Match json object with query like elasticsearch/lucene query.

examples (jrep)

    # cat a.txt
    { "foo": "bar", "bar": "foo" }
    # jrep "foo:bar" /tmp/a.txt
    { "foo": "bar", "bar": "foo" }

examples (json\_matcher)

    >>> import json_matcher
    >>> matcher = json_matcher.compile('foo:bar bar:foo')
    >>> j = dict(foo='bar', bar='foo')
    >>> m = matcher.match(j)
    >>> m.groups()
    [('foo', 'bar'), ('bar', 'foo')]

    >>> matcher = json_matcher.compile('foo:>10 bar:foo')
    >>> j = dict(foo=11, bar='foo')
    >>> matcher.match(j).groups()
    [('foo', 11), ('bar', 'foo')]
    >>> j = dict(foo=9, bar='foo')
    >>> matcher.match(j)
    >>> m = matcher.match(j)
    >>> print(m)
    None

    >>> json_matcher.match('foo:[10 TO 20] AND bar:foo', dict(foo=11, bar='foo')).groups()
    [('foo', 11), ('bar', 'foo')]

    >>> nested = dict(A=dict(B=dict(C='Hello World')))
    >>> json_matcher.match('A.B.C:"Hello World"', nested).groups()
    [('A.B.C', 'Hello World')]

    
- match text or number with ```field_name:value```
- match regular expression with ```field_name:/regular expression/```
- match range with ```field_name:[10 TO 20]```, ```field_name:[10 TO 20}``` (exclusive 20)
- match range(open range) with ```field_name:>20``` (like elasticsearch not lucene)
- match field existence with ```_exists_:field_name```
- match expression with ```_expression:"python expression"```
    
TODO:
 - multiple match with high performace (with Ahocorasik and RE2???)