Skip to main content

dfb-cat

Простая и удобная библиотека для автоматического получения ссылок и загрузки изображений котиков с помощью OpenCV.

Установка

Вы можете установить библиотеку напрямую из PyPI:

pip install dfb-cat

Использование

Вот пример того, как получить список случайных котиков через API, скачать их изображения и отобразить на экране с помощью графического окна OpenCV:

import cv2 as cv
import dfb_cat

# Получаем ссылки и генерируем объекты котиков (например, 3 штуки)
urls_list = dfb_cat.get_cat_url(3)

# Проверяем, что запрос к API прошел успешно и список не пуст
if urls_list:
    for cat_number, cat_object in enumerate(urls_list):
        # Скачиваем изображение в объект
        if cat_object.download():
            # Отображаем графическое окно OpenCV с картинкой (cat_object.image)
            cv.imshow(f"Cat_#{cat_number + 1}", cat_object.image)

    print("Нажмите любую клавишу в окне изображения, чтобы завершить программу...")
    cv.waitKey(0)
    cv.destroyAllWindows()
else:
    print("Не удалось получить список котиков. Проверьте интернет-соединение.")

Требования

Библиотека автоматически установит следующие зависимости:

  • requests
  • numpy
  • opencv-python

Metadata

Release files for dfb-cat 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dfb-cat 0.1.0
File Size Uploaded Provenance Actions
dfb_cat-0.1.0.tar.gz 2.1 kB Without provenance Details for dfb_cat-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for dfb-cat 0.1.0
File Interpreter ABI Platform Actions
dfb_cat-0.1.0-py3-none-any.whl Python 3 none any Details for dfb_cat-0.1.0-py3-none-any.whl

Total release size: 4.8 kB

Release files / dfb_cat-0.1.0.tar.gz

Download URL dfb_cat-0.1.0.tar.gz
Size 2.1 kB
Tags Source
SHA-256 checksum
How to use checksums
3516a67df070785ea93f8c5535fd06283e0efdf6fafd5d9863a03de1b376130e
BLAKE2b-256 checksum
How to use checksums
cc7486ca5a96486a914ce3d34043ee17c052f038a32b43aa7437fc1dc1ab3fa2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.0

Release files / dfb_cat-0.1.0-py3-none-any.whl

Download URL dfb_cat-0.1.0-py3-none-any.whl
Size 2.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ef186f0a6e401a6db122e7a3a8fdcbab8bb34e369ba7acdb27d4937ccb793965
BLAKE2b-256 checksum
How to use checksums
65507216131140a930a710a319b3af9166429a878bf33e1fe71ae95a1b60f2b7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.0

Security for dfb-cat 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page