semvec/pypi-packages huggingface dataset:
Search4Faces 1.0.2
Face recognition via Search4Faces API
Keywords: python,face recognition,search4faces,ai


<div align="left">
    <h1>Search4FacesAPI <img src="https://search4faces.com/favicon.ico" width=30 height=30></h1>
    <p align="left" >
        <a href="https://pypi.org/project/Search4Faces/">
            <img src="https://img.shields.io/pypi/v/Search4Faces?style=flat-square" alt="PyPI">
        </a>
        <a href="https://pypi.org/project/Search4Faces/">
            <img src="https://img.shields.io/pypi/dd/Search4Faces?style=flat-square" alt="PyPI">
        </a>
    </p>
</div>

A simple library with async capabilities to interact with Search4Faces [API](https://search4faces.com/api.html)


## Usage

With ``SearchClient`` you can easily find social media profiles with similar faces. It is a great tool for finding duplicates, finding people, and more.

## Documentation

Official docs can be found on the [API's webpage](https://search4faces.com/api.html)

## Installation

```bash
pip install Search4Faces
```

## Requirements

 - ``Python 3.9+``
 - ``httpx``
 - ``pydantic``

## Features

 - ``Async capabilities``
 - ``Exception handling``
 - ``Pydantic return model``
 - ``LightWeight``

## Examples

```python
from Search4Faces import (
    SearchClient, 
    SearchAPIError, 
    MatchedPerson,
    sources,
)

client = SearchClient(
    token='your-token',     
    no_check=False,    # if you want to disable token check
) 

# you can use photo's url - client will fetch the image for you
photo_url = 'https://imgur.com/XYZ.jpg'
response: list[MatchedPerson] = client.find_similar(
    photo_url,
    source=sources.VK_OK_NEW_AVATAR, # you can specify the image database to search in
    show_hidden=True,                # or define if you want hidden profiles to show up
    results=25,                      # and choose how many results you want back (max 500)
)

# you can also provide a file / io.BytesIO object
response: list[MatchedPerson] = client.find_similar(
    open('photo.jpg', 'rb'),
)

# you can do some exception handling
try:

    response: list[MatchedPerson] = client.find_similar(photo_url)

except SearchAPIError as exc:

    print(exc)

# you can use some async methods
await client.find_similar_async(photo_url)
```

Developed by Nikita Minaev (c) 2023
nonebot-plugin-backup 1.0.5
A plugin based on NoneBot2 to backup files in qq group.
Requires Python: >=3.7

<div align="center">

# nonebot backup group files

✨ 一个基于 [NoneBot2](https://github.com/nonebot/nonebot2) 的插件，用于备份 QQ 群文件 ✨

</div>

<p align="center">

  <a href="https://github.com/ninthseason/nonebot-plugin-directlinker/blob/main/LICENSE">
    <img src="https://img.shields.io/badge/license-GPL3.0-informational">
  </a>

  <a href="https://github.com/nonebot/nonebot2">
    <img src="https://img.shields.io/badge/nonebot-v2-green">
  </a>

  <a href="https://github.com/Mrs4s/go-cqhttp">
    <img src="https://img.shields.io/badge/go--cqhttp-v1.0.0-red">
  </a>

  <a href="">
    <img src="https://img.shields.io/badge/release-v1.0-orange">
  </a>

</p>

## 术语介绍

`临时文件`: 不在文件夹内的文件(因为随手传个视频 大图也会进群文件,并且不在文件夹里的)

## 用途

备份群文件

会检索是否已备份, 所以请放心使用

会备份到 robot 安装目录/qqgroup/qq 群号

## 用法

配置文件`.env.*`中添加：

```python
backup_group=["<QQ群号>"]  # 启用插件的群, 默认为[],代表所有群
backup_command="备份群文件" # 设置插件触发命令
backup_maxsize=300        # 超过多少M的文件不备份, 会在后面提醒哪些没备份
backup_minsize=0.01       # 低于多少M的文件不备份, 默认10kb

backup_temp_files = True  # 是否备份`临时文件`,默认备份
backup_temp_file_ignore = [".gif", ".png", ".jpg", ".mp4"] # 忽略`临时文件`哪些文件后缀

recovery_command = "恢复群文件"
```

### 使用方法

直接打 `备份群文件` 或者自定义的触发命令即可

## 恢复群文件

请把备份的旧群文件夹名改为新群id, qqgroup/112334567 -> qqgroup/77655432

如何使用: 对应群输入`恢复群文件`即可

前提1: 机器人需要有管理员权限(否则无法创建文件夹)

前提2: 小bug?新群需要手动创建一下文件夹(任意一个),然后删除,不然第一次机器人好像无法创建文件夹

前提3: 小bug?上传空文件(0b)会失败 不过正经人也不会上传空文件, 就没写判断

## TODO

备份群精华: 不知道为啥12月7日之前的消息获取不到

## 缺点

不会同步删除群文件

## 参考来源

[DirectLinker](https://github.com/ninthseason/nonebot-plugin-directlinker)

因为我想备份群文件, 防止炸群, 然后发现只有这一个类似的~ 无奈只能魔改下