Skip to main content

This package is used to store files in mongodb

filestostorage

Packages included

$ pip install pymongo For connecting python to mongodb $ pip install gridfs-fuse For performing read/write operations on mongodb

Installation

$ pip install filestostorage NOTE:This package currently supports upto Python version 3.9

Project is still under development :) Currently supported for storing files in mongodb

Usage

Import statement:

import filestostorage as ft

Mongo Connection

Create a Database object db = ft.mongo_conn() This function will prompt to Enter MongoUrl

Upload File

To upload file use the below command ft.upload_file("FILE PATH","FILENAME",db)

ft.upload_file("/Users/Desktop/test/image1.jpeg","file_name",db)

Download File

To download_files use the below command: ft.download_file("DOWNLOAD LOCATION","FILE NAME",db)

ft.download_file("/Users/Desktop/myimage.jpeg","file_name",db) In 2nd parameter use the same file name which was used while uploading the file

Overall

import filestostorage as ft

db = ft.mongo_conn()   #connect to database via url

ft.upload_file("file_path","file_name",db) #command to upload file

ft.download_file("download_location","file_name(same as upload)",db)#command to download file

Metadata

Release files for filestostorage 0.0.2.7

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

Source distribution (sdist)

Source distribution for filestostorage 0.0.2.7
File Size Uploaded
filestostorage-0.0.2.7.tar.gz 3.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for filestostorage 0.0.2.7
File Interpreter ABI Platform
filestostorage-0.0.2.7-py3-none-any.whl Python 3 none any Details

Total release size: 6.5 kB

Release files / filestostorage-0.0.2.7.tar.gz

Download URL filestostorage-0.0.2.7.tar.gz
Size 3.2 kB
Tags Source
SHA-256 checksum
How to use checksums
67864206e5bf39b70b53bcff7f08a0916e79857358447adca9b68b217c39397d
BLAKE2b-256 checksum
How to use checksums
1ffdec425ce1d03af15089bf72527bf6bb0112ff3ad762c6868fda636c16ccea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.9

Release files / filestostorage-0.0.2.7-py3-none-any.whl

Download URL filestostorage-0.0.2.7-py3-none-any.whl
Size 3.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5852bf3b8be39fc7165ce2f5752b0d595d65ee78164123557eeb10d2e90e28e5
BLAKE2b-256 checksum
How to use checksums
1d7b83357f20751504cd0255ed62c4007d88ee417594e49764083dba20718911
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.9

Release history Release notifications | RSS feed

This release

0.0.2.7 This release

2 release files

0.0.2.6

1 release file

0.0.2.5

1 release file

0.0.2.4

1 release file

0.0.2

2 release files

0.0.1

1 release file

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