{"id":13468783,"url":"https://github.com/r1chardj0n3s/parse","last_synced_at":"2025-05-14T22:03:22.471Z","repository":{"id":1868232,"uuid":"2793435","full_name":"r1chardj0n3s/parse","owner":"r1chardj0n3s","description":"Parse strings using a specification based on the Python format() syntax.","archived":false,"fork":false,"pushed_at":"2024-12-16T02:20:33.000Z","size":392,"stargazers_count":1745,"open_issues_count":21,"forks_count":102,"subscribers_count":25,"default_branch":"master","last_synced_at":"2025-05-07T21:12:32.819Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://pypi.python.org/pypi/parse","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"lxfontes/tcp2sctp","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/r1chardj0n3s.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2011-11-17T05:31:01.000Z","updated_at":"2025-05-03T10:49:16.000Z","dependencies_parsed_at":"2023-11-30T03:31:38.605Z","dependency_job_id":"7457fd53-ea40-4e66-8ab1-2a7b75fb99cd","html_url":"https://github.com/r1chardj0n3s/parse","commit_stats":{"total_commits":223,"total_committers":37,"mean_commits":6.027027027027027,"dds":0.5650224215246638,"last_synced_commit":"334db144c2813e9029cb890bbd49edd30f67ab9b"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r1chardj0n3s%2Fparse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r1chardj0n3s%2Fparse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r1chardj0n3s%2Fparse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/r1chardj0n3s%2Fparse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/r1chardj0n3s","download_url":"https://codeload.github.com/r1chardj0n3s/parse/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253655954,"owners_count":21943081,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T15:01:19.008Z","updated_at":"2025-05-14T22:03:22.416Z","avatar_url":"https://github.com/r1chardj0n3s.png","language":"Python","readme":"Installation\n------------\n\n.. code-block:: pycon\n\n    pip install parse\n\nUsage\n-----\n\nParse strings using a specification based on the Python `format()`_ syntax.\n\n   ``parse()`` is the opposite of ``format()``\n\nThe module is set up to only export ``parse()``, ``search()``, ``findall()``,\nand ``with_pattern()`` when ``import *`` is used:\n\n\u003e\u003e\u003e from parse import *\n\nFrom there it's a simple thing to parse a string:\n\n.. code-block:: pycon\n\n    \u003e\u003e\u003e parse(\"It's {}, I love it!\", \"It's spam, I love it!\")\n    \u003cResult ('spam',) {}\u003e\n    \u003e\u003e\u003e _[0]\n    'spam'\n\nOr to search a string for some pattern:\n\n.. code-block:: pycon\n\n    \u003e\u003e\u003e search('Age: {:d}\\n', 'Name: Rufus\\nAge: 42\\nColor: red\\n')\n    \u003cResult (42,) {}\u003e\n\nOr find all the occurrences of some pattern in a string:\n\n.. code-block:: pycon\n\n    \u003e\u003e\u003e ''.join(r[0] for r in findall(\"\u003e{}\u003c\", \"\u003cp\u003ethe \u003cb\u003ebold\u003c/b\u003e text\u003c/p\u003e\"))\n    'the bold text'\n\nIf you're going to use the same pattern to match lots of strings you can\ncompile it once:\n\n.. code-block:: pycon\n\n    \u003e\u003e\u003e from parse import compile\n    \u003e\u003e\u003e p = compile(\"It's {}, I love it!\")\n    \u003e\u003e\u003e print(p)\n    \u003cParser \"It's {}, I love it!\"\u003e\n    \u003e\u003e\u003e p.parse(\"It's spam, I love it!\")\n    \u003cResult ('spam',) {}\u003e\n\n(\"compile\" is not exported for ``import *`` usage as it would override the\nbuilt-in ``compile()`` function)\n\nThe default behaviour is to match strings case insensitively. You may match with\ncase by specifying `case_sensitive=True`:\n\n.. code-block:: pycon\n\n    \u003e\u003e\u003e parse('SPAM', 'spam', case_sensitive=True) is None\n    True\n\n.. _format():\n  https://docs.python.org/3/library/stdtypes.html#str.format\n\n\nFormat Syntax\n-------------\n\nA basic version of the `Format String Syntax`_ is supported with anonymous\n(fixed-position), named and formatted fields::\n\n   {[field name]:[format spec]}\n\nField names must be a valid Python identifiers, including dotted names;\nelement indexes imply dictionaries (see below for example).\n\nNumbered fields are also not supported: the result of parsing will include\nthe parsed fields in the order they are parsed.\n\nThe conversion of fields to types other than strings is done based on the\ntype in the format specification, which mirrors the ``format()`` behaviour.\nThere are no \"!\" field conversions like ``format()`` has.\n\nSome simple parse() format string examples:\n\n.. code-block:: pycon\n\n    \u003e\u003e\u003e parse(\"Bring me a {}\", \"Bring me a shrubbery\")\n    \u003cResult ('shrubbery',) {}\u003e\n    \u003e\u003e\u003e r = parse(\"The {} who {} {}\", \"The knights who say Ni!\")\n    \u003e\u003e\u003e print(r)\n    \u003cResult ('knights', 'say', 'Ni!') {}\u003e\n    \u003e\u003e\u003e print(r.fixed)\n    ('knights', 'say', 'Ni!')\n    \u003e\u003e\u003e print(r[0])\n    knights\n    \u003e\u003e\u003e print(r[1:])\n    ('say', 'Ni!')\n    \u003e\u003e\u003e r = parse(\"Bring out the holy {item}\", \"Bring out the holy hand grenade\")\n    \u003e\u003e\u003e print(r)\n    \u003cResult () {'item': 'hand grenade'}\u003e\n    \u003e\u003e\u003e print(r.named)\n    {'item': 'hand grenade'}\n    \u003e\u003e\u003e print(r['item'])\n    hand grenade\n    \u003e\u003e\u003e 'item' in r\n    True\n\nNote that `in` only works if you have named fields.\n\nDotted names and indexes are possible with some limits. Only word identifiers\nare supported (ie. no numeric indexes) and the application must make additional\nsense of the result:\n\n.. code-block:: pycon\n\n    \u003e\u003e\u003e r = parse(\"Mmm, {food.type}, I love it!\", \"Mmm, spam, I love it!\")\n    \u003e\u003e\u003e print(r)\n    \u003cResult () {'food.type': 'spam'}\u003e\n    \u003e\u003e\u003e print(r.named)\n    {'food.type': 'spam'}\n    \u003e\u003e\u003e print(r['food.type'])\n    spam\n    \u003e\u003e\u003e r = parse(\"My quest is {quest[name]}\", \"My quest is to seek the holy grail!\")\n    \u003e\u003e\u003e print(r)\n    \u003cResult () {'quest': {'name': 'to seek the holy grail!'}}\u003e\n    \u003e\u003e\u003e print(r['quest'])\n    {'name': 'to seek the holy grail!'}\n    \u003e\u003e\u003e print(r['quest']['name'])\n    to seek the holy grail!\n\nIf the text you're matching has braces in it you can match those by including\na double-brace ``{{`` or ``}}`` in your format string, just like format() does.\n\n\nFormat Specification\n--------------------\n\nMost often a straight format-less ``{}`` will suffice where a more complex\nformat specification might have been used.\n\nMost of `format()`'s `Format Specification Mini-Language`_ is supported:\n\n   [[fill]align][sign][0][width][.precision][type]\n\nThe differences between `parse()` and `format()` are:\n\n- The align operators will cause spaces (or specified fill character) to be\n  stripped from the parsed value. The width is not enforced; it just indicates\n  there may be whitespace or \"0\"s to strip.\n- Numeric parsing will automatically handle a \"0b\", \"0o\" or \"0x\" prefix.\n  That is, the \"#\" format character is handled automatically by d, b, o\n  and x formats. For \"d\" any will be accepted, but for the others the correct\n  prefix must be present if at all.\n- Numeric sign is handled automatically.  A sign specifier can be given, but\n  has no effect.\n- The thousands separator is handled automatically if the \"n\" type is used.\n- The types supported are a slightly different mix to the format() types.  Some\n  format() types come directly over: \"d\", \"n\", \"%\", \"f\", \"e\", \"b\", \"o\" and \"x\".\n  In addition some regular expression character group types \"D\", \"w\", \"W\", \"s\"\n  and \"S\" are also available.\n- The \"e\" and \"g\" types are case-insensitive so there is not need for\n  the \"E\" or \"G\" types. The \"e\" type handles Fortran formatted numbers (no\n  leading 0 before the decimal point).\n\n===== =========================================== ========\nType  Characters Matched                          Output\n===== =========================================== ========\nl     Letters (ASCII)                             str\nw     Letters, numbers and underscore             str\nW     Not letters, numbers and underscore         str\ns     Whitespace                                  str\nS     Non-whitespace                              str\nd     Integer numbers (optional sign, digits)     int\nD     Non-digit                                   str\nn     Numbers with thousands separators (, or .)  int\n%     Percentage (converted to value/100.0)       float\nf     Fixed-point numbers                         float\nF     Decimal numbers                             Decimal\ne     Floating-point numbers with exponent        float\n      e.g. 1.1e-10, NAN (all case insensitive)\ng     General number format (either d, f or e)    float\nb     Binary numbers                              int\no     Octal numbers                               int\nx     Hexadecimal numbers (lower and upper case)  int\nti    ISO 8601 format date/time                   datetime\n      e.g. 1972-01-20T10:21:36Z (\"T\" and \"Z\"\n      optional)\nte    RFC2822 e-mail format date/time             datetime\n      e.g. Mon, 20 Jan 1972 10:21:36 +1000\ntg    Global (day/month) format date/time         datetime\n      e.g. 20/1/1972 10:21:36 AM +1:00\nta    US (month/day) format date/time             datetime\n      e.g. 1/20/1972 10:21:36 PM +10:30\ntc    ctime() format date/time                    datetime\n      e.g. Sun Sep 16 01:03:52 1973\nth    HTTP log format date/time                   datetime\n      e.g. 21/Nov/2011:00:07:11 +0000\nts    Linux system log format date/time           datetime\n      e.g. Nov  9 03:37:44\ntt    Time                                        time\n      e.g. 10:21:36 PM -5:30\n===== =========================================== ========\n\nThe type can also be a datetime format string, following the\n`1989 C standard format codes`_, e.g. ``%Y-%m-%d``. Depending on the\ndirectives contained in the format string, parsed output may be an instance\nof ``datetime.datetime``, ``datetime.time``, or ``datetime.date``.\n\n.. code-block:: pycon\n\n    \u003e\u003e\u003e parse(\"{:%Y-%m-%d %H:%M:%S}\", \"2023-11-23 12:56:47\")\n    \u003cResult (datetime.datetime(2023, 11, 23, 12, 56, 47),) {}\u003e\n    \u003e\u003e\u003e parse(\"{:%H:%M}\", \"10:26\")\n    \u003cResult (datetime.time(10, 26),) {}\u003e\n    \u003e\u003e\u003e parse(\"{:%Y/%m/%d}\", \"2023/11/25\")\n    \u003cResult (datetime.date(2023, 11, 25),) {}\u003e\n\n\nSome examples of typed parsing with ``None`` returned if the typing\ndoes not match:\n\n.. code-block:: pycon\n\n    \u003e\u003e\u003e parse('Our {:d} {:w} are...', 'Our 3 weapons are...')\n    \u003cResult (3, 'weapons') {}\u003e\n    \u003e\u003e\u003e parse('Our {:d} {:w} are...', 'Our three weapons are...')\n    \u003e\u003e\u003e parse('Meet at {:tg}', 'Meet at 1/2/2011 11:00 PM')\n    \u003cResult (datetime.datetime(2011, 2, 1, 23, 0),) {}\u003e\n\nAnd messing about with alignment:\n\n.. code-block:: pycon\n\n    \u003e\u003e\u003e parse('with {:\u003e} herring', 'with     a herring')\n    \u003cResult ('a',) {}\u003e\n    \u003e\u003e\u003e parse('spam {:^} spam', 'spam    lovely     spam')\n    \u003cResult ('lovely',) {}\u003e\n\nNote that the \"center\" alignment does not test to make sure the value is\ncentered - it just strips leading and trailing whitespace.\n\nWidth and precision may be used to restrict the size of matched text\nfrom the input. Width specifies a minimum size and precision specifies\na maximum. For example:\n\n.. code-block:: pycon\n\n    \u003e\u003e\u003e parse('{:.2}{:.2}', 'look')           # specifying precision\n    \u003cResult ('lo', 'ok') {}\u003e\n    \u003e\u003e\u003e parse('{:4}{:4}', 'look at that')     # specifying width\n    \u003cResult ('look', 'at that') {}\u003e\n    \u003e\u003e\u003e parse('{:4}{:.4}', 'look at that')    # specifying both\n    \u003cResult ('look at ', 'that') {}\u003e\n    \u003e\u003e\u003e parse('{:2d}{:2d}', '0440')           # parsing two contiguous numbers\n    \u003cResult (4, 40) {}\u003e\n\nSome notes for the special date and time types:\n\n- the presence of the time part is optional (including ISO 8601, starting\n  at the \"T\"). A full datetime object will always be returned; the time\n  will be set to 00:00:00. You may also specify a time without seconds.\n- when a seconds amount is present in the input fractions will be parsed\n  to give microseconds.\n- except in ISO 8601 the day and month digits may be 0-padded.\n- the date separator for the tg and ta formats may be \"-\" or \"/\".\n- named months (abbreviations or full names) may be used in the ta and tg\n  formats in place of numeric months.\n- as per RFC 2822 the e-mail format may omit the day (and comma), and the\n  seconds but nothing else.\n- hours greater than 12 will be happily accepted.\n- the AM/PM are optional, and if PM is found then 12 hours will be added\n  to the datetime object's hours amount - even if the hour is greater\n  than 12 (for consistency.)\n- in ISO 8601 the \"Z\" (UTC) timezone part may be a numeric offset\n- timezones are specified as \"+HH:MM\" or \"-HH:MM\". The hour may be one or two\n  digits (0-padded is OK.) Also, the \":\" is optional.\n- the timezone is optional in all except the e-mail format (it defaults to\n  UTC.)\n- named timezones are not handled yet.\n\nNote: attempting to match too many datetime fields in a single parse() will\ncurrently result in a resource allocation issue. A TooManyFields exception\nwill be raised in this instance. The current limit is about 15. It is hoped\nthat this limit will be removed one day.\n\n.. _`Format String Syntax`:\n  https://docs.python.org/3/library/string.html#format-string-syntax\n.. _`Format Specification Mini-Language`:\n  https://docs.python.org/3/library/string.html#format-specification-mini-language\n.. _`1989 C standard format codes`:\n  https://docs.python.org/3/library/datetime.html#strftime-and-strptime-format-codes\n\n\n\nResult and Match Objects\n------------------------\n\nThe result of a ``parse()`` and ``search()`` operation is either ``None`` (no match), a\n``Result`` instance or a ``Match`` instance if ``evaluate_result`` is False.\n\nThe ``Result`` instance has three attributes:\n\n``fixed``\n   A tuple of the fixed-position, anonymous fields extracted from the input.\n``named``\n   A dictionary of the named fields extracted from the input.\n``spans``\n   A dictionary mapping the names and fixed position indices matched to a\n   2-tuple slice range of where the match occurred in the input.\n   The span does not include any stripped padding (alignment or width).\n\nThe ``Match`` instance has one method:\n\n``evaluate_result()``\n   Generates and returns a ``Result`` instance for this ``Match`` object.\n\n\n\nCustom Type Conversions\n-----------------------\n\nIf you wish to have matched fields automatically converted to your own type you\nmay pass in a dictionary of type conversion information to ``parse()`` and\n``compile()``.\n\nThe converter will be passed the field string matched. Whatever it returns\nwill be substituted in the ``Result`` instance for that field.\n\nYour custom type conversions may override the builtin types if you supply one\nwith the same identifier:\n\n.. code-block:: pycon\n\n    \u003e\u003e\u003e def shouty(string):\n    ...    return string.upper()\n    ...\n    \u003e\u003e\u003e parse('{:shouty} world', 'hello world', {\"shouty\": shouty})\n    \u003cResult ('HELLO',) {}\u003e\n\nIf the type converter has the optional ``pattern`` attribute, it is used as\nregular expression for better pattern matching (instead of the default one):\n\n.. code-block:: pycon\n\n    \u003e\u003e\u003e def parse_number(text):\n    ...    return int(text)\n    \u003e\u003e\u003e parse_number.pattern = r'\\d+'\n    \u003e\u003e\u003e parse('Answer: {number:Number}', 'Answer: 42', {\"Number\": parse_number})\n    \u003cResult () {'number': 42}\u003e\n    \u003e\u003e\u003e _ = parse('Answer: {:Number}', 'Answer: Alice', {\"Number\": parse_number})\n    \u003e\u003e\u003e assert _ is None, \"MISMATCH\"\n\nYou can also use the ``with_pattern(pattern)`` decorator to add this\ninformation to a type converter function:\n\n.. code-block:: pycon\n\n    \u003e\u003e\u003e from parse import with_pattern\n    \u003e\u003e\u003e @with_pattern(r'\\d+')\n    ... def parse_number(text):\n    ...    return int(text)\n    \u003e\u003e\u003e parse('Answer: {number:Number}', 'Answer: 42', {\"Number\": parse_number})\n    \u003cResult () {'number': 42}\u003e\n\nA more complete example of a custom type might be:\n\n.. code-block:: pycon\n\n    \u003e\u003e\u003e yesno_mapping = {\n    ...     \"yes\":  True,   \"no\":    False,\n    ...     \"on\":   True,   \"off\":   False,\n    ...     \"true\": True,   \"false\": False,\n    ... }\n    \u003e\u003e\u003e @with_pattern(r\"|\".join(yesno_mapping))\n    ... def parse_yesno(text):\n    ...     return yesno_mapping[text.lower()]\n\n\nIf the type converter ``pattern`` uses regex-grouping (with parenthesis),\nyou should indicate this by using the optional ``regex_group_count`` parameter\nin the ``with_pattern()`` decorator:\n\n.. code-block:: pycon\n\n    \u003e\u003e\u003e @with_pattern(r'((\\d+))', regex_group_count=2)\n    ... def parse_number2(text):\n    ...    return int(text)\n    \u003e\u003e\u003e parse('Answer: {:Number2} {:Number2}', 'Answer: 42 43', {\"Number2\": parse_number2})\n    \u003cResult (42, 43) {}\u003e\n\nOtherwise, this may cause parsing problems with unnamed/fixed parameters.\n\n\nPotential Gotchas\n-----------------\n\n``parse()`` will always match the shortest text necessary (from left to right)\nto fulfil the parse pattern, so for example:\n\n\n.. code-block:: pycon\n\n    \u003e\u003e\u003e pattern = '{dir1}/{dir2}'\n    \u003e\u003e\u003e data = 'root/parent/subdir'\n    \u003e\u003e\u003e sorted(parse(pattern, data).named.items())\n    [('dir1', 'root'), ('dir2', 'parent/subdir')]\n\nSo, even though `{'dir1': 'root/parent', 'dir2': 'subdir'}` would also fit\nthe pattern, the actual match represents the shortest successful match for\n``dir1``.\n\nDevelopers\n----------\n\nWant to contribute to parse? Fork the repo to your own GitHub account, and create a pull-request.\n\n.. code-block:: bash\n\n   git clone git@github.com:r1chardj0n3s/parse.git\n   git remote rename origin upstream\n   git remote add origin git@github.com:YOURUSERNAME/parse.git\n   git checkout -b myfeature\n\nTo run the tests locally:\n\n.. code-block:: bash\n\n   python -m venv .venv\n   source .venv/bin/activate\n   pip install -r tests/requirements.txt\n   pip install -e .\n   pytest\n\n----\n\nChangelog\n---------\n\n- 1.20.2 Template field names can now contain - character i.e. HYPHEN-MINUS, chr(0x2d)\n- 1.20.1 The `%f` directive accepts 1-6 digits, like strptime (thanks @bbertincourt)\n- 1.20.0 Added support for strptime codes (thanks @bendichter)\n- 1.19.1 Added support for sign specifiers in number formats (thanks @anntzer)\n- 1.19.0 Added slice access to fixed results (thanks @jonathangjertsen).\n  Also corrected matching of *full string* vs. *full line* (thanks @giladreti)\n  Fix issue with using digit field numbering and types\n- 1.18.0 Correct bug in int parsing introduced in 1.16.0 (thanks @maxxk)\n- 1.17.0 Make left- and center-aligned search consume up to next space\n- 1.16.0 Make compiled parse objects pickleable (thanks @martinResearch)\n- 1.15.0 Several fixes for parsing non-base 10 numbers (thanks @vladikcomper)\n- 1.14.0 More broad acceptance of Fortran number format (thanks @purpleskyfall)\n- 1.13.1 Project metadata correction.\n- 1.13.0 Handle Fortran formatted numbers with no leading 0 before decimal\n  point (thanks @purpleskyfall).\n  Handle comparison of FixedTzOffset with other types of object.\n- 1.12.1 Actually use the `case_sensitive` arg in compile (thanks @jacquev6)\n- 1.12.0 Do not assume closing brace when an opening one is found (thanks @mattsep)\n- 1.11.1 Revert having unicode char in docstring, it breaks Bamboo builds(?!)\n- 1.11.0 Implement `__contains__` for Result instances.\n- 1.10.0 Introduce a \"letters\" matcher, since \"w\" matches numbers\n  also.\n- 1.9.1 Fix deprecation warnings around backslashes in regex strings\n  (thanks Mickael Schoentgen). Also fix some documentation formatting\n  issues.\n- 1.9.0 We now honor precision and width specifiers when parsing numbers\n  and strings, allowing parsing of concatenated elements of fixed width\n  (thanks Julia Signell)\n- 1.8.4 Add LICENSE file at request of packagers.\n  Correct handling of AM/PM to follow most common interpretation.\n  Correct parsing of hexadecimal that looks like a binary prefix.\n  Add ability to parse case sensitively.\n  Add parsing of numbers to Decimal with \"F\" (thanks John Vandenberg)\n- 1.8.3 Add regex_group_count to with_pattern() decorator to support\n  user-defined types that contain brackets/parenthesis (thanks Jens Engel)\n- 1.8.2 add documentation for including braces in format string\n- 1.8.1 ensure bare hexadecimal digits are not matched\n- 1.8.0 support manual control over result evaluation (thanks Timo Furrer)\n- 1.7.0 parse dict fields (thanks Mark Visser) and adapted to allow\n  more than 100 re groups in Python 3.5+ (thanks David King)\n- 1.6.6 parse Linux system log dates (thanks Alex Cowan)\n- 1.6.5 handle precision in float format (thanks Levi Kilcher)\n- 1.6.4 handle pipe \"|\" characters in parse string (thanks Martijn Pieters)\n- 1.6.3 handle repeated instances of named fields, fix bug in PM time\n  overflow\n- 1.6.2 fix logging to use local, not root logger (thanks Necku)\n- 1.6.1 be more flexible regarding matched ISO datetimes and timezones in\n  general, fix bug in timezones without \":\" and improve docs\n- 1.6.0 add support for optional ``pattern`` attribute in user-defined types\n  (thanks Jens Engel)\n- 1.5.3 fix handling of question marks\n- 1.5.2 fix type conversion error with dotted names (thanks Sebastian Thiel)\n- 1.5.1 implement handling of named datetime fields\n- 1.5 add handling of dotted field names (thanks Sebastian Thiel)\n- 1.4.1 fix parsing of \"0\" in int conversion (thanks James Rowe)\n- 1.4 add __getitem__ convenience access on Result.\n- 1.3.3 fix Python 2.5 setup.py issue.\n- 1.3.2 fix Python 3.2 setup.py issue.\n- 1.3.1 fix a couple of Python 3.2 compatibility issues.\n- 1.3 added search() and findall(); removed compile() from ``import *``\n  export as it overwrites builtin.\n- 1.2 added ability for custom and override type conversions to be\n  provided; some cleanup\n- 1.1.9 to keep things simpler number sign is handled automatically;\n  significant robustification in the face of edge-case input.\n- 1.1.8 allow \"d\" fields to have number base \"0x\" etc. prefixes;\n  fix up some field type interactions after stress-testing the parser;\n  implement \"%\" type.\n- 1.1.7 Python 3 compatibility tweaks (2.5 to 2.7 and 3.2 are supported).\n- 1.1.6 add \"e\" and \"g\" field types; removed redundant \"h\" and \"X\";\n  removed need for explicit \"#\".\n- 1.1.5 accept textual dates in more places; Result now holds match span\n  positions.\n- 1.1.4 fixes to some int type conversion; implemented \"=\" alignment; added\n  date/time parsing with a variety of formats handled.\n- 1.1.3 type conversion is automatic based on specified field types. Also added\n  \"f\" and \"n\" types.\n- 1.1.2 refactored, added compile() and limited ``from parse import *``\n- 1.1.1 documentation improvements\n- 1.1.0 implemented more of the `Format Specification Mini-Language`_\n  and removed the restriction on mixing fixed-position and named fields\n- 1.0.0 initial release\n\nThis code is copyright 2012-2021 Richard Jones \u003crichard@python.org\u003e\nSee the end of the source file for the license of use.\n","funding_links":[],"categories":["Python","Data Gathering"],"sub_categories":["Ranking/Recommender","Libraries"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fr1chardj0n3s%2Fparse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fr1chardj0n3s%2Fparse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fr1chardj0n3s%2Fparse/lists"}