Skip to main content

Tool for monitoring changes in RESTful APIs quickly and easily

Project description

apico 🎈

The easy way to monitor changes in RESTful APIs.

Installation

$ pip install apico

Example usage

from apico import Monitor, Response


monitor = Monitor(url='https://api.github.com/users/itsmewulf', rate=10.0, headers={'Authorization': 'GITHUB_TOKEN'})

@monitor.listener()
def on_change(old, new):
    print('Something changed!')

@monitor.listener('no_change')
def nothing_changed():
    print('Nothing changed!')

@monitor.listener()
def on_request():
    print('This is called before every request.')

Some reference

Below you'll find some insight that might not be instantly apparent.

Events

The events supported by the Monitor.listener decorator are:

  • change
  • request
  • no_change

As you can see in the example, listeners can be registered by passing the event name straight to the decorator (monitor.listener('change')) or inferred from the function name starting with on_:

@monitor.listener()
def on_change(...):

Returns

The responses returned by apico are actually instances of requests.Response


Reporting Issues

If you find any error/bug/mistake with the package or in the code feel free to create an issue and report it here.

Fix/Edit Content

If you wish to contribute to this package, fork the repository, make your changes and then simply create a Pull Request!

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

apico-1.0.0.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

apico-1.0.0-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file apico-1.0.0.tar.gz.

File metadata

  • Download URL: apico-1.0.0.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.1

File hashes

Hashes for apico-1.0.0.tar.gz
Algorithm Hash digest
SHA256 02fe04974913b888578d07babe94b007931f95744c953a35ef305f8f055029c0
MD5 04bd79a7c2ee75c16c347946e82fb9e3
BLAKE2b-256 03cb91509ac8922718c620906c9bd83321830d0d3a059f43bb83df35b34c988e

See more details on using hashes here.

File details

Details for the file apico-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: apico-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 6.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.1

File hashes

Hashes for apico-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a09766480d97713c7b36908389ec0c363efe09401107afca081c5dcfe5262857
MD5 a560d4a2e93aa387b52fbebeb36f5a32
BLAKE2b-256 19aa3eb2c3844d4e63c9bd9e4fa1ae35f03b5d124dd2fb76388065c202e60d6a

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