Yandex Cloud
Поиск
Связаться с намиПодключиться
  • Истории успеха
  • Документация
  • Блог
  • Все сервисы
  • Статус работы сервисов
    • Популярные
    • Инфраструктура и сеть
    • Платформа данных
    • Контейнеры
    • Инструменты разработчика
    • Бессерверные вычисления
    • Безопасность
    • Мониторинг и управление ресурсами
    • ИИ для бизнеса
    • Бизнес-инструменты
  • Все решения
    • По отраслям
    • По типу задач
    • Экономика платформы
    • Безопасность
    • Техническая поддержка
    • Каталог партнёров
    • Обучение и сертификация
    • Облако для стартапов
    • Облако для крупного бизнеса
    • Центр технологий для общества
    • Облако для интеграторов
    • Поддержка IT-бизнеса
    • Облако для фрилансеров
    • Обучение и сертификация
    • Блог
    • Документация
    • Контент-программа
    • Мероприятия и вебинары
    • Контакты, чаты и сообщества
    • Идеи
    • Калькулятор цен
    • Тарифы
    • Промоакции и free tier
    • Правила тарификации
  • Истории успеха
  • Документация
  • Блог
Проект Яндекса
© 2025 ООО «Яндекс.Облако»
Yandex AI Studio
  • Начало работы с Model Gallery
    • О сервисе Yandex AI Studio
    • Yandex Workflows
    • Квоты и лимиты
    • Термины и определения
  • Переход с AI Assistant API на Responses API
  • Совместимость с OpenAI
    • О Yandex Cloud ML SDK
      • Overview
      • Authentication
        • Overview
        • Assistant types
        • Tools
        • Operation
        • Tuning
        • Result types for models
        • Datasets
        • Search API
        • Messages
        • Run types
        • Search index types
        • Other types
        • Batch
      • Request retries
  • Управление доступом
  • Правила тарификации
  • Аудитные логи Audit Trails
  • Публичные материалы
  • История изменений

В этой статье:

  • Generative serch
  • class yandex_cloud_ml_sdk._search_api.generative.config.GenerativeSearchConfig
  • class yandex_cloud_ml_sdk._search_api.generative.result.SearchSource
  • class yandex_cloud_ml_sdk._search_api.generative.result.SearchQuery
  • class yandex_cloud_ml_sdk._search_api.generative.result.GenerativeSearchResult
  • class yandex_cloud_ml_sdk._search_api.generative.config.FilterType
  • General
  • class yandex_cloud_ml_sdk._search_api.types.SearchGroup
  • Web search
  • class yandex_cloud_ml_sdk._search_api.web.result.WebSearchDocument
  • Image search
  • class yandex_cloud_ml_sdk._search_api.image.result.ImageSearchDocument
  • Search by image
  • class yandex_cloud_ml_sdk._search_api.by_image.result.ByImageSearchDocument
  • Enum-like settings
  • class yandex_cloud_ml_sdk._search_api.enums.SearchType
  • class yandex_cloud_ml_sdk._search_api.enums.FamilyMode
  • class yandex_cloud_ml_sdk._search_api.enums.FixTypoMode
  • class yandex_cloud_ml_sdk._search_api.enums.SortOrder
  • class yandex_cloud_ml_sdk._search_api.enums.SortMode
  • class yandex_cloud_ml_sdk._search_api.enums.GroupMode
  • class yandex_cloud_ml_sdk._search_api.enums.Localization
  • class yandex_cloud_ml_sdk._search_api.enums.Format
  • class yandex_cloud_ml_sdk._search_api.enums.ImageFormat
  • class yandex_cloud_ml_sdk._search_api.enums.ImageOrientation
  • class yandex_cloud_ml_sdk._search_api.enums.ImageSize
  • class yandex_cloud_ml_sdk._search_api.enums.ImageColor
  1. Yandex Cloud ML SDK
  2. Справочник SDK (англ.)
  3. Types
  4. Search API

Search API

