Metadata-Version: 2.1
Name: awsservice
Version: 0.0.3
Summary: A small example package for AWS: S3, EC2, CloudWatch
Home-page: https://github.com/Vitalikys/AWS_s3_app
Author: Vitalik Kost
Author-email: vitalii.kostyreva@gmail.com
License: UNKNOWN
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/plain
License-File: LICENSE
Requires-Dist: boto3
Requires-Dist: pytz
Requires-Dist: botocore

<h2>Project description</h2>
<p><a href="https://semver.org"><img alt="version" src="https://img.shields.io/badge/python-3.10-green" /></a>
<a href="https://semver.org"><img alt="version" src="https://img.shields.io/badge/boto%5Bs3%5D-1.26.87-green" /></a>
<a href="https://semver.org"><img alt="version" src="https://img.shields.io/badge/unittest-latest-green" /></a></p>
<h2>Custom package for AWS Services</h2>
<p><a href="https://setuptools.pypa.io/en/latest/userguide/declarative_config.html">SETUPTOOLS docs</a></p>
<h2>Getting Started</h2>
<p>Assuming that you have a supported version of Python installed, you can first set up your environment with:</p>
<p><code>shell
$ python -m venv .venv
...
$ . .venv/bin/activate</code></p>
<p>Then, you can install aws-service from PyPI with:
<code>shell
$ python -m pip install aws-service</code></p>
<p>or install from S3 source with:
<a href="https://blog.knoldus.com/packaging-hosting-python-repo-to-s3/">url</a></p>
<h2>Using AWS-service</h2>
<p>After installing aws-service</p>
<p>Next, set up credentials (in e.g. ~/.aws/credentials):</p>
<ul>
<li>aws_access_key_id = YOUR_KEY</li>
<li>aws_secret_access_key = YOUR_SECRET</li>
<li>Then, set up a default region (in e.g. ~/.aws/config):</li>
<li>region=us-east-1</li>
</ul>
<p>Other credentials configuration method can be found here</p>
<p>Then, from a Python interpreter:
```shell</p>
<blockquote>
<blockquote>
<blockquote>
<p>from aws_service.ec2_service import Ec2Service
from aws_service.s3_service import S3Service
from aws_service.cloudwatch_service import CloudwatchService
my_s3 = S3Service()
my_s3.create_new_bucket(bucket_name='my_new_bucket', region='eu-west-2')
my_s3.put_file( file_name='file_1', bucket='my_new_bucket', object_name='custom-name')
```</p>
</blockquote>
</blockquote>
</blockquote>
<h2>Availible modules:</h2>
<h3>Class S3Service (module s3_service)</h3>
<p>Functionality (availible methods): 
* <a href="">create_new_bucket</a> - create new bucket 
* <a href="">put_file</a> - upload file on s3 
* <a href="">get_file</a> - download file from s3
* <a href="">check_exist</a> - check if file exists on s3</p>
<h3>Class Ec2Service (module ec2_service)</h3>
<p>Functionality (availible methods): 
* <a href="">start_instance</a> - start ec2 instance
* <a href="">stop_instance</a> - stop instance
* <a href="">reboot_instance</a> - reboot instance
* <a href="">get_one_instance_status</a> - get one instance status
* <a href="">all_instances</a> - list all my ID's instances
* <a href="">create_my_instance</a> - create_instance</p>
<h3>Class CloudwatchService (module cloudwatch_service)</h3>
<p>Functionality (availible methods): </p>
<ul>
<li><a href="">get_cpu_usage_2</a> - get cpu usage, version 2</li>
<li><a href="">get_cpu_usage</a> - get cpu usage, version 1</li>
</ul>

