File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed
Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -60,6 +60,23 @@ url.search = "?q=canada&safe=off"
6060print (url) # https://google.com/search?q=canada&safe=off
6161```
6262
63+ ` can_ada ` also supports the ` URLSearchParams ` API:
64+
65+ ``` python
66+ from can_ada import URLSearchParams
67+
68+ params = URLSearchParams(" q=canada&safe=off" )
69+ params.append(" page" , " 2" )
70+ params.append(" page" , " 3" )
71+ params[" q" ] = " usa"
72+ print (params) # q=usa&safe=off&page=2&page=3
73+ print (params.has(" q" )) # True
74+ print (params.get(" page" )) # 2
75+ print (params.get_all(" page" )) # [2, 3]
76+ print (params.keys()) # ["q", "safe", "page"]
77+ print (params.values()) # ["usa", "off", "2", "3"]
78+ ```
79+
6380## Performance
6481
6582We find that ` can_ada ` is typically ~ 4x faster than urllib:
Original file line number Diff line number Diff line change 3232 ]
3333 },
3434 zip_safe = False ,
35- python_requires = ">=3.7 " ,
35+ python_requires = ">=3.9 " ,
3636)
You can’t perform that action at this time.
0 commit comments