Skip to main content

Create redirect url's with click monitoring from multiple providers

Project description

ClickCounter

Latest Version PyPI - Downloads

Create redirect url's with click monitoring from multiple providers.

Features

  • Growing list of click count providers (with a common lib interface)
  • Commandline tool (CLI)
  • Simple and easy to use

Support the development ❤️

You can support the development by:

  1. Buying the maintainer a coffee
  2. Buying some Lambdarest swag

Install

Install from pypi:

$ pip install clickcounter

Usage (module)

using the default provider (shorturl.at)

import os
import time
import clickcounter

track_url = clickcounter.register_url("https://example.com")
print(track_url)
first_count = clickcounter.get_visits(track_url)
print(first_count)
clickcounter.make_visit(track_url)
time.sleep(2)
second_count = clickcounter.get_visits(track_url)
print(second_count)

# https://shorturl.at/iANR5
# 0
# 1

more examples here:

Usage (CLI)

usage: _cli.py [-h] [--provider PROVIDER] [--username USERNAME] [--password PASSWORD] [--url URL] [--trackurl TRACKURL]
               command

positional arguments:
  command              valid commands: register, get, getall

optional arguments:
  -h, --help           show this help message and exit
  --provider PROVIDER  defaults to shorturl.at
  --username USERNAME  some providers require login
  --password PASSWORD  some providers require login
  --url URL            used during register
  --trackurl TRACKURL  used during get

example:

$ clickcounter register --url https://example.com
https://shorturl.at/wABHQ

# visit the link in browser...
# and then get click count via:

$ clickcounter get --trackurl https://shorturl.at/wABHQ
1

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

clickcounter-1.0.4.tar.gz (5.3 kB view hashes)

Uploaded Source

Built Distribution

clickcounter-1.0.4-py3-none-any.whl (7.0 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