| Conditions | 1 |
| Total Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | import re |
||
| 23 | def join_url_params(url, params): |
||
| 24 | """Constructs percent-encoded query string from given parms dictionary |
||
| 25 | and appends to given url |
||
| 26 | Usage:: |
||
| 27 | >>> util.join_url_params("example.com/index.html", {"page-id": 2, "Company": "Tx Erpa"}) |
||
| 28 | example.com/index.html?page-id=2&Company=Tx+Erpa |
||
| 29 | """ |
||
| 30 | return url + "?" + urlencode(params) |
||
| 31 | |||
| 46 |
The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:
If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.