Skip to main content

Awesome `sys-config` is a Python cli/package created with https://github.com/TezRomacH/python-package-template

Project description

sys-config

Build status Python Version Dependencies Status

Code style: black Security: bandit Pre-commit Semantic Versions License Coverage Report

sys-config is a Python package created with william-cass-wright/cookiecutter-pypackage-slim... kinda

Summary

Usage

implementation example within media-mgmt-cli:

from .config import ConfigHandler


class AwsStorageMgmt:
    def __init__(self):
        self.s3_resour = boto3.resource("s3")
        self.s3_client = boto3.client("s3")
        self.config = ConfigHandler(project_name="media_mgmt_cli")
        if self.config.check_config_exists():
            self.configs = self.config.get_configs()
            self.bucket = self.configs.get("aws_bucket", None)
            self.object_prefix = self.configs.get("aws_bucket_path", None)
        else:
            echo("config file does not exist, run `mmgmt configure`")

    def upload_file(self, file_name, object_name=None):
        """
        ...
        """
        echo(
            f"uploading: {file_name} \nto S3 bucket: {self.configs.get('aws_bucket')}/{self.configs.get('aws_bucket_path')}/{file_name}"
        )
        ...

Future Work

  • setup sys-config

Project Examples

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

sys-config-0.1.11.tar.gz (16.2 kB view hashes)

Uploaded Source

Built Distribution

sys_config-0.1.11-py3-none-any.whl (15.4 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