Skip to content

Commit f29ef30

Browse files
committed
Docs
1 parent 75f36cd commit f29ef30

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This package allows easy access to the Tranco list, published at [https://tranco
44

55
## Usage
66

7-
Create a `Tranco` object, indicating whether you want to cache downloaded lists:
7+
Create a `Tranco` object, indicating where you want to cache downloaded lists (caching is required):
88
```python
99
from tranco import Tranco
1010
t = Tranco(cache=True, cache_dir='.tranco')
@@ -17,6 +17,12 @@ latest_list = t.list()
1717
date_list = t.list(date='2019-02-25')
1818
```
1919

20+
The `list` method accepts the following parameters:
21+
- `date`: the date of the list you want to retrieve (in the format `YYYY-MM-DD`). If not given, the latest daily list is returned
22+
- `list_id`: the ID of the list you want to retrieve. If neither list ID nor date are given, the latest daily list is returned. If both are given, you will get an exception
23+
- `subdomains`: whether to include subdomains; only relevant when requesting a daily list. Default: False
24+
- `full`: whether to retrieve the full list (else only the top million). Default: False
25+
2026
This method returns a `TrancoList`, which allows you to retrieve a certain prefix of the list (`top`),
2127
the list ID (`list_id`), the list page (`list_page`) or the rank of a domain (`rank`):
2228
```python

0 commit comments

Comments
 (0)