Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Fetching contributors…
Cannot retrieve contributors at this time
79 lines (55 sloc) 2.1 KB


Badge fury Build status

furl is a small Python library that makes manipulating URLs simple.

Python's standard urllib and urlparse modules provide a number of URL manipulation functions, but using these functions to perform common URL manipulations proves tedious. Furl makes manipulating URLs easy.

Furl is well tested, Unlicensed in the public domain, and supports both Python 2 and 3.

Query arguments are easy. Really easy.

>>> from furl import furl
>>> f = furl('')
>>> f.args['three'] = '3'
>>> del f.args['one']
>>> f.url

Or use furl's inline modification methods.

>>> furl('').add({'two':'2'}).url

>>> furl('').set({'three':'3'}).url

>>> furl('').remove(['one']).url

Encoding is handled for you.

>>> f = furl('')
>>> f.path = 'some encoding here'
>>> f.args['and some encoding'] = 'here, too'
>>> f.url

Fragments have a path and a query, too.

>>> f = furl('')
>>> f.fragment.path.segments = ['two', 'directories']
>>> f.fragment.args = {'one':'argument'}
>>> f.url


See more furl magic and examples in furl's API document,


Installing furl with pip is easy.

$ pip install furl

Deprecated methods

f.pathstr, f.querystr, and f.fragmentstr are deprecated in favor of str(f.path), str(f.query), and str(f.fragment). There should be one, and preferably only one, obvious way to serialize URL components to strings.

Jump to Line
Something went wrong with that request. Please try again.