Metadata-Version: 2.1
Name: domain-utils
Version: 0.6.0
Summary: A collection of util functions for extracting domains from urls.
Home-page: https://github.com/mozilla/domain_utils
Author: Sarah Bird
Author-email: sbird@mozilla.com
License: MIT license
Keywords: domain_utils
Platform: UNKNOWN
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Requires-Python: >=3.6
Requires-Dist: tldextract (==2.2.2)

==============
`domain_utils`
==============


.. image:: https://img.shields.io/pypi/v/domain_utils.svg
        :target: https://pypi.python.org/pypi/domain_utils

.. image:: https://img.shields.io/circleci/build/github/mozilla/domain_utils/master
        :target: https://app.circleci.com/pipelines/github/mozilla/domain_utils
        :alt: CircleCI

.. image:: https://readthedocs.org/projects/domain-utils/badge/?version=v0.6.0
        :target: https://domain-utils.readthedocs.io/en/v0.6.0/
        :alt: Documentation Status


A collection of util functions for extracting domains from urls.

Repo: https://github.com/mozilla/domain_utils

Install::

    pip install domain_utils

Use::

    import domain_utils as du
    # Return just the url `my.domain.cloudfront.net/a/path/to/a/file.html`
    du.get_stripped_url('https://my.domain.cloudfront.net/a/path/to/a/file.html?a=1')
    # Return just the eTLD+1 `domain.cloudfront.net`
    du.get_stripped_url('https://my.domain.cloudfront.net/a/path/to/a/file.html?a=1')


This package was originally extracted from
openwpm-utils_.


* Free software: Mozilla Public License license
* Documentation: https://domain-utils.readthedocs.io.


Community Participation Guidelines
----------------------------------

This project is governed by Mozilla's code of conduct and etiquette guidelines. 

For more details, please read the `Mozilla Community Participation Guidelines`_. 

For more information on how to report violations of the Community Participation Guidelines, please read our `How to Report`_ page.


Credits
-------

This package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.

.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage
.. _openwpm-utils: https://github.com/mozilla/openwpm-utils/blob/14edefa360c482ffcffdfeddbf09e2372d459f4c/openwpm_utils/domain.py
.. _`Mozilla Community Participation Guidelines`: https://www.mozilla.org/about/governance/policies/participation/
.. _`How to Report`: https://www.mozilla.org/about/governance/policies/participation/reporting/


=======
History
=======


0.6.0 (2020-04-06)
------------------

* Use tldextract for parsing domains (#12)
* Use numpy style docstrings
* Support case of no scheme and port in URL (#13)


0.5.0 (2020-04-03)
------------------

* Remove support for python 3.5
* Handle more cases in get_stripped_url and change default behavior:

  - handle a lack of scheme
  - boolean flag to return or not non http urls - default is to
    return them which is a change of behavior as previously they
    would not return
  - Use netloc by default instead of hostname with a boolean flag
    to use hostname.

0.4.0 (2020-03-25)
------------------

* Remove py27 support

0.3.0 (2020-03-25)
------------------

* Restore py27 support.
* Last version with py27 support.
* Remove tox


0.2.0 (2020-03-24)
------------------

* Extracted from https://github.com/mozilla/openwpm-utils/blob/master/openwpm_utils/domain.py
* Removed python 2 support and dependencies
* Removed broken get_stripped_urls function
* First release on PyPI.


