A python package for connecting with database.
Project description
# MongoDB Connection Utility ## Overview
This Python package provides utility functions to simplify interactions with MongoDB databases. It allows you to easily create a MongoDB client, database, and collection, as well as insert records into the database. Installation
#### You can install the package using pip:
bash
pip install mongo_connection_owais
## Usage
#### To use this package, follow these steps:
Import the mongo_operation class from the package:
from mongo_connection_owais import mongo_operation
Create an instance of the mongo_operation class by providing the MongoDB connection URL, database name, and optional collection name:
client_url = “mongodb://localhost:27017/”
database_name = “my_database”
collection_name = “my_collection”
mongo_op = mongo_operation(client_url, database_name, collection_name)
#### Insert records into the MongoDB collection:
record = {“key”: “value”}
mongo_op.insert_record(record, collection_name)
#### Perform bulk insertion of data from a CSV or Excel file:
datafile = “data.csv”
mongo_op.bulk_insert(datafile, collection_name)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mongo_connection_owais-0.0.4.tar.gz.
File metadata
- Download URL: mongo_connection_owais-0.0.4.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
053290361d53a43e6f5781c377825bc15b6d30b7a8c27c4ff94068112f65f66f
|
|
| MD5 |
d71f7974bc9cffa661643d40781eb2e7
|
|
| BLAKE2b-256 |
c5499a69036ba2b17195c28a4838ae8bb3b599c6a5a2e52fbc98db036ed0d34b
|
File details
Details for the file mongo_connection_owais-0.0.4-py3-none-any.whl.
File metadata
- Download URL: mongo_connection_owais-0.0.4-py3-none-any.whl
- Upload date:
- Size: 2.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4340b6d83ec5ae72002291c11862204d39ac3bf49f57e780016e21b3258374b1
|
|
| MD5 |
d85607655ab8bd73baf9997a97a1fa74
|
|
| BLAKE2b-256 |
14580ac23624f292a71c3556410290a6d279620b916eee1f64152569805f7a23
|