Skip to content

ashwoods/cachefunk

Repository files navigation

Cachefunk: Sitemap cache warmer

PyPi page link -- version PyPi page link -- MIT licence PyPi page link -- Python versions Travis CI Status Coverage status Codacy link Code Climate

In theory, cachefunk is just a simple cache warming command line tool that can fetch a list of URLs from sitemap.xml and make a GET request on each url. In practise this is just a tool for me to play around with async python libraries.

Installation

To install the current version:

$ pip install cachefunk

Usage

$ cachefunk --url https://example.com/sitemap.xml  run

$ cachefunk --help
Usage: cachefunk [OPTIONS] COMMAND [ARGS]...

Options:
  -v, --verbosity LVL     Either CRITICAL, ERROR, WARNING, INFO or DEBUG
  --url TEXT              Sitemap.xml URL
  -c, --concurrent TEXT   Enable concurrency
  --timeout INTEGER       Request timeout
  --verify-ssl TEXT       Enable SSL verification
  --verify-response TEXT  Verify the response
  --force-https TEXT      Force https
  --replace TEXT          Replace url base
  --progress TEXT         Show progress
  --help                  Show this message and exit.

Commands:
  dryrun
  run

Features

TODO: :)

Using cachefunk from python

You can also use cachefunk from python. Docs to come, but the cachefunk.funk.Funk class is pretty straight forward.