Статья создана
Yandex Cloud
Обновлена 7 ноября 2025 г.
  • Generative serch
    • class yandex_cloud_ml_sdk._search_api.generative.config.GenerativeSearchConfig
    • class yandex_cloud_ml_sdk._search_api.generative.result.SearchSource
    • class yandex_cloud_ml_sdk._search_api.generative.result.SearchQuery
    • class yandex_cloud_ml_sdk._search_api.generative.result.GenerativeSearchResult
    • class yandex_cloud_ml_sdk._search_api.generative.config.FilterType
  • General
    • class yandex_cloud_ml_sdk._search_api.types.SearchGroup
  • Web search
    • class yandex_cloud_ml_sdk._search_api.web.result.WebSearchDocument
  • Image search
    • class yandex_cloud_ml_sdk._search_api.image.result.ImageSearchDocument
  • Search by image
    • class yandex_cloud_ml_sdk._search_api.by_image.result.ByImageSearchDocument
  • Enum-like settings
    • class yandex_cloud_ml_sdk._search_api.enums.SearchType
    • class yandex_cloud_ml_sdk._search_api.enums.FamilyMode
    • class yandex_cloud_ml_sdk._search_api.enums.FixTypoMode
    • class yandex_cloud_ml_sdk._search_api.enums.SortOrder
    • class yandex_cloud_ml_sdk._search_api.enums.SortMode
    • class yandex_cloud_ml_sdk._search_api.enums.GroupMode
    • class yandex_cloud_ml_sdk._search_api.enums.Localization
    • class yandex_cloud_ml_sdk._search_api.enums.Format
    • class yandex_cloud_ml_sdk._search_api.enums.ImageFormat
    • class yandex_cloud_ml_sdk._search_api.enums.ImageOrientation
    • class yandex_cloud_ml_sdk._search_api.enums.ImageSize
    • class yandex_cloud_ml_sdk._search_api.enums.ImageColor

Generative serchGenerative serch

typeddict yandex_cloud_ml_sdk._search_api.generative.config.DateFilterType

Date filter dict type for generative search.

Example:

>>> filter_ = {'date': '>20240125'}

Required Keys

  • date (str)

typeddict yandex_cloud_ml_sdk._search_api.generative.config.FormatFilterType

Format filter dict type for generative search.

Example:

>>> filter_ = {'format': 'xlsx'}

Required Keys

  • format (str)

typeddict yandex_cloud_ml_sdk._search_api.generative.config.LangFilterType

Language filter dict type for generative search.

Example:

>>> filter_ = {'lang': 'ru'}

Required Keys

  • lang (str)

class yandexcloudmlsdk.searchapi.generative.config.GenerativeSearchConfigclass yandex_cloud_ml_sdk._search_api.generative.config.GenerativeSearchConfig

GenerativeSearchConfig(site: ‘tuple[str, …] | None’ = None, host: ‘tuple[str, …] | None’ = None, url: ‘tuple[str, …] | None’ = None, fix_misspell: ‘bool | None’ = None, enable_nrfm_docs: ‘bool | None’ = None, search_filters: ‘tuple[FilterType, …] | None’ = None)

site: tuple[str, ...] | None = None

Parameter for limiting search to specific location or list of sites.

host: tuple[str, ...] | None = None

Parameter for limiting search to specific location or list of hosts.

url: tuple[str, ...] | None = None

Parameter for limiting search to specific location or list of urls.

fix_misspell: bool | None = None

tells to backend to fix or not to fix misspels in queries.

enable_nrfm_docs: bool | None = None

tells to backend to include or not to include pages, which are not available via direct clicks from given sites/hosts/urls to search result.

search_filters: tuple[DateFilterType | FormatFilterType | LangFilterType, ...] | None = None

allows to limit search results with additional filters.

__init__(site=None, host=None, url=None, fix_misspell=None, enable_nrfm_docs=None, search_filters=None)

Parameters

  • site (tuple[str, ...] | None)
  • host (tuple[str, ...] | None)
  • url (tuple[str, ...] | None)
  • fix_misspell (bool | None)
  • enable_nrfm_docs (bool | None)
  • search_filters (tuple[DateFilterType | FormatFilterType | LangFilterType, ...] | None)

Return type

None

class yandexcloudmlsdk.searchapi.generative.result.SearchSourceclass yandex_cloud_ml_sdk._search_api.generative.result.SearchSource

Source document found for user query.

Might be used or not used in generative answer itself.

url: str

Url of the document

title: str

Title of the document

used: bool

Has this source been used in generative answer or not

class yandexcloudmlsdk.searchapi.generative.result.SearchQueryclass yandex_cloud_ml_sdk._search_api.generative.result.SearchQuery

