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.7.4.tar.gz (15.8 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.7.4-py3-none-any.whl (22.7 kB view details)

Uploaded Python 3

File details

Details for the file picimagesearch-3.7.4.tar.gz.

File metadata

  • Download URL: picimagesearch-3.7.4.tar.gz
  • Upload date:
  • Size: 15.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.15

File hashes

Hashes for picimagesearch-3.7.4.tar.gz
Algorithm Hash digest
SHA256 80ff731f1e762587f39c580d39ceec0d61722ede1122b6c6b7a892079f76ed12
MD5 d96998c00867f49667b09eae6c9e6d74
BLAKE2b-256 d118da1e53b3121af54fa2c109d1f6fdae5f2917954144af497f1166ba9b999e

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for picimagesearch-3.7.4-py3-none-any.whl
Algorithm Hash digest
SHA256 8ac9533f0205002fc08638556c1889c8bea3d67b570a9072d812c1759e0aaaab
MD5 d42157d997666ce9ccbfbba9e60ebb04
BLAKE2b-256 87fec49a180da2d96bfbb690f2ef3dadd2b07ba0ad1fb589f6e73dd1f2dd5963

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