Git Product home page Git Product logo

py-tlds's Introduction

Build Status Coverage Status

py-tlds v1.0.0

py-tlds is a util that retrieves and validates a list of top-level domains (TLDs) from the Internet Assigned Names Authority.

Dependencies

py-tlds requires Python 3.x and the pip package. It also requires the following packages for usage and testing.

Usage:

  • click
  • requests

Testing:

  • coveralls
  • flake8
  • pytest
  • pytest-cov
  • radon
  • responses

Installing py-tlds with test cases and testing dependencies

  1. Clone or download this repository.

  2. Using sudo, run pip with the install command and the --editable option.

sudo pip install --editable .[test]

Installing py-tlds without test cases or testing dependencies

  1. Clone or download this repository.

  2. Using sudo, run pip with the install command.

sudo pip install .

Using py-tlds from the command line

To retrieve and validate a list of TLDs, simply run tlds.

tlds

To write the results to disk, run tlds with either the --write or the -w option.

tlds --write
tld -w

Using py-tlds from within Python

  1. Import TopLevelDomainGetter and write_results.
  2. Instantiate TopLevelDomainGetter and call its get method.
  3. Call the write_results function.
from tlds import (
  TopLevelDomainGetter,
  write_results
)

tld_getter = TopLevelDomainGetter()
tlds = tld_getter.get()
write_results(tlds)

Testing py-tlds after installation

  1. Run radon with the mi command and the --show option.
radon mi --show tlds
  1. Run flake8 with the --count option.
flake8 --count tlds
  1. Run pytest with with -vv, --cov, and cov-report options.
pytest -vv --cov --cov-report=term-missing

py-tlds's People

Contributors

critical-path avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.