SearchQuery(text: ‘str’, req_id: ‘str’)

text: str

Text of the search query

req_id: str

Request id

class yandexcloudmlsdk.searchapi.generative.result.GenerativeSearchResultclass yandex_cloud_ml_sdk._search_api.generative.result.GenerativeSearchResult

A class representing the result of a generative search request.

text: str

Generative answer itself. Note that footnootes like [N] in the text refers to GenerativeSearchResult.sources[N] source.

role: str

Message sender role; in case of the generative search, model always answers with the “assistant” role.

fixed_misspell_query: str | None

Fixed query string in case of query was fixed

is_answer_rejected: bool

Anwer was rejected by some reasons, probably because of the ethics constrictions

is_bullet_answer: bool

Model was unable to give good answer and returned bulleted list with some info.

sources: tuple[SearchSource]... ,

List of documents found by user query; every element number matches with footnotes in the .text attribute.

search_queries: tuple[SearchQuery]... ,

List of search queries sent to model

property content: str

Alias to GenerativeSearchResult.text.

Only to add some compatibility with raw Search API answer which have “content” field in protobufs and REST answers unlike other parts of this SDK.

class yandexcloudmlsdk.searchapi.generative.config.FilterTypeclass yandex_cloud_ml_sdk._search_api.generative.config.FilterType

yandex_cloud_ml_sdk._search_api.generative.config.FilterType

Generative search filter type which describes dict formats eligible to use with generative search API.

alias of DateFilterType | FormatFilterType | LangFilterType

GeneralGeneral

class yandexcloudmlsdk.searchapi.types.SearchGroupclass yandex_cloud_ml_sdk._search_api.types.SearchGroup

SearchGroup(documents: ‘tuple[XMLSearchDocumentTypeT, …]’)

documents: tuple[XMLSearchDocumentTypeT]... ,

count(value) → integer -- return number of occurrences of value

index(value[, start[, stop]]) → integer -- return first index of value.

Raises ValueError if the value is not present.

Supporting start and stop arguments is optional, but recommended.

Web searchWeb search

class yandexcloudmlsdk.searchapi.web.result.WebSearchDocumentclass yandex_cloud_ml_sdk._search_api.web.result.WebSearchDocument

WebSearchDocument(url: ‘str | None’, domain: ‘str | None’, modtime: ‘datetime.datetime | None’, title: ‘str | None’, lang: ‘str | None’, extra: ‘NestedDict’, passages: ‘tuple[str, …]’)

url: str | None

domain: str | None

title: str | None

modtime: datetime | None

lang: str | None

extra: dict[str, str | NestedDict]

passages: tuple[str]... ,

Image searchImage search

class yandexcloudmlsdk.searchapi.image.result.ImageSearchDocumentclass yandex_cloud_ml_sdk._search_api.image.result.ImageSearchDocument

ImageSearchDocument(url: ‘str | None’, domain: ‘str | None’, modtime: ‘datetime.datetime | None’, width: ‘int | None’, height: ‘int | None’, format: ‘str | None’, extra: ‘NestedDict’)

width: int | None

height: int | None

format: str | None

extra: NestedDict

url: str | None

domain: str | None

modtime: datetime.datetime | None

Search by imageSearch by image

class yandexcloudmlsdk.searchapi.byimage.result.ByImageSearchDocumentclass yandex_cloud_ml_sdk._search_api.by_image.result.ByImageSearchDocument

ByImageSearchDocument(url: ‘str’, format: ‘str | None’, width: ‘int’, height: ‘int’, passage: ‘str’, host: ‘str’, page_title: ‘str’, page_url: ‘str’)

url: str

Image URL.

format: str | None

Image format.

width: int

Image width.

height: int

Image height.

passage: str

Text passage.

host: str

Document host.

page_title: str

Document title.

page_url: str

Document URL.

Enum-like settingsEnum-like settings

class yandexcloudmlsdk.searchapi.enums.SearchTypeclass yandex_cloud_ml_sdk._search_api.enums.SearchType

Search type.

RU = 1

TR = 2

COM = 3

KK = 4

BE = 5

UZ = 6

classmethod Unknown(name, value)

Parameters

  • name (str)
  • value (int)

classmethod get_available()

Return type

