Reference¶
Herein find documentation for the gory details of nominally.
API¶
-
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.
Report of a single name (parse into details).
Help via usage information. [help, -h, –help]
Version information. [-V, –version]
Name¶
-
class
nominally.parser.
Name
(raw: str = '')[source]¶ A personal name, separated and simplified into component parts.
-
detail
¶
-
classmethod
clean
(s: str, *, condense: bool = False, final: bool = False) → str[source]¶ Clean this string to the simplest possible representation (but no simpler).
Note
Assumes that any nicknames have already been removed, along with anything else that would depend on special characters (other than commas).
-
__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.
-
first
¶
-
last
¶
-
middle
¶
-
nickname
¶
-
suffix
¶
-
title
¶
-