Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

CircleCI

Statsify REST API

See also: Statsify Website and Statsify Chrome Extension

Statsify is a web application that allows you to view beautiful statistics and info about the web pages and websites you visit, with insights such as the following:

• Ratio of internal vs. outbound links
• Most frequent words
• Key phrases
• Total word count
• Most frequent pages
• And more...

Statsify is available in three formats: a website, a chrome extension, and a public API.

Installation

To install the Statsify API locally, type the following into your command line:

git clone https://github.com/alankbi/statsify-api.git   
cd statsify-api
# Recommended to create a virtual environment first
pip install -r requirements.txt

A list of the requirements can be found here.

Running Locally

To run the Statsify API on Flask's development server, you can use the following:

python api.py

To run using gunicorn:

gunicorn api:app

With multiple workers:

gunicorn api:app --workers 2

Once your local server is running, you can now access the API at localhost:PORT. For details about the API endpoints, see here.

Example call: localhost:8000/page?url=alanbi.com

Usage Tracking Configuration

Your API usage statistics can be seen at /dashboard/overview. To configure the admin password or the path to your database (such as if you wanted to use PostgreSQL instead of the default SQLite), you can set the STATSIFY_DASHBOARD_PASSWORD and STATSIFY_DB_URL environment variables to your machine; when run, the api.py file creates the config.cfg file from these values in order to keep them hidden from commit history. For more details about the dashboard, see here.

Contributing

Feel free to submit an issue or pull request if you find a bug or would like to add a feature. If you're adding large amounts of code, please be sure to include unit tests as well.

Contact

Please reach out to me at alan.bi326@gmail.com if you have any questions or feedback!

About

REST API that returns information about web pages and websites

Resources

License

Releases

No releases published

Packages

No packages published

Languages