Skip to main content

Common functions package for simple scripts

Project description

ravi_utils

Simple utilities for quick scripts

Install

pip install ravi_utils

Sample usage

# -*- coding: utf-8 -*-

import logging
import sys

from ravi_utils.common import CommonOps
from ravi_utils.common_logging import LogOps
from ravi_utils.common_conf import ConfOps

def main():
    """Main function"""

    LogOps.setup_logging("./log", "main", logging.DEBUG)
    CommonOps.param_check(1)
    conf = ConfOps.init_conf(sys.argv[1], [
        "some_option"
    ])

    logging.info("start one")
    logging.debug("conf value: " + conf["some_option"])

if __name__ == '__main__':
    main()

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

ravi_utils-0.1.6.tar.gz (3.2 kB view hashes)

Uploaded Source

Built Distribution

ravi_utils-0.1.6-py3-none-any.whl (5.8 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