Metadata-Version: 2.1
Name: miniuri
Version: 1.1.0
Summary: miniuri: The Universal URI Parser
Home-page: https://git.unturf.com/python/miniuri
Author: Russell Ballestrini
Author-email: russell.ballestrini@gmail.com
License: Public Domain
Keywords: miniuri uri url parser
Platform: All
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.2
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13

miniuri
#######

miniuri is a universal URI parser class.

Only 150 lines of Python (486 lines if you count unit tests).


Installation
============

.. code-block:: bash

  pip install miniuri


What does it do?
================

The parser grants access to the following attributes:

.. code-block:: text

 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


Tutorial
========

This example shows how you can set and get any of the URI attributes:

.. code-block:: python

 >>> 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'
 >>> print(u.relative_uri)
 '/path/filename.jpg?p=2#5'


How do I thank you?
===================

You should follow me on http://twitter.com/russellbal


License
===================

* Public Domain


Public Revision Control
=======================

* https://git.unturf.com/python/miniuri
