Internship Report Front Page - Syed
Internship Report Front Page - Syed
Internship Report Front Page - Syed
AN INTERNSHIP REPORT
Submitted by
NOVEMBER 2023
BONAFIDE CERTIFICATE
Dr. B. DHANALAKSHMI
Assistant Professor
Department of CSE
B.S. Abdur Rahman Crescent
Institute of Science and Technology
Vandalur, Chennai – 600 048.
INTERNSHIP OFFER LETTER
INTERNSHIP EXPERIENCE CERTIFICATE
INTERNSHIP COMPLETION CERTIFICATE
VIVA VOCE EXAMINATION
INTERNAL EXAMINER
ACKNOWLEDGEMENT
I sincerely thank Dr. N. RAJA HUSSAIN, Registrar, for furnishing every essential
facility for doing my internship.
I thank Dr. SHARMILA SANKAR, Dean, School of Computer Information and
Mathematical Sciences for her motivation and support.
I thank Dr. W. AISHA BANU, Professor and Head, Department of Computer Science
and Engineering, for providing strong oversight of vision, strategic direction and
valuable suggestions.
I thank Mr. Hari Narayana Vijay Balasubramaniam (Manager) and Mr. Mahesh
Beeram Reddy (Mentor), Intellect Design Arena Ltd for their guidance and
encouragement throughout the internship period and without their guidance this
project would not have been a successful one.
I thank all the faculty members and the system staff of the Department of Computer
Science and Engineering for their valuable support and assistance at various stages
of internship completion.
8
CHAPTER 1
COMPANY OVERVIEW
Intellect embodies rich Intellectual Property and robust platforms & products across
Global Consumer Banking (Igcb), Central Banking, Risk & Treasury Management
(Irtm), Global Transaction Banking (Igtb) and Insurance (Intellect SEEC).
With over a decade of continuous and significant research and development
investment, the Intellect suite is the largest in the industry.
Igtb – The world’s first complete Global Transaction Banking Platform. It enables the
customer to seize the tremendous global transaction banking opportunity,
conservatively estimated at $509bn by 2021. The formidable third generation Igtb with
built-in omnichannel Corporate Banking Exchange powers the customer’s way to
Principal Banker position. Delivering the financial technology the customer has always
needed to leverage expertise and on-field innovation without constraints.
Igcb – The most advanced Consumer Banking Platform built on current technologies.
Seamless omnichannel banking with lifecycle assurance 9ptimizes first time cost of
ownership and technology running costs. Peerless productivity, at 70% lower post
implementation costs! The crown jewel is Intellect Quantum CBS, the specialist Core
Banking Solution for the unique requirements of central banks. Trusted by the central
banks of India, Seychelles, Ethiopia and now in Europe, the solution deploys a
formidable array of advanced technology frameworks. Running active balance sheets
for nations on real-time enterprise GLs, the solution enables a single source of truth,
and has a proven track record for the fastest and most cost efficient implementation.
1.2 Website
https://www.intellectdesign.com/
logo
Address
9
CHAPTER 2
ROLE AND RESPONSIBILITY
2.1 ROLE
I applied for the role of DevSecOps Engineer. A DevSecOps Engineer Security, and
Operations, integrates security practices into the DevOps pipeline to ensure that
security is not a separate entity but an integral part of the entire software development
and delivery process.
Automation:
Cloud Management:
Manage and optimize cloud infrastructure for scalability, reliability, and cost-efficiency.
Leverage cloud services to enhance development and deployment processes.
Define and enforce role-based access controls for DevOps tools and environments.
Ensure proper permissions for team members based on their responsibilities.
2.2 RESPONSIBILITY
10
CHAPTER 3
PROJECT OVERVIEW
The project involves creating a Python script to automate interactions with the Google
Drive API. This automation will allow users to perform various tasks such as uploading,
downloading, and managing files and folders on Google Drive programmatically.
Key Features:
Authentication:
Implement OAuth 2.0 authentication to authorize the application to access Google
Drive on behalf of the user.
Use the Google Drive API credentials to authenticate and obtain access tokens.
Folder Operations:
Create a folder on Google Drive.
Move files into and out of folders.
Metadata Retrieval:
Retrieve metadata information for files and folders, such as file size, creation date,
and last modified date.
Error Handling:
Implement robust error handling to manage potential issues, such as authentication
errors or API quota limits.
Logging:
Implement logging to capture important events and errors during the execution of the
script.
Technologies Used:
Programming Language: Python
Google APIs Client Library: google-api-python-client
Authentication Library: google-auth-oauthlib
Logging Library: logging
11
CHAPTER 4
THEORETICAL ANALYSIS
Uploading files to Google Drive using Python involves leveraging the Google Drive
API to interact with the user's Google Drive account programmatically. The process
typically begins with setting up a Google Cloud Console project, enabling the Google
Drive API, and obtaining OAuth 2.0 credentials. The Python script utilizes the google-
api-python-client library for API interactions and google-auth-oauthlib for
authentication. Once authenticated, the script constructs an HTTP request to upload
the desired file, specifying the file's metadata and content. The script then sends this
request to the Google Drive API endpoint. Successful execution results in the file being
uploaded to the user's Google Drive. Proper error handling, logging, and user-friendly
documentation are crucial components of the script to ensure robustness and ease of
use. This automation provides a convenient and efficient way to manage file uploads
to Google Drive, particularly when integrated into larger workflows or applications.
12
4.2 Uploading Excel file in Google Drive
Uploading Excel file to Google Drive using Python involves utilizing the Google Drive
API to interact with the cloud storage service and the Google Sheets API to handle
spreadsheet-related operations. The process begins with setting up a Google Cloud
Console project, enabling both the Google Drive API and Google Sheets API, and
obtaining OAuth 2.0 credentials. In the Python script, the google-api-python-client
library facilitates communication with the APIs, and google-auth-oauthlib manages
authentication. After authentication, the script creates or accesses the desired Google
Drive folder and uses the Google Sheets API to export the spreadsheet data to a
temporary file. Subsequently, it utilizes the Google Drive API to upload this file to the
specified folder on Google Drive. Error handling, logging, and clear documentation are
crucial components to ensure the script's reliability and user-friendliness. This
automation proves beneficial for systematically organizing and managing Google
Sheets within Google Drive through a streamlined and programmatic approach.
13
4.3 Uploading files from Google Sites to Google Drive
To upload files from Google Sites to Google Drive using Python, you need to utilize
the Google Drive API and, if necessary, the Google Sites API. The process involves
setting up a Google Cloud Console project, enabling the required APIs, obtaining
OAuth 2.0 credentials, and using Python to authenticate your application. Once
authenticated, you can retrieve the files from Google Sites using the Google Sites API
or another method.
To perform the actual upload, you'll use the Google Drive API. Specify the file's
metadata, such as its name and the parent folder's ID, and provide the file's content.
This typically involves creating a MediaFileUpload object with the file's path and MIME
type. The Python script sends this information to the Google Drive API endpoint,
resulting in the file being uploaded to the specified folder in Google Drive.
It's crucial to implement error handling to manage potential issues during the upload
process, such as network problems or insufficient permissions. Additionally, logging
can be implemented to capture important events and errors for later review.
This automation process simplifies the manual effort required to move files from
Google Sites to Google Drive, making it more efficient and programmatically
accessible. The script provides a structured and repeatable way to handle this file
transfer, enhancing the overall management of digital assets within a Google
Workspace environment.
Output:
Uploading Google Sheets to Google Drive using Python involves utilizing the Google
Drive API to interact with the cloud storage service and the Google Sheets API to
handle spreadsheet-related operations. The process begins with setting up a Google
Cloud Console project, enabling both the Google Drive API and Google Sheets API,
and obtaining OAuth 2.0 credentials. In the Python script, the google-api-python-client
library facilitates communication with the APIs, and google-auth-oauthlib manages
authentication. After authentication, the script creates or accesses the desired Google
Drive folder and uses the Google Sheets API to export the spreadsheet data to a
temporary file. Subsequently, it utilizes the Google Drive API to upload this file to the
14
specified folder on Google Drive. Error handling, logging, and clear documentation are
crucial components to ensure the script's reliability and user-friendliness. This
automation proves beneficial for systematically organizing and managing Google
Sheets within Google Drive through a streamlined and programmatic approach.
15
upload. The script should also handle potential errors during the upload process,
ensuring robustness and reliability. Incorporating logging mechanisms helps capture
relevant events and errors for later analysis. Comprehensive documentation should
accompany the script, explaining the setup process, authentication, and usage
instructions. Automating the upload of all files to Google Drive streamlines the
management of digital assets, making it particularly useful for backup or organizational
purposes.
Output Screenshot:
16
17
CHAPTER 6
RESULTS AND CONCLUSION
RESULTS
Hence the Google Drive API to upload various file types, including a text file, image
file, Excel file, and a Google Sheets file. Each snippet begins with authentication,
utilizing OAuth 2.0 credentials, followed by the creation of file metadata specifying the
name and parent folder in Google Drive. The Media File Upload class is then employed
to handle the actual file upload, with the script printing the unique identifier (ID)
assigned to the uploaded file. The text file and image file examples use their respective
MIME types, while the Excel file and Google Sheets file examples include MIME types
for Excel and CSV formats, respectively. These code snippets provide a foundation for
automating the upload of diverse file types to Google Drive using Python. Remember
to replace placeholders such as the credentials file path and folder IDs with your
specific values for successful execution.
CONCLUSION
In conclusion, the Python code presented showcase the versatility of the Google Drive
API for uploading different file types to Google Drive. By leveraging OAuth 2.0
credentials and the appropriate MIME types, the scripts authenticate with Google Drive
and efficiently handle the upload process for text files, image files, Excel files, and
Google Sheets files. These examples serve as practical starting points for developers
looking to integrate file uploading functionality into their applications or automation
workflows. The modularity of the provided code allows for easy adaptation and
extension to accommodate various file formats and use cases. When implementing
these scripts, it's crucial to ensure accurate MIME types, replace placeholders with
actual values, and consider error handling for a robust and reliable solution. Overall,
these Python snippets empower users to automate the uploading of diverse file types
to Google Drive, contributing to streamlined file management within the Google
Workspace ecosystem.
18
REFERENCES
https://youtu.be/3wC-SCdJK2c?si=taJB5lBn23b4AdI3
https://developers.google.com/sheets/api/quickstart/python
https://blog.finxter.com/automate-backup-to-google-drive-with-python/
https://www.projectpro.io/recipes/upload-files-to-google-drive-using-
python#mcetoc_1g02b3q8jbc
https://www.geeksforgeeks.org/how-to-automate-google-sheets-with-python/
https://thepythoncode.com/article/using-google-drive--api-in-python
19
APPENDIX
Source Code:
Python code:
import os
import os.path
SCOPES = ["https://www.googleapis.com/auth/drive"]
Creds = None
if os.path.exists("token.json"):
Creds = Credentials.from_authorized_user_file(
"token.json", SCOPES)
try:
service = build("drive", "v3", credentials=Creds)
response = service.files().list(
q="name='BackupFolder2022' and mimeType='application/vnd.google-
apps.folder'",
spaces="drive"
).execute()
if not response["files"]:
file_metadata = {
"name": "BackupFolder2022",
"mimeType": "application/vnd.google-apps.folder"
}
20
file = service.files().create(body=file_metadata,
fields="id").execute()
folder_id = file.get("id")
else:
folder_id = response["files"][0]["id"]
backup_files_dir = "backupfiles"
if os.path.isdir(backup_files_dir):
for file in os.listdir(backup_files_dir):
file_path = os.path.join(backup_files_dir, file)
if os.path.isfile(file_path):
file_metadata = {
"name": file,
"parents": [folder_id]
}
media = MediaFileUpload(file_path)
upload_file = service.files().create(body=file_metadata,
media_body=media, fields="id").execute()
except HttpError as e:
print("Error:", str(e))
Credentials.Json code:
import json
credentials = {
"client_id": "863126694652-
90gtgjf2pe3apcll2g838n9dckoqfv5l.apps.googleusercontent.com",
"project_id": "mystical-binder-390009",
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
"token_uri": "https://oauth2.googleapis.com/token",
"auth_provider_x509_cert_url":
"https://www.googleapis.com/oauth2/v1/certs",
"client_secret": "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",
"redirect_uris": ["http://localhost"]
}
try:
with open("credentials.json", "w") as file:
json.dump(credentials, file, indent=4)
21
print("Credentials saved successfully.")
except IOError as e:
print(f"An error occurred while saving credentials: {e}")
Token.py code:
import requests
else:
# Request failed
print("Token request failed:", response.status_code, response.text)
22
Google Drive to Google Sites API code:
import os
from google.oauth2 import service_account
from googleapiclient.discovery import build
# Set up credentials
credentials_path = 'credentials service account.json'
SCOPES = ['https://www.googleapis.com/auth/drive',
'https://www.googleapis.com/auth/sites']
credentials =
service_account.Credentials.from_service_account_file(credentials_path,
scopes=SCOPES)
23
os.remove(file_path)
SCOPES = ["https://www.googleapis.com/auth/spreadsheets"]
SPREADSHEET_ID = "1FUGfQEXHKPvBmIxSpQ81wQG9FQVf2HGwF-pbz-zLz2g"
def main():
credentials = None
if os.path.exists("token.json"):
credentials = Credentials.from_authorized_user_file("token.json",
SCOPES)
while True:
try:
service = build("sheets", "v4", credentials=credentials)
sheets = service.spreadsheets()
24
sheets.values().update(
spreadsheetId=SPREADSHEET_ID,
range=f"Sheet1!C{row}",
valueInputOption="USER_ENTERED",
body={"values": [[f"{calculation_result}"]]}
).execute()
sheets.values().update(
spreadsheetId=SPREADSHEET_ID,
range=f"Sheet1!D{row}",
valueInputOption="USER_ENTERED",
body={"values": [["Done"]]}
).execute()
if __name__ == "__main__":
main()
# Retrieve a list of files to upload (change the directory path as per your
requirement)
directory = 'C:/Users/syed'
25
# Upload each file
for file_name in files:
file_path = os.path.join(directory, file_name)
26
Technical Bibliography:
Hello! I'm Syed Abdul Khader, Pursuing B.Tech Computer
Science and Engineering at B S Abdur Rahman Crescent
Institute of Science and Technology, Chennai. With a passion
for DevSecOps, I have dedicated my time to Automation of
CM Dashboard using Google Drive API. My professional
journey has included experiences in Intellect Design Arena
Ltd, where I demonstrated a commitment to finish the work by
doing an automation. Outside of work or academics, you
might find me playing Badminton and listening to music, as I
believe in maintaining a balance between professional growth
and personal well-being. I am excited about my placement or
studying further for Post Graduate, and I look forward to
exploring opportunities that allow me to contribute to this IT
World.
27