# Description:
mongo-operation is a Python library for simplifying MongoDB operations by providing an easy-to-use interface. This library allows users to perform common MongoDB tasks such as creating a client, database, or collection, as well as inserting records into collections and bulk inserting data from CSV or Excel files.
# Features:
MongoClient Creation: Easily create a MongoDB client with a given URL. Database and Collection Management: Create databases and collections with ease, and automatically handle re-creating them if they already exist. Insertion Operations: Insert records into MongoDB collections, whether it’s a single record or bulk data from CSV or Excel files.
# Example Usage:
python code
from MongoDB_CRUDE_Operation.mongodb_connect.mongo_crud import mongo_operation
Initialize MongoDB connection
<div style=”background-color:#f4f4f4; padding:10px;”> <pre><code> client_url = “mongodb://localhost:27017/” database_name = “mydatabase” collection_name = “mycollection”
mongo_op = mongo_operation(client_url, database_name, collection_name)
# Insert a single record record = {“name”: “John”, “age”: 30} mongo_op.insert_record(record, collection_name)
# Bulk insert data from CSV or Excel file datafile = “data.csv” mongo_op.bulk_insert(datafile, collection_name) </code></pre> </div>
## Requirements:
Python 3.x pandas pymongo ensure
### requirements_dev.txt we use for the testing It makes it easier to install and manage dependencies for development and testing, separate from the dependencies required for production.
### difference between requirements_dev.txt and requirements.txt
requirements.txt is used to specify the dependencies required to run the production code of a Python project, while requirements_dev.txt is used to specify the dependencies required for development and testing purposes.
### tox.ini We use if for the testing in the python package testing against different version of the python
### how tox works tox enviornment creation 1. Install depedencies and packages 2. Run commands 3. Its a combination of the (virtualenvwrapper and makefile) 4. It creates a .tox
### pyproject.toml it is being used for configuration the python project it is a alternative of the setup.cfg file. its containts configuration related to the build system such as the build tool used package name version author license and dependencies
### setup.cfg In summary, setup.cfg is used by setuptools to configure the packaging and installation of a Python projec
### Testing python application types of testing 1. Automated testing 2. Manual testing
Mode of testing 1. Unit testing 2. Integration tests
Testing frameworks
pytest
unittest
robotframework
selenium
behave
doctest
### check with the code style formatting and syntax(coding standard)
pylint
flake8(it is best because it containt 3 library pylint pycodestyle mccabe)
pycodestyle
feel free for contribution
Metadata
Release files for MongoDBCollectionOperation 0.0.16
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 |
|---|---|---|---|---|
| mongodbcollectionoperation-0.0.16.tar.gz | 4.1 kB | Without provenance | Details for mongodbcollectionoperation-0.0.16.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| MongoDBCollectionOperation-0.0.16-py3-none-any.whl | Python 3 | none | any | Details for MongoDBCollectionOperation-0.0.16-py3-none-any.whl |
Total release size: 7.9 kB
Release files / mongodbcollectionoperation-0.0.16.tar.gz
| Download URL | mongodbcollectionoperation-0.0.16.tar.gz |
|---|---|
| Size | 4.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
15653c6ecdb38fcc632051c9738bfca28e4afe708d1d7a89a58ade2480b084db
|
|
BLAKE2b-256 checksum How to use checksums |
d6b81ce025e2c577bba54539851eb73df5fc7c4e393b28d81dab8481a45c36de
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.9.19
|
Release files / MongoDBCollectionOperation-0.0.16-py3-none-any.whl
| Download URL | MongoDBCollectionOperation-0.0.16-py3-none-any.whl |
|---|---|
| Size | 3.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cd1015907d5e2101827e2f79cfee293d3d59c88997cb35a3bb494eb3e2f99d99
|
|
BLAKE2b-256 checksum How to use checksums |
053391fe7cd17cbf26ab93ab4604f093b5abb634b34c70a1f021d5b21f8c4e50
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.9.19
|
Security for MongoDBCollectionOperation 0.0.16
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.