tuple[str, …]

__new__(value)

conjugate()

Returns self, the complex conjugate of any int.

bit_length()

Number of bits necessary to represent self in binary.

>>> bin(37)
'0b100101'
>>> (37).bit_length()
6

bit_count()

Number of ones in the binary representation of the absolute value of self.

Also known as the population count.

>>> bin(13)
'0b1101'
>>> (13).bit_count()
3

as_integer_ratio()

Return a pair of integers, whose ratio is equal to the original int.

The ratio is in lowest terms and has a positive denominator.

>>> (10).as_integer_ratio()
(10, 1)
>>> (-10).as_integer_ratio()
(-10, 1)
>>> (0).as_integer_ratio()
(0, 1)

is_integer()

Returns True. Exists for duck type compatibility with float.is_integer.

real

the real part of a complex number

imag

the imaginary part of a complex number

numerator

the numerator of a rational number in lowest terms

denominator

the denominator of a rational number in lowest terms

__init__(*args, **kwds)

class yandexcloudmlsdk.searchapi.enums.FamilyModeclass yandex_cloud_ml_sdk._search_api.enums.FamilyMode

Results filtering.

NONE = 1

Filtering is disabled. Search results include any documents regardless of their contents.

MODERATE = 2

Moderate filter (default value). Documents of the Adult category are excluded from search results unless a query is explicitly made for searching resources of this category.

STRICT = 3

Regardless of a search query, documents of the Adult category and those with profanity are excluded from search results.

classmethod Unknown(name, value)

Parameters

  • name (str)
  • value (int)

classmethod get_available()

Return type

tuple[str, …]

__new__(value)

conjugate()

Returns self, the complex conjugate of any int.

bit_length()

Number of bits necessary to represent self in binary.

>>> bin(37)
'0b100101'
>>> (37).bit_length()
6

bit_count()

Number of ones in the binary representation of the absolute value of self.

Also known as the population count.

>>> bin(13)
'0b1101'
>>> (13).bit_count()
3

as_integer_ratio()

Return a pair of integers, whose ratio is equal to the original int.

The ratio is in lowest terms and has a positive denominator.

>>> (10).as_integer_ratio()
(10, 1)
>>> (-10).as_integer_ratio()
(-10, 1)
>>> (0).as_integer_ratio()
(0, 1)

is_integer()

Returns True. Exists for duck type compatibility with float.is_integer.

real

the real part of a complex number

imag

the imaginary part of a complex number

numerator

the numerator of a rational number in lowest terms

denominator

the denominator of a rational number in lowest terms

__init__(*args, **kwds)

class yandexcloudmlsdk.searchapi.enums.FixTypoModeclass yandex_cloud_ml_sdk._search_api.enums.FixTypoMode

Search query typo correction setting

ON = 1

Automatically correct typos (default value).

OFF = 2

Autocorrection is off.

classmethod Unknown(name, value)

Parameters

  • name (str)
  • value (int)

classmethod get_available()

Return type

tuple[str, …]

__new__(value)

conjugate()

Returns self, the complex conjugate of any int.

bit_length()

Number of bits necessary to represent self in binary.

>>> bin(37)
'0b100101'
>>> (37).bit_length()
6

bit_count()

Number of ones in the binary representation of the absolute value of self.

Also known as the population count.

>>> bin(13)
'0b1101'
>>> (13).bit_count()
3

as_integer_ratio()

Return a pair of integers, whose ratio is equal to the original int.

The ratio is in lowest terms and has a positive denominator.

>>> (10).as_integer_ratio()
(10, 1)
>>> (-10).as_integer_ratio()
(-10, 1)
>>> (0).as_integer_ratio()
(0, 1)

is_integer()

Returns True. Exists for duck type compatibility with float.is_integer.

real

the real part of a complex number

imag

the imaginary part of a complex number

numerator

the numerator of a rational number in lowest terms

denominator

the denominator of a rational number in lowest terms

__init__(*args, **kwds)

class yandexcloudmlsdk.searchapi.enums.SortOrderclass yandex_cloud_ml_sdk._search_api.enums.SortOrder

Search results sorting order

ASC = 1

Reverse order from oldest to most recent.

DESC = 2

Direct order from most recent to oldest (default).

classmethod Unknown(name, value)

Parameters

  • name (str)
  • value (int)

