semvec/pypi-packages huggingface dataset:
work-wechat-log-notify 0.2.6
Work wechat log notify.
License: MIT

### Work wechat log notify.

#### WorkWechatLog(webhook_urls: str | List[str], mode: bool) 企业微信日志类

- `webhook_urls` {str|List[str]} webhook链接地址，可传字符串或者字符串列表
- `mode` {bool} 是否测试模式，测试模式使用print输出 True: 测试模式 False: 生产模式

example:
```python
log = WorkWechatLog("https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", False)
# 或
log = WorkWechatLog(
  [
    "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    "https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
  ],
  False
)
```

-------------------------------------------------------------------------------------
#### text(msg: str, mentioned_list: List[str], mentioned_mobile_list: List[str]) 发送文本消息

- `msg` {str} 文本内容，最长不超过2048个字节，必须是utf8编码
- `mentioned_list` {List[str]} userid的列表，提醒群中的指定成员(@某个成员)，@all表示提醒所有人，如果开发者获取不到userid，可以使用mentioned_mobile_list
- `mentioned_mobile_list` {List[str]} 手机号列表，提醒手机号对应的群成员(@某个成员)，@all表示提醒所有人
- returns {None}

example:
```python
from work_wechat_log.log import WorkWechatLog

log = WorkWechatLog(webhook_urls, False)
log.text("haha", ["@all"])
```

-------------------------------------------------------------------------------------
#### markdown(msg: str) 发送markdown消息

- `msg` {str} 文本内容，最长不超过2048个字节，必须是utf8编码
- `mentioned_list` {List[str]} userid的列表，提醒群中的指定成员(@某个成员)，@all表示提醒所有人，如果开发者获取不到userid，可以使用mentioned_mobile_list
- `mentioned_mobile_list` {List[str]} 手机号列表，提醒手机号对应的群成员(@某个成员)，@all表示提醒所有人
- returns {None}

example:
```python
from work_wechat_log.log import WorkWechatLog

log = WorkWechatLog(webhook_urls, False)
log.markdown("###实时新增用户反馈<font color=\"warning\">132例</font>")
```
-------------------------------------------------------------------------------------
#### image(image_path: str) 发送图片消息

- `image_path` {str} 图片地址，图片最大不能超过2M
- returns {None}

example:
```python
from work_wechat_log.log import WorkWechatLog

log = WorkWechatLog(webhook_urls, False)
log.image("./tmp/test.png")
```

-------------------------------------------------------------------------------------
#### table(table: TableType, headers: TableHeadersType = (), tablefmt: TableFmtType = "simple") 发送表格消息

- @see https://pypi.org/project/tabulate/
- 参数都和`tabulate`一样
- returns {None}

> 测试模式使用tabulate输出表格，生产模式会转化为image发送

example:
```python
from work_wechat_log.log import WorkWechatLog

log = WorkWechatLog(webhook_urls, False)
table = [["spam",42],["eggs",451],["bacon",0]]
headers = ["item", "qty"]
log.table(table, headers, "simple_grid")
```

-------------------------------------------------------------------------------------
#### file(file_path: str) 发送文件消息

- `file_path` {str} 文件地址，要求文件大小在5B~20M之间
- returns {None}

example:
```python
from work_wechat_log.log import WorkWechatLog

log = WorkWechatLog(webhook_urls, False)
log.file("./tmp/test.pdf")
```
unit-convert 1.2.0
Easy way of converting units.
License: MIT
Requires Python: >=2.5
Keywords: unit,convert,conversion

# unit-convert
Easily convert units to different quantities.

For conveniance, abbreviations are accepted, where an attempt will be made to calculate the type based on the other inputs (eg. "m" can evaluate as either "minute" or "metre").

> **This library is deprecated**: A recommendation is to use [pint](https://github.com/hgrecco/pint) instead.


## Example Usage
```python
>>> from unit_convert import UnitConvert

# Yards + kilometres to miles
>>> UnitConvert(yards=136.23, kilometres=60)['miles']
37.35976780046479

# Bytes to terabytes
>>> UnitConvert('b', 19849347813875, 'megabytes', 512)['tb']
18.053364951617368

# List available conversions
>>> UnitConvert(metres=1).keys()
['nm', 'nanometres', 'Î¼m', 'micrometres', 'mm', 'millimetres', 'cm', 'centimetres', 'i', 'inches', 'ft', 'feet', 'm', 'metres', 'meters', 'yd', 'yards', 'km', 'kilometres', 'kilometers', 'miles', 'lightyears', 'au', 'astronomical_units', 'parsec']
```

Data size, time, distance, mass and temperatures are supported.