Project description
What is Minio-Driver?
It's an extra storage driver support for Minio in masonite 4.
Setup
Install package using pip:
pip install minio-driver
Add provider inside config/providers.py.
from minio_driver.MinioProvider import MinioProvider
PROVIDERS = [
...,
# Application Providers
MinioProvider,
]
Storage Config
Add following configuration inside config/filesystem.py after "s3": {...},
"minio": {
"driver": "minio",
"client": env("MINIO_CLIENT"),
"secret": env("MINIO_SECRET"),
"bucket": env("MINIO_BUCKET"),
"path": env("MINIO_ENDPOINT"),
},
Add following keys in .env.
MINIO_CLIENT=
MINIO_SECRET=
MINIO_BUCKET=
MINIO_ENDPOINT=
Update the storage driver value to minio in .env
STORAGE_DRIVER=minio
Example
from masonite.controllers import Controller
from masonite.filesystem import Storage
from masonite.request import Request
class YourController(Controller):
def your_function(self, request: Request, storage: Storage):
file = request.input('file')
# storing file
path = storage.disk("minio").put_file('your_file_directory', file)
# getting file_url from storage
file_url = storage.disk("minio").get_secure_url(path)
return file_url
Enjoy ;)
Metadata
Release files for minio-driver 0.1.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| minio_driver-0.1.6.tar.gz | 4.4 kB | Without provenance | Details for minio_driver-0.1.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| minio_driver-0.1.6-py3-none-any.whl | Python 3 | none | any | Details for minio_driver-0.1.6-py3-none-any.whl |
Total release size: 9.4 kB
Release files / minio_driver-0.1.6.tar.gz
| Download URL | minio_driver-0.1.6.tar.gz |
|---|---|
| Size | 4.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1e4a1cdffbc41e4e361aeb76f49cb407a9ee6550d58c4538626b66eb90ba1fdf
|
|
BLAKE2b-256 checksum How to use checksums |
8bc214af6dcf8e54c31e5e01c7a53b6f696b526e24f42453d1dc365a794fdd8e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10
|
Release files / minio_driver-0.1.6-py3-none-any.whl
| Download URL | minio_driver-0.1.6-py3-none-any.whl |
|---|---|
| Size | 5.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0376fdd8009112223ab6eab4e9215cbfc48eb5f499c7bf32da0fdf959aa2e3fa
|
|
BLAKE2b-256 checksum How to use checksums |
4dcb9e0b293e3f7d02ad1a35f4276e210e99360c2b1df42e2e0af4071e6308a8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10
|
Security for minio-driver 0.1.6
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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.