aisquared.config.harvesting package

Submodules

aisquared.config.harvesting.ChatbotHarvester module

class aisquared.config.harvesting.ChatbotHarvester.ChatbotHarvester(title, harvest_history=False, input_type='text', features=None, max_length=None)[source]

Bases: BaseObject

Harvesting for a chatbot

to_dict()[source]

Return the configuration object as a dictionary

aisquared.config.harvesting.ImageHarvester module

class aisquared.config.harvesting.ImageHarvester.ImageHarvester(how: str = 'all')[source]

Bases: BaseObject

Object to harvest images

Example usage:

>>> import aisquared
>>> my_obj = aisquared.config.harvesting.ImageHarvester()
>>> my_obj.to_dict()
{'className': 'ImageHarvester', 'params': {'how' : 'all'}}
property how
to_dict() dict[source]

Get the configuration object as a dictionary

aisquared.config.harvesting.InputHarvester module

class aisquared.config.harvesting.InputHarvester.InputHarvester(input_type: str = 'text', max_length: int | None = None, features: list | None = None)[source]

Bases: BaseObject

Object to harvest user-input text

Example usage:

>>> import aisquared
>>> my_obj = aisquared.config.harvesting.InputHarvester()
>>> my_obj.to_dict()
{'className': 'InputHarvester',
'params': {'inputType': 'text', 'maxLength': None, 'features': None}}
property features
property input_type
property max_length
to_dict() dict[source]

Get the configuration object as a dictionary

aisquared.config.harvesting.QueryParameterHarvester module

class aisquared.config.harvesting.QueryParameterHarvester.QueryParameterHarvester(query_keys: str | list, url_locations: str | list, attributes: str | list)[source]

Bases: BaseObject

Harvester for Query Parameters

Example usage:

>>> import aisquared
>>> my_obj = aisquared.config.harvesting.QueryParameterHarvester(
    'test_key',
    'test_url',
    'test_attribute'
)
>>> my_obj.to_dict()
{'className': 'QueryParameterHarvester',
'params': {'queryKeys': ['test_key'],
'urlLocations': ['test_url'],
'attributes': ['test_attribute']}}
property attributes
property query_keys
to_dict() dict[source]

Get the configuration object as a dictionary

property url_locations

aisquared.config.harvesting.TextHarvester module

class aisquared.config.harvesting.TextHarvester.TextHarvester(how: str = 'all', regex: str | None = None, flags: str = 'gu', body_only: bool = False, keywords: str | list | None = None, limit: int | None = None)[source]

Bases: BaseObject

Object to harvest text

Example usage:

>>> import aisquared
>>> my_obj = aisquared.config.harvesting.TextHarvester(
    how = 'all',
    body_only = True
)
>>> my_obj.to_dict()
{'className': 'TextHarvester',
'params': {'how': 'all',
'regex': None,
'flags': 'gu',
'bodyOnly': True,
'limit': None}}
property body_only
property flags
property how
property limit
property regex
to_dict() dict[source]

Get the configuration object as a dictionary

Module contents

The aisquared.config.harvesting subpackage contains objects for configuring harvesting of data.