Skip to main content

Upload manager

Project description

bbuploadmanager

    **bbuploadmanager** is an easy python library which manages all uploading, downloading, state management functionality and multiple scenarios of our Uploads & Processing of you project. 
    
    ## Features
    - Uploading file to AWS S3
    - Reading uploaded file content from AWS S3
    - Upload Processing state management
    - Upload Manager Dashboard 
    - Upload tracking
    
    ## Installation
    ```
    pip install https://github.com/Bigbasket/bbuploadmanager
    ```
    OR 
    ```
    pip install upload-manager
    ```
    ### Prerequisite
    
    - Python 3 and above 
    - Django 2.1 and above
    
    #### Environment
    AWS_STORAGE_BUCKET_NAME
    - variable need to be set in environment to specify aws bucket.
    
    AWS_ACCESS_KEY_ID & 
    AWS_SECRET_ACCESS_KEY
    - variable need to be set in environment, Only if I Am Role is not enabled on the machine.
    
    ## Sample Code
    
    ```
    # Library Plugin code to be added in settings.py
    INSTALLED_APPS = ["upload_manager.apps.UploadManagerConfig"]
    
    # Below code to be implementation in your application.py\
    # imports
    from upload_manager.service import UploadManagerService
    
    # file upload example
    upload_service = UploadManagerService(<upload_name>, <username>, <S3_bucket_path>, files=[<file_obj>,])
    upload_obj = upload_service.start_upload()
    
    # reading uploaded file data in async thread
    file_data = UploadManagerService.get_upload_content_for_id(upload_obj.id)
    
    # writing response file example
    upload_service.file_content = [("OrderId", "Status", "Message"),(11020304, "Success", "")]
    upload_service.update_response_for_upload(upload_obj_id)
    
    # updating upload status example
    UploadManagerService.change_upload_status_to_inprocess(upload_obj.id)
    UploadManagerService.change_upload_status_to_complete(upload_obj.id)
    UploadManagerService.change_upload_status_to_failed(upload_obj.id)`
    ```
    
    ## Dashboard View
    
    ![](images/dashboard.png)
    
    Above image shows dashboard view, how the uploads can be viewed and tracked in django Admin.
    
    - Request File - Column contains a hyperlink to the uploaded file which was uploaded as part of start upload
    - Response File - Column contains a hyperlink to the uploaded response file was uploaded after the processing.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

upload_manager-1.2.0.tar.gz (146.7 kB view details)

Uploaded Source

File details

Details for the file upload_manager-1.2.0.tar.gz.

File metadata

  • Download URL: upload_manager-1.2.0.tar.gz
  • Upload date:
  • Size: 146.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.17

File hashes

Hashes for upload_manager-1.2.0.tar.gz
Algorithm Hash digest
SHA256 14b32c1f806f94ebd05e3ca218e25260d1ccec636d1d1257698ecdd796b30a0c
MD5 8f45db250137dc1c0867ba75a3199b32
BLAKE2b-256 c3c6f4f8670c9608d9327f65ee927b3b16242c8cfdbd24f4c02ce8e1cfde76b0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page