Giter VIP home page Giter VIP logo

blockchain_storage_analytics's Introduction

Django Storage API Comparison

This Django project is an API implementation for comparing the performance analytics of public cloud storage and IPFS using various parameters. The project is created for a blockchain class to explore the differences in performance between centralized cloud storage providers and decentralized IPFS storage.

Contributors

A special thanks to the following people who have contributed to this project:

Feel free to add your name to the list if you have contributed to the project. To do so, edit this file and submit a pull request.

Features

  • Upload files to Azure Blob Storage or IPFS using Pinata
  • Download files from Azure Blob Storage or IPFS
  • Delete files from Azure Blob Storage or IPFS
  • Compare performance analytics for public cloud storage and IPFS

Getting Started

Follow the steps below to set up the project on your local machine.

Prerequisites

  • Python 3.6 or higher
  • pip
  • virtualenv

Installation

  1. Clone the repository:
git clone https://github.com/srikar58/Blockchain_storage_analytics.git
cd django-storage-api-comparison
  1. Create a virtual environment and activate it:
python -m venv .venv
source venv/bin/activate  # On Windows, use `venv\Scripts\activate`

3.Install the required packages:

pip install -r requirements.txt

4.Create a .env file in the root directory of your Django project and add your Azure Blob Storage and Pinata API keys:

AZURE_STORAGE_CONNECTION_STRING=your-azure-storage-connection-string
PINATA_API_KEY=your-pinata-api-key
PINATA_SECRET_API_KEY=your-pinata-secret-api-key

Replace the placeholders with your actual Azure and Pinata credentials.

5.Start the development server:

python manage.py runserver

Now, you can access the API endpoints at http://localhost:8000/api/.

API Endpoints

Upload

  • URL: /api/upload/
  • Method: POST
  • Form Data:
    • file: The file to be uploaded.
    • storage_type: The storage type where the file will be uploaded, either azure or ipfs.

Download

  • URL: /api/download/
  • Method: POST
  • Form Data:
    • file_identifier: The name of the file(hash key or name) to be downloaded.
    • storage_type: The storage type from where the file will be downloaded, either azure or ipfs.

Delete

  • URL: /api/delete/
  • Method: POST
  • Form Data:
    • file_identifier: The identifier of the file(hash key or name) to be deleted.
    • storage_type: The storage type where the file will be deleted or unpinned, either azure or ipfs.

blockchain_storage_analytics's People

Contributors

srikar58 avatar

Watchers

 avatar

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.