Skip to main content

A wrapper around curl to continually curl an endpoint over time

Project description

Continually test an endpoint over time, keeping track of http status codes. Similar to ping -c but with curl.

Motivation

When doing deployments or making critical infrastructure changes I like to get the quickest feedback possible on any failures. Rather than wait a minute or so for Pingdom or Pagerduty to go off, I’d like to know within a second or two if health indicators start failing. So I like to continually curl the health endpoint for any services I’m touching to make sure they continue to return 200’s, else let me know right away.

Installation

$ pip install ccurl

Usage

# GET request on www.google.com 10 times
ccurl --url www.google.com --repeat 10

# GET request on www.google.com 100 times with a 2 second sleep between requests
ccurl --url www.google.com --repeat 100 --delay 2

Publishing Updates to PyPi

For the maintainer - to publish an updated version of ssm-search, increment the version number in version.py and run the following:

docker build -f ./Dockerfile.buildenv -t ccurl:build .
docker run --rm -it --entrypoint make ccurl:build publish

At the prompts, enter the username and password to the pypi.org repo.

License

MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

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

ccurl-0.0.3.tar.gz (4.0 kB view details)

Uploaded Source

File details

Details for the file ccurl-0.0.3.tar.gz.

File metadata

  • Download URL: ccurl-0.0.3.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.0.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/2.7.15

File hashes

Hashes for ccurl-0.0.3.tar.gz
Algorithm Hash digest
SHA256 e7d98dbdc64441ea0199c32b524493f9caddcdc6615d78960620f7237f116260
MD5 de2001ee28e07a1e4eb7ede85fb45fc7
BLAKE2b-256 8dd05ba6c156b12a3d00ecf84611b24b0ea26f8bb61a090b01d8178782892909

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