Parse the variables of the template. This returns all of the variable names in the URI Template. :returns: Set of variable names :rtype: set Example:: variables('https://api.github.com{/end}) # => {'end'} variables('https://api.github.com/repos{/username}{
(uri: str)
| 68 | |
| 69 | |
| 70 | def variables(uri: str) -> OrderedSet: |
| 71 | """Parse the variables of the template. |
| 72 | |
| 73 | This returns all of the variable names in the URI Template. |
| 74 | |
| 75 | :returns: Set of variable names |
| 76 | :rtype: set |
| 77 | |
| 78 | Example:: |
| 79 | |
| 80 | variables('https://api.github.com{/end}) |
| 81 | # => {'end'} |
| 82 | variables('https://api.github.com/repos{/username}{/repository}') |
| 83 | # => {'username', 'repository'} |
| 84 | |
| 85 | """ |
| 86 | return OrderedSet(URITemplate(uri).variable_names) |
searching dependent graphs…