Skip to main content

# 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)

Metadata

Release files for mongo-test-ts 0.2.1

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

Source distribution (sdist)

Source distribution for mongo-test-ts 0.2.1
File Size Uploaded
mongo_test_ts-0.2.1.tar.gz 2.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mongo-test-ts 0.2.1
File Interpreter ABI Platform
mongo_test_ts-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 5.7 kB

Release files / mongo_test_ts-0.2.1.tar.gz

Download URL mongo_test_ts-0.2.1.tar.gz
Size 2.9 kB
Tags Source
SHA-256 checksum
How to use checksums
6927203e81fa276d518142090915a4bc3c1cf8802cb52d0ccc42c3a0be8b96e5
BLAKE2b-256 checksum
How to use checksums
1fb39a159ae920d6d59f876b7a9971bf685ad435afe6e9f5a1aec07d893aa297
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.23

Release files / mongo_test_ts-0.2.1-py3-none-any.whl

Download URL mongo_test_ts-0.2.1-py3-none-any.whl
Size 2.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
972ee7c7f1417d827553fa96474ba58cb1c046ed8f40d59b984aedc54322ec3e
BLAKE2b-256 checksum
How to use checksums
163f8f71d4b1ed22057deb1e737050d39c4a37dbad1cf7f71a0cbc577555b1b6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.23

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files

0.2.0

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

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