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 details)

Uploaded Source

Built Distribution

goatpie-0.2.0-py3-none-any.whl (23.5 kB view details)

Uploaded Python 3

File details

Details for the file goatpie-0.2.0.tar.gz.

File metadata

  • Download URL: goatpie-0.2.0.tar.gz
  • Upload date:
  • Size: 22.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 colorama/0.4.4 importlib-metadata/4.6.4 keyring/23.5.0 pkginfo/1.8.2 readme-renderer/34.0 requests-toolbelt/0.9.1 requests/2.25.1 rfc3986/1.5.0 tqdm/4.57.0 urllib3/1.26.5 CPython/3.10.4

File hashes

Hashes for goatpie-0.2.0.tar.gz
Algorithm Hash digest
SHA256 ffaa99bbcfbbf11d56d8ddc2e98d02230c598e7c85b69d0425eacfe2ee57e83d
MD5 be7b11bec50fcf43db13a58f054ba15a
BLAKE2b-256 ab04aae18c849be6c6e7e8ceaab9428cd2b88cbfa6f5602b4c11cf5e17d63657

See more details on using hashes here.

File details

Details for the file goatpie-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: goatpie-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 23.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 colorama/0.4.4 importlib-metadata/4.6.4 keyring/23.5.0 pkginfo/1.8.2 readme-renderer/34.0 requests-toolbelt/0.9.1 requests/2.25.1 rfc3986/1.5.0 tqdm/4.57.0 urllib3/1.26.5 CPython/3.10.4

File hashes

Hashes for goatpie-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 59683c60762b8ac59cc2128420991624e81a61f748ab995dde95a1718fbf5262
MD5 fa729131f654cba003a133cf6f647982
BLAKE2b-256 7e7ea4f13ad7840ac840d561df3bbf3a3bd36fd9c2d4dcf8260eab8f097eff53

See more details on using hashes here.

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