Commits

Artur Barseghyan  committed 2a3ff37 Draft

better docs

  • Participants
  • Parent commits 6bfa79e

Comments (0)

Files changed (1)

File docs/index.rst

 Knows about active and inactive TLDs. If only active TLDs shall be matched against, `active_only` argument shall be
 set to True (default - False).
 
+Installation
+-------------------
+Latest stable version on PyPI:
+
+    $ pip install tld
+
+Usage example
+-------------------
+To get the top level domain name from the URL given:
+    >>> from tld import get_tld
+    >>> print get_tld("http://www.google.co.uk")
+    'google.co.uk'
+    >>> print get_tld("http://www.google.idontexist", fail_silently=True)
+    None
+
+To update/sync the tld names with the most recent version run the following from your terminal:
+    $ ./tld/update.py
+
+    or simply do:
+
+    >>> from tld.utils import update_tld_names
+    >>> update_tld_names()
+
 :mod:`utils` Module
 -------------------