Is there any library in python that can parse fields such as username in form forms?

for example, there is a form like this:

<input type="text" name="user[name]" value="bob">

is parsed into the following format in rails

params // { user: { name: "bob" } }

so there are two questions I"d like to ask:

  1. rails how this operation is implemented over there. It seems that request is automatically parse after coming in (but ignoring this question, it is best to get the answer)
  2. python is there any way to convert the above into a dict: {user: {name: "bob"} (questions that need to be answered)

Note:
it"s best to have libraries or methods that already exist. I"m using flask to receive form requests.
Please do not give a solution to write your own rules.
Thank you


json library, mainly dumps and loads methods

Menu