commons-metrics 0.0.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,9 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Paras Arora
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
+
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,9 @@
1
+ Metadata-Version: 2.1
2
+ Name: commons_metrics
3
+ Version: 0.0.1
4
+ Summary: A simple library for basic statistical calculations
5
+ Author: Bancolombia
6
+ Author-email: omar.david.pino@email.com
7
+ License: MIT
8
+ Requires-Python: >=3.7
9
+ License-File: LICENSE
@@ -0,0 +1,27 @@
1
+ # Simple Stats
2
+
3
+ A simple Python library for basic statistical calculations.
4
+
5
+ ## Features
6
+
7
+ - Calculate mean
8
+ - Calculate median
9
+ - Calculate mode
10
+ - Calculate standard deviation
11
+
12
+ ## Installation
13
+
14
+ You can install the library using pip:
15
+
16
+ ```bash
17
+ pip install .
18
+
19
+ ## Usage
20
+ from common_stats import mean, median, mode, standard_deviation
21
+
22
+ data = [1, 2, 3, 4, 5]
23
+
24
+ print("Mean:", mean(data))
25
+ print("Median:", median(data))
26
+ print("Mode:", mode(data))
27
+ print("Standard Deviation:", standard_deviation(data))
@@ -0,0 +1,4 @@
1
+ from .util import Util
2
+
3
+ __all__ = ['Util']
4
+ __version__ = '0.1.0'
@@ -0,0 +1,37 @@
1
+ import boto3
2
+ import json
3
+ class Util:
4
+ @staticmethod
5
+ def get_secret_aws(env: str, logger):
6
+ secret_name = f"nu0051005-measurement-systems-{env}-mesysqcd-secretrds-cnx1"
7
+ region_name = "us-east-1"
8
+
9
+ try:
10
+ session = boto3.session.Session()
11
+ client = session.client(
12
+ service_name='secretsmanager',
13
+ region_name=region_name
14
+ )
15
+
16
+ get_secret_value_response = client.get_secret_value(SecretId=secret_name)
17
+ secret_string = get_secret_value_response['SecretString']
18
+ secret_json = json.loads(secret_string)
19
+
20
+ required_keys = ["password", "host", "port", "username", "dbname"]
21
+ missing_keys = [key for key in required_keys if key not in secret_json]
22
+
23
+ if missing_keys:
24
+ msg = f"Missing required keys in AWS secret: {missing_keys}"
25
+ logger.error(msg)
26
+ raise KeyError(msg)
27
+
28
+ return secret_json
29
+
30
+ except Exception as e:
31
+ msg = f"Error getting the secret '{secret_name}': {str(e)}"
32
+ logger.error(msg)
33
+ raise Exception(msg)
34
+
35
+ @staticmethod
36
+ def show(env: str, logger):
37
+ print("Hola mundo")
@@ -0,0 +1,9 @@
1
+ Metadata-Version: 2.1
2
+ Name: commons-metrics
3
+ Version: 0.0.1
4
+ Summary: A simple library for basic statistical calculations
5
+ Author: Bancolombia
6
+ Author-email: omar.david.pino@email.com
7
+ License: MIT
8
+ Requires-Python: >=3.7
9
+ License-File: LICENSE
@@ -0,0 +1,10 @@
1
+ LICENSE
2
+ README.md
3
+ setup.py
4
+ commons_metrics/__init__.py
5
+ commons_metrics/util.py
6
+ commons_metrics.egg-info/PKG-INFO
7
+ commons_metrics.egg-info/SOURCES.txt
8
+ commons_metrics.egg-info/dependency_links.txt
9
+ commons_metrics.egg-info/requires.txt
10
+ commons_metrics.egg-info/top_level.txt
@@ -0,0 +1 @@
1
+ commons_metrics
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,17 @@
1
+ from setuptools import setup, find_packages
2
+
3
+ setup(
4
+ name='commons_metrics',
5
+ version='0.0.1',
6
+ description='A simple library for basic statistical calculations',
7
+ #long_description=open('USAGE.md').read(),
8
+ #long_description_content_type='text/markdown',
9
+ author='Bancolombia',
10
+ author_email='omar.david.pino@email.com',
11
+ packages=find_packages(),
12
+ install_requires=[
13
+ "pytest"
14
+ ],
15
+ license='MIT',
16
+ python_requires='>=3.7',
17
+ )