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
```
Raw data
{
"_id": null,
"home_page": "",
"name": "filestostorage",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "mongodb,store files,database,store,file,ngit,mongo,kmit",
"author": "ngit_kmit",
"author_email": "devikarubir@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/1f/fd/ec425ce1d03af15089bf72527bf6bb0112ff3ad762c6868fda636c16ccea/filestostorage-0.0.2.7.tar.gz",
"platform": null,
"description": "This package is used to store files in mongodb\n### filestostorage\n\n##### Packages included\n`$ pip install pymongo`\nFor connecting python to mongodb\n`$ pip install gridfs-fuse`\nFor performing read/write operations on mongodb\n\n#### Installation\n`$ pip install filestostorage`\nNOTE:This package currently supports upto Python version 3.9\n\nProject is still under development :)\nCurrently supported for storing files in mongodb\n\n#### Usage\n\n\n##### Import statement:\n```import filestostorage as ft```\n\n##### Mongo Connection\nCreate a Database object\n```db = ft.mongo_conn()```\nThis function will prompt to Enter MongoUrl\n##### Upload File\nTo upload file use the below command\n```ft.upload_file(\"FILE PATH\",\"FILENAME\",db)```\n\n```ft.upload_file(\"/Users/Desktop/test/image1.jpeg\",\"file_name\",db)```\n##### Download File\nTo download_files use the below command:\n```ft.download_file(\"DOWNLOAD LOCATION\",\"FILE NAME\",db)```\n\n```ft.download_file(\"/Users/Desktop/myimage.jpeg\",\"file_name\",db)```\n In 2nd parameter use the same file name which was used while uploading the file\n \n##### Overall\n```\n\nimport filestostorage as ft\n\ndb = ft.mongo_conn() #connect to database via url\n\nft.upload_file(\"file_path\",\"file_name\",db) #command to upload file\n\nft.download_file(\"download_location\",\"file_name(same as upload)\",db)#command to download file\n```\n",
"bugtrack_url": null,
"license": "",
"summary": "package for file storage",
"version": "0.0.2.7",
"split_keywords": [
"mongodb",
"store files",
"database",
"store",
"file",
"ngit",
"mongo",
"kmit"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "1d7b83357f20751504cd0255ed62c4007d88ee417594e49764083dba20718911",
"md5": "d5a584c62ea699f74e665eee294d5551",
"sha256": "5852bf3b8be39fc7165ce2f5752b0d595d65ee78164123557eeb10d2e90e28e5"
},
"downloads": -1,
"filename": "filestostorage-0.0.2.7-py3-none-any.whl",
"has_sig": false,
"md5_digest": "d5a584c62ea699f74e665eee294d5551",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 3384,
"upload_time": "2023-03-11T05:40:33",
"upload_time_iso_8601": "2023-03-11T05:40:33.398069Z",
"url": "https://files.pythonhosted.org/packages/1d/7b/83357f20751504cd0255ed62c4007d88ee417594e49764083dba20718911/filestostorage-0.0.2.7-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "1ffdec425ce1d03af15089bf72527bf6bb0112ff3ad762c6868fda636c16ccea",
"md5": "14a188ee12f340cfa0055a9216611053",
"sha256": "67864206e5bf39b70b53bcff7f08a0916e79857358447adca9b68b217c39397d"
},
"downloads": -1,
"filename": "filestostorage-0.0.2.7.tar.gz",
"has_sig": false,
"md5_digest": "14a188ee12f340cfa0055a9216611053",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 3154,
"upload_time": "2023-03-11T05:40:35",
"upload_time_iso_8601": "2023-03-11T05:40:35.034164Z",
"url": "https://files.pythonhosted.org/packages/1f/fd/ec425ce1d03af15089bf72527bf6bb0112ff3ad762c6868fda636c16ccea/filestostorage-0.0.2.7.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-03-11 05:40:35",
"github": false,
"gitlab": false,
"bitbucket": false,
"lcname": "filestostorage"
}