Skip to main content

A set of pure utility methods for python.

Project description

Ask

A set of pure utility methods for python.

dataclass

def optional_fields(dataclass) -> Tuple[Field, ...]:
    """
    Lists all `Optional` fields in a dataclass instance or class
    :param dataclass: dataclass instance or class
    :return: tuple of all `Optional` fields of the given dataclass
    """

iterable

def first(iterable: Iterable[Any], default: Optional[Any] = None) -> Any:
    """
    Get first of an `Iterable` or default
    :param iterable: any `Iterable`
    :param default: value to return if the iterable is empty. None by default.
    :return: first of an `Iterable` or default
    """

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for pyask, version 0.2.2
Filename, size File type Python version Upload date Hashes
Filename, size pyask-0.2.2-py3-none-any.whl (3.3 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size pyask-0.2.2.tar.gz (1.9 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page