classmethod get_available()

Return type

tuple[str, …]

__new__(value)

conjugate()

Returns self, the complex conjugate of any int.

bit_length()

Number of bits necessary to represent self in binary.

>>> bin(37)
'0b100101'
>>> (37).bit_length()
6

bit_count()

Number of ones in the binary representation of the absolute value of self.

Also known as the population count.

>>> bin(13)
'0b1101'
>>> (13).bit_count()
3

as_integer_ratio()

Return a pair of integers, whose ratio is equal to the original int.

The ratio is in lowest terms and has a positive denominator.

>>> (10).as_integer_ratio()
(10, 1)
>>> (-10).as_integer_ratio()
(-10, 1)
>>> (0).as_integer_ratio()
(0, 1)

is_integer()

Returns True. Exists for duck type compatibility with float.is_integer.

real

the real part of a complex number

imag

the imaginary part of a complex number

numerator

the numerator of a rational number in lowest terms

denominator

the denominator of a rational number in lowest terms

__init__(*args, **kwds)

class yandexcloudmlsdk.searchapi.enums.SortModeclass yandex_cloud_ml_sdk._search_api.enums.SortMode

Search results sorting mode rule

BY_RELEVANCE = 1

Sort documents by relevance (default value).

BY_TIME = 2

Sort documents by update time.

classmethod Unknown(name, value)

Parameters

  • name (str)
  • value (int)

classmethod get_available()

Return type

tuple[str, …]

__new__(value)

conjugate()

Returns self, the complex conjugate of any int.

bit_length()

Number of bits necessary to represent self in binary.

>>> bin(37)
'0b100101'
>>> (37).bit_length()
6

bit_count()

Number of ones in the binary representation of the absolute value of self.

Also known as the population count.

>>> bin(13)
'0b1101'
>>> (13).bit_count()
3

as_integer_ratio()

Return a pair of integers, whose ratio is equal to the original int.

The ratio is in lowest terms and has a positive denominator.

>>> (10).as_integer_ratio()
(10, 1)
>>> (-10).as_integer_ratio()
(-10, 1)
>>> (0).as_integer_ratio()
(0, 1)

is_integer()

Returns True. Exists for duck type compatibility with float.is_integer.

real

the real part of a complex number

imag

the imaginary part of a complex number

numerator

the numerator of a rational number in lowest terms

denominator

the denominator of a rational number in lowest terms

__init__(*args, **kwds)

class yandexcloudmlsdk.searchapi.enums.GroupModeclass yandex_cloud_ml_sdk._search_api.enums.GroupMode

Result grouping method.

FLAT = 1

Flat grouping. Each group contains a single document.

DEEP = 2

Grouping by domain. Each group contains documents from one domain.

classmethod Unknown(name, value)

Parameters

  • name (str)
  • value (int)

classmethod get_available()

Return type

tuple[str, …]

__new__(value)

conjugate()

Returns self, the complex conjugate of any int.

bit_length()

Number of bits necessary to represent self in binary.

>>> bin(37)
'0b100101'
>>> (37).bit_length()
6

bit_count()

Number of ones in the binary representation of the absolute value of self.

Also known as the population count.

>>> bin(13)
'0b1101'
>>> (13).bit_count()
3

as_integer_ratio()

Return a pair of integers, whose ratio is equal to the original int.

The ratio is in lowest terms and has a positive denominator.

>>> (10).as_integer_ratio()
(10, 1)
>>> (-10).as_integer_ratio()
(-10, 1)
>>> (0).as_integer_ratio()
(0, 1)

is_integer()

Returns True. Exists for duck type compatibility with float.is_integer.

real

the real part of a complex number

imag

the imaginary part of a complex number

numerator

the numerator of a rational number in lowest terms

denominator

the denominator of a rational number in lowest terms

__init__(*args, **kwds)

class yandexcloudmlsdk.searchapi.enums.Localizationclass yandex_cloud_ml_sdk._search_api.enums.Localization

Maximum number of groups that can be returned per page.

RU = 1

UK = 2

BE = 3

KK = 4

TR = 5

EN = 6

classmethod Unknown(name, value)

Parameters

  • name (str)
  • value (int)

classmethod get_available()

Return type

tuple[str, …]

__new__(value)

conjugate()

Returns self, the complex conjugate of any int.

