Herein find documentation for the gory details of nominally.


nominally.api.parse_name(s: str) → Dict[str, Any][source]

Parse into Name, return core name attributes as a dict.

This is the simplest function interface to nominally.

nominally.api.cli(arguments: Optional[Sequence[str]] = None) → int[source]

Simple CLI with a minimal set of options.

  1. Report of a single name (parse into details).

  2. Help via usage information. [help, -h, –help]

  3. Version information. [-V, –version]

nominally.api.cli_help() → int[source]

Output help for command line usage

nominally.api.cli_report(raw_name: str, details: bool = True) → int[source]

Parse into Name, output (core or report) attributes.

nominally.api.cli_version() → int[source]

Output version info and script location


class nominally.parser.Name(raw: str = '')[source]

A personal name, separated and simplified into component parts.

classmethod clean(s: str, *, condense: bool = False, final: bool = False) → str[source]

Clean this string to the simplest possible representation (but no simpler).


Assumes that any nicknames have already been removed, along with anything else that would depend on special characters (other than commas).

static strip_pointlessness(s: str) → str[source]
__eq__(other: Any) → bool[source]

If Name is parsable and object dicts are identical, consider it equal.

__str__() → str[source]

Output format: “last, title first middle suffix (nickname)”

  • “organs, mr harry x, jr (snapper)”

  • “organs, mr harry x, jr”

  • “organs, mr harry x”

  • “organs, harry x”

  • “organs, harry”

  • etc.

property parsable

Return true if any valid name values were created.

property raw

Return the original input string.

property cleaned

Return some set of cleaned string parts.

report() → Dict[str, Any][source]

Return a more-or-less complete parsing dict.