3e342d0e36
Fix #12 - separate reading file from parsing |
||
---|---|---|
.circleci | ||
tests | ||
trexa | ||
.gitignore | ||
CHANGELOG.md | ||
CODE_OF_CONDUCT.md | ||
LICENSE.txt | ||
README.md | ||
build_list.py | ||
requirements.txt |
README.md
Trexa Service
This project aims to provide a weekly Trexa 100k list, which is created from the Tranco and Alexa lists. In theory it could be larger, so file an issue if that's useful to someone.
Running locally
- clone the repo
- run
cd trexa-service
- run
python3 -m venv env
- run
source env/bin/activate
- run
pip3 install -r requirements.txt
And then go to the next section to run tests or start the service.
Running the tests
FLASK_ENV=development pytest
Starting the service
From the project root:
Production mode:
FLASK_APP=trexa flask run --host=0.0.0.0
or
Development mode:
FLASK_ENV=development FLASK_APP=trexa flask run
Environment variables
The following environment variables can be defined to override defaults:
ZIP_DOWNLOADS_DEST
CSV_DOWNLOADS_DEST
FINAL_LIST_DEST
HTTP Endpoints
This app exposes the following HTTP endpoints
/lists
: see all lists available for download/lists/trexa-2020-05-21.csv
: download a full, single list (150,000+ sites)/api/lists/2020-05-21?count=N
: download a single list, trimmed to N sites
License
This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/
Code of Conduct
This project and repository is governed by Mozilla's code of conduct and etiquette guidelines. For more details please see the Code of Conduct file.