semvec/pypi-packages huggingface dataset:
Ecovacs-RpaTools 0.1.2
小工具

# EcovacsTools

Ecovacs_RpaTools 是一个用于处理与Ecovacs相关的工具库，包含了消息发送、请求头处理和日期时间处理等功能。

## 目录

- [Ecovacs_message.py](#ecovacs_messagepy)
- [Ecovacs_header.py](#ecovacs_headerpy)
- [Ecovacs_date.py](#ecovacs_datepy)
- [Ecovacs_js.py](#ecovacs_jspy)
- [Ecovacs_logger.py](#ecovacs_logger)

## Ecovacs_message.py

### 功能

- 发送文本消息到指定的Webhook URL。

### 使用方法

```python
from Ecovacs_RpaTools.Ecovacs_message import Send_Text

webhook = "https://open.feishu.cn/open-apis/bot/v2/hook/XXXXXXXXXXXXX"
content = "Hello, World!"
response = Send_Text(webhook, content)
print(response)

```
## Ecovacs_header.py
- 将原始的请求头字符串转换为字典。
- 获取随机的User-Agent字符串。
### 使用方法
```python
from Ecovacs_RpaTools.Ecovacs_header import copy_headers_dict, get_ua
headers_raw = "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.3"
headers_dict = copy_headers_dict(headers_raw)
print(headers_dict)

user_agent = get_ua()
print(user_agent)

```
## Ecovacs_date.py
### 功能
- 获取当前时间。
- 获取当前年、月、日。
- 将时间戳转换为日期时间格式。
- 将日期时间格式转换为时间戳。
- 获取昨天开始的时间戳。
- 计算两个时间的差值（秒）。
- 处理微博和优酷的时间格式。
- 生成最近N天的日期列表。
### 使用方法
```python
from Ecovacs_RpaTools.Ecovacs_date import DateGo

# 获取当前时间
current_time = DateGo.now_data()
print(current_time)

# 获取当前年、月、日
current_ymd = DateGo.now_ymd()
print(current_ymd)

# 将时间戳转换为日期时间格式
timestamp = 1641024000
datetime_str = DateGo.timec_change_dtime(timestamp)
print(datetime_str)

# 将日期时间格式转换为时间戳
datetime_str = "2022-01-01 00:00:00"
timestamp = DateGo.dtime_to_timec(datetime_str)
print(timestamp)

# 获取昨天开始的时间戳
yesterday_timec = DateGo.yesterday_timec()
print(yesterday_timec)

# 计算两个时间的差值（秒）
time1 = 1641024000
time2 = 1641024060
time_diff = DateGo.difference_time(time1, time2)
print(time_diff)

# 处理微博时间格式
weibo_time = "1小时前"
formatted_time = DateGo.weibo_date(weibo_time)
print(formatted_time)

# 处理优酷时间格式
youku_time = "一天前"
formatted_time = DateGo.youku_date(youku_time)
print(formatted_time)

# 生成最近N天的日期列表
days = DateGo.gen_date(10)
print(days)

```



## Ecovacs_js.py

### 功能

- 将JavaScript中的`eval`压缩加密的代码还原成压缩前的代码。
### 使用方法

```python
from Ecovacs_RpaTools.Ecovacs_js import parse_evaljs

# 压缩加密的JavaScript代码
compressed_js = "eval(function(p,a,c,k,e,d){e=function(c){return c.toString(36)};if(!''.replace(/^/,String)){while(c--){d[c.toString(a)]=k[c]||c.toString(a)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('0 1(){2("3")}',4,4,'console|log|Hello|World'.split('|'),0,{}))"

# 还原压缩加密的代码
original_js = parse_evaljs(compressed_js)
print(original_js)
```

## Ecovacs_logger
### 功能

- 根据日志级别调用相应的日志记录方法，将日志消息输出到桌面 rpa_output.log 日志文件中。
### 使用方法
```python
from Ecovacs_RpaTools.Ecovacs_logger import log_with_context
task_id= "123456"
task_type= "test"
level= "info"
message= "hello world"
log_with_context(task_id, task_type, level, message)
```

[//]: # (python setup.py sdist bdist_wheel)

[//]: # (twine upload dist/*)
email-simplified 0.1.0
Email builder and sending handler interface.
Requires Python: >=3.11

# Email-Simplified

Email-Simplified provides a much simpler interface for creating and sending
email messages compared to Python's `email` and `smtplib` modules. It also
defines an interface for using other email sending providers that offer an API
other than SMTP.

[Flask-Email-Simplified] is an extension that integrates Email-Simplified with
Flask's configuration.

[Flask-Email-Simplified]: https://flask-email-simplified.readthedocs.io

## Install

Install from [PyPI]:

```
$ pip install email-simplified
```

[pypi]: https://pypi.org/project/email-simplified/

## Example

```python
from email_simplified.handlers import SMTPEmailHandler
from email_simplified import Message

email = SMTPEmailHandler()
message = Message(subject="Hello", text="Hello, World!", to=["world@example.test"])
email.send([message])
```
package-name-horse666 0.0.1
My short description
Requires Python: >=3.8

# package_name

Description. 
The package package_name is used to:
	- 
	-

## Installation

Use the package manager [pip](https://pip.pypa.io/en/stable/) to install package_name

```bash
pip install package_name
```

## Usage

```python
from package_name.module1_name import file1_name
file1_name.my_function()
```

## Author
My_name

## License
[MIT](https://choosealicense.com/licenses/mit/)
scarx-api-client 0.6.4
Client for Scarx API

# ScarxApi Python Client

Example Usage:

```
import asyncio
from scarx_api_client import ScarxApiChannel


async def main():
    with ScarxApiChannel("Test-Client", "ApiToken") as api:
        response = await api.IpServiceV1.get_ip(ip="1.1.1.1")
    print(response)


if __name__ == "__main__":
    loop = asyncio.new_event_loop()
    loop.run_until_complete(main())
```