ipython
Python 3.7.3 (default, Apr 12 2019, 14:40:22)
Type 'copyright', 'credits' or 'license' for more information
IPython 7.3.0 -- An enhanced Interactive Python. Type '?' for help.
In [1]: from purl import URL
In [2]: url = URL("foobar:///my_path")
In [3]: url.scheme()
Out[3]: 'foobar'
In [4]: url.as_string()
Out[4]: '/my_path'