bit_length()

Number of bits necessary to represent self in binary.

>>> bin(37)
'0b100101'
>>> (37).bit_length()
6

bit_count()

Number of ones in the binary representation of the absolute value of self.

Also known as the population count.

>>> bin(13)
'0b1101'
>>> (13).bit_count()
3

as_integer_ratio()

Return a pair of integers, whose ratio is equal to the original int.

The ratio is in lowest terms and has a positive denominator.

>>> (10).as_integer_ratio()
(10, 1)
>>> (-10).as_integer_ratio()
(-10, 1)
>>> (0).as_integer_ratio()
(0, 1)

is_integer()

Returns True. Exists for duck type compatibility with float.is_integer.

real

the real part of a complex number

imag

the imaginary part of a complex number

numerator

the numerator of a rational number in lowest terms

denominator

the denominator of a rational number in lowest terms

__init__(*args, **kwds)

class yandexcloudmlsdk.searchapi.enums.Formatclass yandex_cloud_ml_sdk._search_api.enums.Format

Search result format

XML = 1

HTML = 2

classmethod Unknown(name, value)

Parameters

  • name (str)
  • value (int)

classmethod get_available()

Return type

tuple[str, …]

__new__(value)

conjugate()

Returns self, the complex conjugate of any int.

bit_length()

Number of bits necessary to represent self in binary.

>>> bin(37)
'0b100101'
>>> (37).bit_length()
6

bit_count()

Number of ones in the binary representation of the absolute value of self.

Also known as the population count.

>>> bin(13)
'0b1101'
>>> (13).bit_count()
3

as_integer_ratio()

Return a pair of integers, whose ratio is equal to the original int.

The ratio is in lowest terms and has a positive denominator.

>>> (10).as_integer_ratio()
(10, 1)
>>> (-10).as_integer_ratio()
(-10, 1)
>>> (0).as_integer_ratio()
(0, 1)

is_integer()

Returns True. Exists for duck type compatibility with float.is_integer.

real

the real part of a complex number

imag

the imaginary part of a complex number

numerator

the numerator of a rational number in lowest terms

denominator

the denominator of a rational number in lowest terms

__init__(*args, **kwds)

class yandexcloudmlsdk.searchapi.enums.ImageFormatclass yandex_cloud_ml_sdk._search_api.enums.ImageFormat

JPEG = 1

JPG format.

GIF = 2

GIF format.

PNG = 3

PNG format.

classmethod Unknown(name, value)

Parameters

  • name (str)
  • value (int)

classmethod get_available()

Return type

tuple[str, …]

__new__(value)

conjugate()

Returns self, the complex conjugate of any int.

bit_length()

Number of bits necessary to represent self in binary.

>>> bin(37)
'0b100101'
>>> (37).bit_length()
6

bit_count()

Number of ones in the binary representation of the absolute value of self.

Also known as the population count.

>>> bin(13)
'0b1101'
>>> (13).bit_count()
3

as_integer_ratio()

Return a pair of integers, whose ratio is equal to the original int.

The ratio is in lowest terms and has a positive denominator.

>>> (10).as_integer_ratio()
(10, 1)
>>> (-10).as_integer_ratio()
(-10, 1)
>>> (0).as_integer_ratio()
(0, 1)

is_integer()

Returns True. Exists for duck type compatibility with float.is_integer.

real

the real part of a complex number

imag

the imaginary part of a complex number

numerator

the numerator of a rational number in lowest terms

denominator

the denominator of a rational number in lowest terms

__init__(*args, **kwds)

class yandexcloudmlsdk.searchapi.enums.ImageOrientationclass yandex_cloud_ml_sdk._search_api.enums.ImageOrientation

VERTICAL = 1

Horizontal orientation.

HORIZONTAL = 2

Vertical orientation.

SQUARE = 3

Square aspect ratio.

classmethod Unknown(name, value)

Parameters

  • name (str)
  • value (int)

classmethod get_available()

Return type

tuple[str, …]

__new__(value)

conjugate()

Returns self, the complex conjugate of any int.

bit_length()

Number of bits necessary to represent self in binary.

>>> bin(37)
'0b100101'
>>> (37).bit_length()
6

bit_count()

Number of ones in the binary representation of the absolute value of self.

Also known as the population count.

