feed.api.string package

Submodules

feed.api.string.operations module

operations.py contain functions for streaming string operations.

feed.api.string.operations.capitalize(s: feed.core.base.Stream[str][str]) → feed.core.base.Stream[str][str][source]

Computes the capitalization of a stream.

Parameters:s (Stream[str]) – A string stream.
Returns:A capitalized string stream.
Return type:Stream[str]
feed.api.string.operations.cat(s: feed.core.base.Stream[str][str], word: str) → feed.core.base.Stream[str][str][source]

Computes the concatenation of a stream with a word.

Parameters:
  • s (Stream[str]) – A string stream.
  • word (str) – A word to concatenate with the s.
Returns:

A concatenated string stream.

Return type:

Stream[str]

feed.api.string.operations.endswith(s: feed.core.base.Stream[str][str], word: str) → feed.core.base.Stream[bool][bool][source]

Computes the boolean stream of a string ending with a specific value.

Parameters:
  • s (Stream[str]) – A string stream.
  • word (str) – A word that a string value can end with.
Returns:

A boolean stream.

Return type:

Stream[bool]

feed.api.string.operations.lower(s: feed.core.base.Stream[str][str]) → feed.core.base.Stream[str][str][source]

Computes the lowercase of a string stream.

Parameters:s (Stream[str]) – A string stream.
Returns:A lowercase string stream.
Return type:Stream[str]
feed.api.string.operations.slice(s: feed.core.base.Stream[str][str], start: int, end: int) → feed.core.base.Stream[str][str][source]

Computes the substring of a string stream.

Parameters:s (Stream[str]) – A string stream.
Returns:A substring stream.
Return type:Stream[str]
feed.api.string.operations.startswith(s: feed.core.base.Stream[str][str], word: str) → feed.core.base.Stream[bool][bool][source]

Computes the boolean stream of a string starting with a specific value.

Parameters:
  • s (Stream[str]) – A string stream.
  • word (str) – A word that a string value can start with.
Returns:

A boolean stream.

Return type:

Stream[bool]

feed.api.string.operations.upper(s: feed.core.base.Stream[str][str]) → feed.core.base.Stream[str][str][source]

Computes the uppercase of a string stream.

Parameters:s (Stream[str]) – A string stream.
Returns:A uppercase string stream.
Return type:Stream[str]

Module contents

class feed.api.string.String[source]

Bases: object

A class to register accessor and instance methods.

classmethod register(names: List[str])[source]

A function decorator that adds accessor and instance methods for specified data type.

Parameters:names (List[str]) – A list of names used to register the function as a method.
Returns:A decorated function.
Return type:Callable
class feed.api.string.StringMethods(stream: Stream)[source]

Bases: feed.core.methods.Methods

capitalize(*args, **kwargs)
cat(*args, **kwargs)
endswith(*args, **kwargs)
lower(*args, **kwargs)
slice(*args, **kwargs)
startswith(*args, **kwargs)
upper(*args, **kwargs)
class feed.api.string.StringMixin[source]

Bases: feed.core.mixins.DataTypeMixin

capitalize(*args, **kwargs)
cat(*args, **kwargs)
endswith(*args, **kwargs)
lower(*args, **kwargs)
slice(*args, **kwargs)
startswith(*args, **kwargs)
upper(*args, **kwargs)