Awesome `sys-config` is a Python cli/package created with https://github.com/TezRomacH/python-package-template
Project description
sys-config
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)
Built Distribution
Close
Hashes for sys_config-0.1.11-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3a5f7fdf35871c021fc9a5516a330d47fbf0683493f4ca8b24b63be3b573752e |
|
MD5 | 9e05bbac84fb6988515baa37aad5dcf0 |
|
BLAKE2b-256 | 02d7e2155d637391664b03e7ceaa0792aa1fdf496ddad123c6bf829b0f7963f6 |