Skip to main content

Tranco: A Research-Oriented Top Sites Ranking Hardened Against Manipulation

Project description

Tranco

This package allows easy access to the Tranco list, published at https://tranco-list.eu.

Usage

Create a Tranco object, indicating whether you want to cache downloaded lists:

from tranco import Tranco
t = Tranco(cache=True, cache_dir='.tranco')

You can then retrieve lists from this object using the list method:

latest_list = t.list()
date_list = t.list(date='2019-02-25')

This method returns a TrancoList, which allows you to retrieve a certain prefix of the list (top), the list ID (list_id), the list page (list_page) or the rank of a domain (rank):

latest_list.top(10000)
latest_list.list_id
latest_list.list_page
latest_list.rank("google.com")
latest_list.rank("not.in.ranking") # returns -1

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tranco-0.2.tar.gz (2.5 kB view hashes)

Uploaded Source

Built Distribution

tranco-0.2-py3-none-any.whl (3.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page