Releases: Manav279/azure-cloudapi
azure-cloudapi v1.1.0
A fully functional API to access Azure Storage Account in Python with ease!
This API is built to perform operations in an Azure Storage Account using python. You do not need to use the azure portal or need the connection string of storage account to access it.
Operations Provided:
- Upload Blobs to Container inside Storage.
- Delete Blobs from Container inside Storage.
- Download Blobs from Container inside Storage.
- List all Blobs present inside the Container in Storage.
Changelog:
- Added ability to Enable/Disable Logging Operations
- Moved variable to change Log File Name to config.ini
- Moved variable to change Downloads Path to config.ini
Future Additions
- Config File
- User Authentication
- Blob Name increment for blobs with same names
- FastAPI Documentation
- Storing Logs in Cloud
azure-cloudapi v1.0.0
A fully functional API to access Azure Storage Account in Python with ease!
This API is built to perform operations in an Azure Storage Account using python. You do not need to use the azure portal or need the connection string of storage account to access it.
Operations Provided:
- Upload Blobs to Container inside Storage.
- Delete Blobs from Container inside Storage.
- Download Blobs from Container inside Storage.
- List all Blobs present inside the Container in Storage.
Changelog:
- Added config.ini file to configure settings
- Moved Connection String and Container variable to config.ini file
- Added ability to Enable/Disable Operations in config.ini file
Future Additions
- Config File
- User Authentication
- Blob Name increment for blobs with same names
- FastAPI Documentation
- Storing Logs in Cloud
azure-cloudapi v0.2.0
A fully functional API to access Azure Storage Account in Python with ease!
This API is built to perform operations in an Azure Storage Account using python. You do not need to use the azure portal or need the connection string of storage account to access it.
Operations Provided:
- Upload Blobs to Container inside Storage.
- Delete Blobs from Container inside Storage.
- Download Blobs from Container inside Storage.
- List all Blobs present inside the Container in Storage.
Features:
- Access Storage Account using code with ease, without repeating unnecessary steps.
- Generate Logs of all operations performed on the Storage with proper Date and Time of operation.
- API built using FastAPI
How to use API
To use the CloudAPI, follow these steps:
-
Clone this project
-
Install necessary libraries -
- FastAPI -
pip install fastapi
- Uvicorn -
pip install "uvicorn[standard]"
- Azure Exceptions -
pip install azure-core
- Azure Storage -
pip install azure-storage-blob
- FastAPI -
-
Add your Storage Account Connection String in main.py in variable
storage_conn_str
(Line 8) -
Add your Container Name in main.py in variable
container
(Line 10) -
In terminal change directory to where main.py is present, execute command
uvicorn main:app --reload
Note: If error is thrown, try command
python -m uvicorn main:app --reload
-
API is running, use URL
http://127.0.0.1:8000
to interact with API
Changing Downloads Folder
Files downloaded are by default stored in Downloads/
.
Downloads directory can be changed by changing the downloads_path
in main.py
Note: If you change the path, make sure following directory already exists to prevent errors
Changing Logs File
Operation Logs by default are stored in CloudAPILogs.txt
.
Log file name can be changed by chaning the variable log_file_name
.
You can also add log file into a directory by changeing name to [directory_name]/[log_file_name].txt
.
Note: Make sure directory already exists in system to prevent error
Command Examples
-
Uploading Blob -
http://127.0.0.1:8000/upload/C:/Users/Username/Downloads/data.csv
-
Delete Blob -
http://127.0.0.1:8000/delete/data.csv
-
Download Blob -
http://127.0.0.1:8000/download/data.csv
-
Generate List of Blobs -
http://127.0.0.1:8000/list
Future Additions
- Config File
- User Authentication
- Blob Name increment for blobs with same names
- FastAPI Documentation
- Storing Logs in Cloud