A simple demo Python library
Project description
SmartCloudManager SmartCloudManager is a high-level Python library designed to simplify and encapsulate complex AWS service interactions. Developed as part of a Master’s level Cloud Platform Programming project at the National College of Ireland, this library provides a streamlined interface for Amazon Textract, DynamoDB, S3, and SES.
By abstracting low-level Boto3 API calls into a clean, object-oriented structure, SmartCloudManager allows developers to implement robust cloud-native functionalities with minimal boilerplate code.
Key Features The library utilizes Advanced Programming Constructs to ensure efficiency and reliability:
Context Manager Support: Implements enter and exit for safe resource handling and clean session management.
Lazy Loading Pattern: AWS clients (Textract, DynamoDB, S3) are only initialized when first accessed, reducing memory overhead and improving startup performance.
Automated Telemetry: Built-in methods for real-time stock updates in Amazon DynamoDB using optimized UpdateExpressions.
AI-Driven Extraction: Simplified interface for Amazon Textract form analysis to convert document images into structured Python dictionaries.
Installation You can install the library directly from PyPI using pip:
Bash pip install smart-cloud-manager Requirements The library requires boto3. Before execution, ensure you have your AWS credentials configured in your environment or via the AWS CLI:
AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY
AWS_SESSION_TOKEN (if using temporary credentials)
AWS_DEFAULT_REGION (Defaults to us-east-1)
Implementation Guide
- Basic Usage with Context Manager The recommended way to use the library is with a with statement. This ensures that resources are handled correctly according to Pythonic best practices.
Python from smart_cloud_manager import SmartCloudManager
Initialize the manager within a context
with SmartCloudManager(region_name="us-east-1") as cloud: print("Cloud Manager session initialized successfully.") # Perform operations here 2. Document Analysis (Amazon Textract) The library abstracts the complex JSON response from Textract into a more manageable format for inventory applications.
Python with SmartCloudManager() as cloud: # Analyzes an invoice or document stored in S3 extracted_data = cloud.extract_inventory_data( bucket_name="your-s3-bucket-name", document_name="invoice_sample.jpg" ) print(f"Extracted Results: {extracted_data}") 3. Real-Time Inventory Telemetry (Amazon DynamoDB) Update stock levels or sensor data directly without writing raw Boto3 dictionary structures.
Python with SmartCloudManager() as cloud: success = cloud.update_stock_telemetry( table_name="InventoryLog", item_id="PROD-102", quantity=15 ) if success: print("Telemetry successfully updated in DynamoDB.") Technical Architecture This library is designed to fulfill the LO3 (formulate and produce new code libraries) and LO4 (apply advanced programming constructs) requirements of the MSCCLOUD curriculum.
By separating service-specific logic from the main Django application views, the architecture promotes high cohesion and low coupling. The use of a private helper method _parse_textract_response demonstrates proper encapsulation and internal data transformation logic.
License Distributed under the MIT License. See LICENSE for more information.
Authors Developed for the National College of Ireland (NCI) - Cloud Platform Programming Module.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file smartshelf_project-1.1.0.tar.gz.
File metadata
- Download URL: smartshelf_project-1.1.0.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6b08681701daf36fc3b320a0e637aece9c689e3767dadb293f0b4ebf19f667d5
|
|
| MD5 |
3eca41b4c8ae61697616ece78d0e9a58
|
|
| BLAKE2b-256 |
716d612e58501b8b389b0edb9cc07429f5b98b1564972f37a3f86b32cc98bf3d
|
File details
Details for the file smartshelf_project-1.1.0-py3-none-any.whl.
File metadata
- Download URL: smartshelf_project-1.1.0-py3-none-any.whl
- Upload date:
- Size: 3.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a757d1c660b9a4417301203ab2f955b923167b86a5b27287549a3fa72b528f76
|
|
| MD5 |
42dccd68a2da2edf388c330484f14626
|
|
| BLAKE2b-256 |
b4ad5e469ef8c513fe2cb4f211d9e4a5f3773e0b802063109cbfc6340106bbc7
|