>>> bin(13)
'0b1101'
>>> (13).bit_count()
3

as_integer_ratio()

Return a pair of integers, whose ratio is equal to the original int.

The ratio is in lowest terms and has a positive denominator.

>>> (10).as_integer_ratio()
(10, 1)
>>> (-10).as_integer_ratio()
(-10, 1)
>>> (0).as_integer_ratio()
(0, 1)

is_integer()

Returns True. Exists for duck type compatibility with float.is_integer.

real

the real part of a complex number

imag

the imaginary part of a complex number

numerator

the numerator of a rational number in lowest terms

denominator

the denominator of a rational number in lowest terms

__init__(*args, **kwds)

class yandexcloudmlsdk.searchapi.enums.ImageSizeclass yandex_cloud_ml_sdk._search_api.enums.ImageSize

ENORMOUS = 1

Very large images (larger than 1,600 × 1,200 pixels).

LARGE = 2

Large images (from 800 × 600 to 1,600 × 1,200 pixels).

MEDIUM = 3

Medium images (from 150 × 150 to 800 × 600 pixels).

SMALL = 4

Small images (from 32 × 32 to 150 × 150 pixels).

TINY = 5

Icons (up to 32 × 32 pixels).

WALLPAPER = 6

Desktop wallpapers.

classmethod Unknown(name, value)

Parameters

  • name (str)
  • value (int)

classmethod get_available()

Return type

tuple[str, …]

__new__(value)

conjugate()

Returns self, the complex conjugate of any int.

bit_length()

Number of bits necessary to represent self in binary.

>>> bin(37)
'0b100101'
>>> (37).bit_length()
6

bit_count()

Number of ones in the binary representation of the absolute value of self.

Also known as the population count.

>>> bin(13)
'0b1101'
>>> (13).bit_count()
3

as_integer_ratio()

Return a pair of integers, whose ratio is equal to the original int.

The ratio is in lowest terms and has a positive denominator.

>>> (10).as_integer_ratio()
(10, 1)
>>> (-10).as_integer_ratio()
(-10, 1)
>>> (0).as_integer_ratio()
(0, 1)

is_integer()

Returns True. Exists for duck type compatibility with float.is_integer.

real

the real part of a complex number

imag

the imaginary part of a complex number

numerator

the numerator of a rational number in lowest terms

denominator

the denominator of a rational number in lowest terms

__init__(*args, **kwds)

class yandexcloudmlsdk.searchapi.enums.ImageColorclass yandex_cloud_ml_sdk._search_api.enums.ImageColor

COLOR = 1

Color images.

GRAYSCALE = 2

Black and white images.

RED = 3

Red is the main color of the image.

ORANGE = 4

Orange is the main color of the image.

YELLOW = 5

Yellow is the main color of the image.

GREEN = 6

Green is the main color of the image.

CYAN = 7

Cyan is the main color of the image.

BLUE = 8

Blue is the main color of the image.

VIOLET = 9

Violet is the main color of the image.

WHITE = 10

White is the main color of the image.

BLACK = 11

Black is the main color of the image.

classmethod Unknown(name, value)

Parameters

  • name (str)
  • value (int)

classmethod get_available()

Return type

tuple[str, …]

__new__(value)

conjugate()

Returns self, the complex conjugate of any int.

bit_length()

Number of bits necessary to represent self in binary.

>>> bin(37)
'0b100101'
>>> (37).bit_length()
6

bit_count()

Number of ones in the binary representation of the absolute value of self.

Also known as the population count.

>>> bin(13)
'0b1101'
>>> (13).bit_count()
3

as_integer_ratio()

Return a pair of integers, whose ratio is equal to the original int.

The ratio is in lowest terms and has a positive denominator.

>>> (10).as_integer_ratio()
(10, 1)
>>> (-10).as_integer_ratio()
(-10, 1)
>>> (0).as_integer_ratio()
(0, 1)

is_integer()

Returns True. Exists for duck type compatibility with float.is_integer.

real

the real part of a complex number

imag

the imaginary part of a complex number

numerator

the numerator of a rational number in lowest terms

denominator

the denominator of a rational number in lowest terms

__init__(*args, **kwds)

Была ли статья полезна?

Предыдущая
Datasets
Следующая
Messages
Проект Яндекса
© 2025 ООО «Яндекс.Облако»