Example 1¶
Get paths and query arguments
In [ ]:
Copied!
from furl import furl
f = furl('http://www.google.com/?one=1&two=2')
f /= 'path'
del f.args['one']
f.args['three'] = '3'
f.url
from furl import furl
f = furl('http://www.google.com/?one=1&two=2')
f /= 'path'
del f.args['one']
f.args['three'] = '3'
f.url
Example 2¶
Modify paths inline
In [ ]:
Copied!
from furl import furl
furl('http://www.google.com/?one=1').add({'two':'2'}).url
furl('http://www.google.com/?one=1&two=2').set({'three':'3'}).url
furl('http://www.google.com/?one=1&two=2').remove(['one']).url
from furl import furl
furl('http://www.google.com/?one=1').add({'two':'2'}).url
furl('http://www.google.com/?one=1&two=2').set({'three':'3'}).url
furl('http://www.google.com/?one=1&two=2').remove(['one']).url