Skip to main content

PicImageSearch APIs for Python 3.x 适用于 Python 3 以图搜源整合API

Project description

PicImageSearch

✨ 聚合识图引擎 用于以图搜源✨

license pypi python release release

📖文档 · 🐛提交建议

支持

简要说明

详细见文档 或者demo
同步请使用from PicImageSearch.sync import ...导入
异步请使用from PicImageSearch import Network,...导入
推荐使用异步

简单示例

from loguru import logger
from PicImageSearch import SauceNAO, Network

async with Network() as client:  # 可以设置代理 Network(proxies='scheme://host:port')
    saucenao = SauceNAO(client=client, api_key="your api key")  # client, api_key 不能少
    url = "https://raw.githubusercontent.com/kitUIN/PicImageSearch/main/demo/images/test01.jpg"
    resp = await saucenao.search(url=url)
    # 搜索本地图片
    # file = "demo/images/test01.jpg"
    # resp = await saucenao.search(file=file)

    logger.info(resp.status_code)  # HTTP 状态码
    # logger.info(resp.origin)  # 原始数据
    logger.info(resp.raw[0].origin)
    logger.info(resp.long_remaining)
    logger.info(resp.short_remaining)
    logger.info(resp.raw[0].thumbnail)
    logger.info(resp.raw[0].similarity)
    logger.info(resp.raw[0].hidden)
    logger.info(resp.raw[0].title)
    logger.info(resp.raw[0].author)
    logger.info(resp.raw[0].url)
    logger.info(resp.raw[0].pixiv_id)
    logger.info(resp.raw[0].member_id)
from PicImageSearch.sync import SauceNAO

saucenao = SauceNAO(api_key="your api key")  # api_key 不能少
url = "https://raw.githubusercontent.com/kitUIN/PicImageSearch/main/demo/images/test01.jpg"
resp = saucenao.search(url=url)
# 搜索本地图片
# file = "demo/images/test01.jpg"
# resp = saucenao.search(file=file)
# 下面操作与异步方法一致

安装

  • 此包需要 Python 3.7 或更新版本。
  • pip install PicImageSearch
  • 或者
  • pip install PicImageSearch -i https://pypi.tuna.tsinghua.edu.cn/simple

Star History

Star History

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

PicImageSearch-3.5.0.tar.gz (15.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

picimagesearch-3.5.0-py3-none-any.whl (22.2 kB view details)

Uploaded Python 3

File details

Details for the file PicImageSearch-3.5.0.tar.gz.

File metadata

  • Download URL: PicImageSearch-3.5.0.tar.gz
  • Upload date:
  • Size: 15.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.14

File hashes

Hashes for PicImageSearch-3.5.0.tar.gz
Algorithm Hash digest
SHA256 ec3b9927a3349797fc764bbc3986d31e777ca91ca918aa04987bd0364e907308
MD5 29b711c02e33fc2846e959ffeb997c7e
BLAKE2b-256 62234c0a41035499c1d70672811175e482a1105ca9cd7e7ee4ac182ac2234030

See more details on using hashes here.

File details

Details for the file picimagesearch-3.5.0-py3-none-any.whl.

File metadata

  • Download URL: picimagesearch-3.5.0-py3-none-any.whl
  • Upload date:
  • Size: 22.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.14

File hashes

Hashes for picimagesearch-3.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ba705a8ce81fcc174283abb5bc4dcd947edf166301758f2a787885ccb155f841
MD5 76e1c7e4b84a27bd342a069187369765
BLAKE2b-256 c033fb458b5452ca11ee751541d77987e446caed0c181015a5c46c703af0df48

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page