Giter Site home page Giter Site logo

azure-blobs's Introduction

Uploading file from Python-Flask to Azure Blob

A simple Python flask application to upload files to Azure Blob

Steps

  1. Go to Azure management portal and create a Storage Account
  2. Find the api access key from the azure storage dashboard
  3. Copy paste the account name and api key in the python script
  4. Write a container name of your wish
  5. Run the requirements file to install the required dependencies
  6. Run the python flask app locally to get access no the upload page

Now you can select any file from your system and upload to the designated Azure Blob. Once the upload is completed, the system will return a url for future access.

Note - Larger files may take longer to upload

azure-blobs's People

Contributors

codesagar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

azure-blobs's Issues

config.py file

Can you please share the content of config.py file that I can place to run the app. Currently it gives me an error
FileNotFoundError: [Errno 2] Unable to load configuration file

upload/download to/from Azure Blob Storage via dockerized flask app directly

Having a Flask app that uploads folders from local device to Azure Blob Storage (ABS) and downloads folders from ABS to local device, while the app is dockerized, Iā€™d like to download folders from ABS directly to the host device (not the docker image). Similarly, Iā€™d like to upload folders available on the host device directly to the ABS.
Below is how currently the upload function I am using looklike:

# upload function
def post(self, local_folder_path):
	local_folder_path = local_folder_path["local_folder_path"]
	client = DirectoryClient(IMST_CREDENTIALS, IMST_CONTAINER_NAME)
	client.upload(local_folder_path, '')

Below is how currently the download function I am using looklike:

# download function
def post(self, folder_path_on_ABS):
	client = DirectoryClient(IMST_CREDENTIALS, IMST_CONTAINER_NAME)
	client.download("folder_path_on_ABS", 'downloads/')

Note that Dockerfiles and docker-compose are already developed.
Support would be highly appreciated

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    šŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. šŸ“ŠšŸ“ˆšŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ā¤ļø Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.