Skip to main content

No project description provided

Project description

GoatPie

Build

"GoatCounter" analytics for the CLI, written in Python - get it?

Screenshot

Note: This project is a work in progress and subject to breaking changes on a daily basis!

Installation

It's available from PyPi using pip:

pip install goatpie

Getting started

Using this library is straightforward.

Commandline

Pretty much self-explanatory - otherwise, --help is your friend:

$ goatpie --help
Usage: goatpie [OPTIONS] URL

  Provides 'Goatcounter' statistics for URL

Options:
  -u, --update         Initiates update of local database
  -l, --limit INTEGER  Shows visits & pageviews in the last XY days
  --version            Show the version and exit.
  --help               Show this message and exit.

Package

The underlying module may also be used directly:

from goatpie import GoatPie

# Initialize it
obj = GoatPie(url, token)

# Update database
# (1) Last update not before one hour (in seconds)
obj.update(3600)

# (2) Force database update
obj.update(0)

# Get pageviews (last seven days)
print(obj.get_pageviews(7))

          Day  Pageviews
0  2022-08-28          1
1  2022-08-27         13
2  2022-08-26         20
3  2022-08-25         35
4  2022-08-24         84
5  2022-08-23         64
6  2022-08-22         23

Roadmap

  • Add tests
  • Add more tests
  • Add logger
  • Config file
  • Explain configuration

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

goatpie-0.2.0.tar.gz (22.5 kB view hashes)

Uploaded Source

Built Distribution

goatpie-0.2.0-py3-none-any.whl (23.5 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