Skip to main content

A python module that will calculate the sla time based on working hours and holidays.

Project description

SLA Calculator

Installation

pip install sla-calculator

Usage

To use this calculator, you must provide a starting time, the open time for business, the closing time for business, the country whose holidays you observe, and the sla time in hours. The function will then take into account all holidays and weekends as none working hours, and return a pendulum object of the time the sla needs to be met by. The following example will provide you with an SLA time 4 working hours from 12/10/2019 1:02:03 UTC

from sla_calculator import SLA_Calculator

sla_calc = SLA_Calculator()

sla_time = sla_calc.calculate(start_time="2019-12-10T01:02:03Z",
                              open_hour=9,
                              close_hour=17,
                              country_name="US",
                              sla_in_hours=4)
print(sla_time.to_iso8601_format())

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

sla-calculator-0.1.2.tar.gz (2.2 kB view details)

Uploaded Source

Built Distribution

sla_calculator-0.1.2-py2.py3-none-any.whl (2.3 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file sla-calculator-0.1.2.tar.gz.

File metadata

  • Download URL: sla-calculator-0.1.2.tar.gz
  • Upload date:
  • Size: 2.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/0.12.17 CPython/2.7.15 Windows/10

File hashes

Hashes for sla-calculator-0.1.2.tar.gz
Algorithm Hash digest
SHA256 f323cbf1f4df24ff4a74f169d8076fecdcf6ee5ddaac4f5d41b5efdc72d28e28
MD5 f0f59b251344b84ef62331c4951c793e
BLAKE2b-256 46c5c3e31d8c0d0dbd2c9c4851cf72fc67f1d5250ebd15bb84b5f45ef63304b0

See more details on using hashes here.

File details

Details for the file sla_calculator-0.1.2-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for sla_calculator-0.1.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 286dde5a116e5e5e6d9b37ae9a32851225c7d742ab9c2d90ce918147e0eb7fd7
MD5 2e3774e6759f8bf279c4f30eafeaf725
BLAKE2b-256 6ff2730544ad0f279d799b53d98db358965b6a9686cb8819e61c87e3b717fd6a

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