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


Release history Release notifications

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for ravi-utils, version 0.1.6
Filename, size File type Python version Upload date Hashes
Filename, size ravi_utils-0.1.6-py3-none-any.whl (5.8 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size ravi_utils-0.1.6.tar.gz (3.2 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page