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.1

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.1
File Size Uploaded Provenance Actions
dfb_cat-0.1.1.tar.gz 2.2 kB Without provenance Details for dfb_cat-0.1.1.tar.gz

Built distribution (wheel)

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

Total release size: 4.8 kB

Release files / dfb_cat-0.1.1.tar.gz

Download URL dfb_cat-0.1.1.tar.gz
Size 2.2 kB
Tags Source
SHA-256 checksum
How to use checksums
927f2fd15481c94e8c38ad4eac8f7db273f5be2d614407b6d387388f790f72cd
BLAKE2b-256 checksum
How to use checksums
25d3ba178fd5076fc807dffa33a138ffbd770754d3a68e4f8bf297fde5b2c91d
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.1-py3-none-any.whl

Download URL dfb_cat-0.1.1-py3-none-any.whl
Size 2.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5ae5b81580bbf241b7eb2d8aeabf4b554dfa301c2f52388295402ff1034383b2
BLAKE2b-256 checksum
How to use checksums
54fa78a827b85e8bface6a0c5cddbca68a29d0899b8985107140530227bfac25
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.1

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.1 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