Git Product home page Git Product logo

django-backblazeb2-storage's Introduction

BACKBLAZE B2 Storage for Django

BackBlaze B2 Storage for django.

###installation via PIP:

pip install django-backblazeb2-storage

Manual:

clone this repo locally using git clone [email protected]:royendgel/django-backblazeb2-storage.git and run python setup.py install

###Usage

Set this in ypour settings (usualy settings.py)

BACKBLAZEB2_ACCOUNT_ID = 'your-account-id'
BACKBLAZEB2_APP_KEY = 'your-app-key'
BACKBLAZEB2_BUCKET_NAME = 'bucketname'

To make it your default django storage :

DEFAULT_FILE_STORAGE = 'b2_storage.B2Storage'

if you are making alot of api calls I recommend you to use the b2_storage.authorise, it stores the seconds in your database and reuses the authorisation_token for other calls. for this you need to include 'b2_storage.authorise', in your INSTALLED_APPS

Storage Implimentation :

  • save

    Save the file (overwrite if it already exists)

  • open

    Open a file using the filename (the latest version of the file).

  • delete

    Deletes the file (all versions of the file)

some notes :

Everytime you overwrite a file in backblaze b2 it will create a new file version. When you download the file the latest version will be downloaded. this is the same behavior as s3 but it is enabled be default.

django-backblazeb2-storage's People

Contributors

royendgel avatar akeemmclennon avatar metakermit avatar jshridha avatar ogurtsov avatar

Watchers

James Cloos 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.