naturtag.utils.parsing module¶
Misc URL and string parsing utilities
- naturtag.utils.parsing.get_ids_from_url(url)¶
If a URL is provided containing an ID, return the taxon or observation ID.
- Return type:
tuple
[Optional
[int
],Optional
[int
]]- Returns:
(observation_id, taxon_id)
- naturtag.utils.parsing.quote(s)¶
Surround keyword in quotes if it contains whitespace
- Return type:
str
- naturtag.utils.parsing.strip_url(value)¶
If a URL is provided containing an ID, return just the ID
- Return type:
Optional
[int
]