Skip to main content

Django Minio Connector

Django storage backend to use Minio Server as file storage. It is wrapper over "minio" library.

Installation

At first, you need to have working minio server. How to do that you can found at Minio Quickstart Guide.

Install Django Minio Storage from pip:

pip install django-minio-connector

Add configuration of Minio storage to your projects settings file:

from django_minio_connector import MinIOStorage

STORAGES = {
    "staticfiles": {
        "BACKEND": MinIOStorage,
        "OPTIONS": {
            "MINIO_ENDPOINT": 'your_minio_server_address',
            "MINIO_ROOT_USER": "your_minio_server_access_key",
            "MINIO_ROOT_PASSWORD": "your_minio_server_secret_key",
            'MINIO_USE_HTTPS': False,
            'MINIO_BUCKET_NAME': 'static-bucket-name',
            'MINIO_BUCKET_POLICY': {
                "Version": "2012-10-17",
                "Statement": [
                    {
                        "Effect": "Allow",
                        "Principal": {"AWS": "*"},
                        "Action": [
                            "s3:GetBucketLocation",
                            "s3:ListBucket"
                        ],
                        "Resource": f"arn:aws:s3:::static"
                    },
                    {
                        "Effect": "Allow",
                        "Principal": {"AWS": "*"},
                        "Action": "s3:GetObject",
                        "Resource": f"arn:aws:s3:::static/*"
                    }
                ]
            },
            'MINIO_PRESIGNED_URL': False,
        },
    },
    'default': {
        'BACKEND': MinIOStorage,
        "OPTIONS": {
            "MINIO_ENDPOINT": 'your_minio_server_address',
            "MINIO_ROOT_USER": "your_minio_server_access_key",
            "MINIO_ROOT_PASSWORD": "your_minio_server_secret_key",
            'MINIO_USE_HTTPS': False,
            'MINIO_BUCKET_NAME': 'media-bucket-name',
        },

    }
}

For using MinIO server in development stage could install it by Docker MinIO Quickstart Guide

Demo MinIO server and it's credentials can be found at MinIO console.

MinIO library documentation Python Client API Reference

More information about file storages can be found at Django Docs.

Description of STORAGE settings Settings

Currently tested only at Django 5.1. Does not work on earlier versions because the DEFAULT_FILE_STORAGE and STATICFILES_STORAGE settings is removed.

Metadata

Release files for django-minio-connector 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-minio-connector 0.0.2
File Size Uploaded Provenance
django_minio_connector-0.0.2.tar.gz 6.3 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for django-minio-connector 0.0.2
File Interpreter ABI Platform
django_minio_connector-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 13.1 kB

Release files / django_minio_connector-0.0.2.tar.gz

Download URL django_minio_connector-0.0.2.tar.gz
Size 6.3 kB
Tags Source
SHA-256 checksum
How to use checksums
9d6bb59a95838e5d50c9bf622f2b30a3ce5413ae4d4109a8bf43dbc3eebbb4e7
BLAKE2b-256 checksum
How to use checksums
b83397397de77356e77ee2982af18a77e47191039ad0f00f6d4e5393c7d4a522
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.4

Release files / django_minio_connector-0.0.2-py3-none-any.whl

Download URL django_minio_connector-0.0.2-py3-none-any.whl
Size 6.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8962deb7b30c2272ce830a476cdc627fe5ff56e6d446a65942f617d22b65cde8
BLAKE2b-256 checksum
How to use checksums
1d82676b859a3b9d6464b9aba168bf2fd69a60649df3233a4e939b85e54550de
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.4

Security for django-minio-connector 0.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page