miniuri: The Universal URI Parser
Project description
How to install
============================
easy_install miniuri
What does it do?
============================
miniuri is a universal URI parser class.
The parser grants access to the following attributes::
foo://username:password@test.com:808/go/to/index.php?pet=cat&name=bam#eye
\_/ \_______________/ \______/ \_/ \___/ \_/ \_______________/\_/
| | | | | | | |
| userinfo hostname | | | query fragment
| \___________________________|/\________|____|_/
| | | | | |
scheme authority | path | extension
| |
port filename
How to use
============================
This example shows how you can set and get any of the URI attributes::
>>> from miniuri import Uri
>>> u = Uri( "http://www.foxhop.net/samsung/HL-T5087SA/red-LED-failure" )
>>> u.uri = "https://fox:pass@www.foxhop.net:81/path/filename.jpg?p=2#5"
>>> print u.uri
https://fox:pass@www.foxhop.net:81/path/filename.jpg?p=2#5
>>> print u.hostname
www.foxhop.net
>>> print u.scheme
https
>>> u.username = 'max'
>>> print u
https://max:pass@www.foxhop.net:81/path/filename.jpg?p=2#5
How do I thank you?
============================
You should follow me on http://twitter.com/russellbal
License
============================
Public Domain
============================
easy_install miniuri
What does it do?
============================
miniuri is a universal URI parser class.
The parser grants access to the following attributes::
foo://username:password@test.com:808/go/to/index.php?pet=cat&name=bam#eye
\_/ \_______________/ \______/ \_/ \___/ \_/ \_______________/\_/
| | | | | | | |
| userinfo hostname | | | query fragment
| \___________________________|/\________|____|_/
| | | | | |
scheme authority | path | extension
| |
port filename
How to use
============================
This example shows how you can set and get any of the URI attributes::
>>> from miniuri import Uri
>>> u = Uri( "http://www.foxhop.net/samsung/HL-T5087SA/red-LED-failure" )
>>> u.uri = "https://fox:pass@www.foxhop.net:81/path/filename.jpg?p=2#5"
>>> print u.uri
https://fox:pass@www.foxhop.net:81/path/filename.jpg?p=2#5
>>> print u.hostname
www.foxhop.net
>>> print u.scheme
https
>>> u.username = 'max'
>>> print u
https://max:pass@www.foxhop.net:81/path/filename.jpg?p=2#5
How do I thank you?
============================
You should follow me on http://twitter.com/russellbal
License
============================
Public Domain
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
miniuri-0.0.2.tar.gz
(2.5 kB
view hashes)
Built Distribution
miniuri-0.0.2-py2.7.egg
(4.6 kB
view hashes)