Skip to content

Ashut90/mongodb_connectorpkg

Repository files navigation

MongoDB Automation Suite

This project presents a groundbreaking approach to automating MongoDB database operations, integrating seamlessly with CI/CD workflows. It's designed specifically for file-based database management, offering a robust suite for deploying and retrieving databases with MongoDB Atlas.

Key Features 🌟

  • Automated database operations.
  • Simple CI/CD integration.
  • Direct deployment to MongoDB Atlas.

Installation 🛠️

Install the mymongoo-automate library using pip:

pip install mymongoo-automate==0.0.4

Usage Instructions 📘

Setting Up

Import the mongo_crud module from the library:

python

from database_automation import mongo_crud print("Library Imported Successfully")

Configuration

Set up your MongoDB Atlas client URL, database, and collection name:

client_url = "<your_mongodb_atlas_client_url>"
database = "<your_database_name>"
collection_name = "<your_collection_name>"

Example Operation 📖

Store a record:

mg = mongo_crud.mongo_operation(client_url, database, collection_name)
mg.insert_record({"Name": "Ashutosh", "Designation": "AI Engineer", "Salary": "100k"}, collection_name)
print("Data Stored")

Get Involved 🤝

Contributions are welcome! Feel free to submit issues or pull requests. For queries, contact us at [ashutosh.formin@gmail.com ].

requirements_dev.txt:

Streamlining Testing and Development This file simplifies the installation and management of dependencies specifically needed for development and testing. It keeps these dependencies separate from the production environment, ensuring a more organized and efficient workflow.

Understanding requirements_dev.txt vs. requirements.txt

While requirements.txt defines dependencies essential for running the production code of our Python project, requirements_dev.txt caters to the dependencies necessary for development and testing. This distinction ensures efficient dependency management across different project stages.

tox.ini: Versatile Python Testing

tox.ini is crucial for testing our Python package across various Python versions.

How Tox Environments Operate

Tox environments function through:

  1. Installing necessary dependencies and packages.
  2. Executing defined commands.
  3. Integrating features of virtualenvwrapper and makefile.
  4. Generating a .tox directory for environment management.

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: Configuring Package Installation

The setup.cfg file is utilized by setuptools for configuring the packaging and installation processes of our Python project. This file plays a pivotal role in defining how the project is packaged and distributed.

Testing Python Application: Ensuring Quality and Reliability

Our approach to testing is comprehensive, encompassing various types and modes to guarantee the highest quality.

Types of Testing:

  1. Automated Testing: Streamlining test execution.
  2. Manual Testing: Personal inspection and evaluation.

Modes of Testing:

  1. Unit Testing: Verifying individual components.
  2. Integration Testing: Ensuring combined components work harmoniously.

Preferred Testing Frameworks:

  1. pytest: For powerful and simple tests.
  2. unittest: Standard unit testing framework.
  3. robotframework: For acceptance testing and automation.
  4. selenium: Specialized in web application testing.
  5. behave: For behavior-driven development.
  6. doctest: Embedding tests in documentation.

Adhering to Coding Standards: Style Formatting and Syntax

Maintaining a high standard of code quality is crucial. We ensure this through the use of:

  1. pylint: Analyzing code for potential errors.
  2. flake8: A comprehensive tool combining pylint, pycodestyle, and mccabe for robust syntax checking.
  3. pycodestyle: Enforcing Python style conventions.

=======

requirements_dev.txt:

Streamlining Testing and Development This file simplifies the installation and management of dependencies specifically needed for development and testing. It keeps these dependencies separate from the production environment, ensuring a more organized and efficient workflow.

Understanding requirements_dev.txt vs. requirements.txt

While requirements.txt defines dependencies essential for running the production code of our Python project, requirements_dev.txt caters to the dependencies necessary for development and testing. This distinction ensures efficient dependency management across different project stages.

tox.ini: Versatile Python Testing

tox.ini is crucial for testing our Python package across various Python versions.

How Tox Environments Operate

Tox environments function through:

  1. Installing necessary dependencies and packages.
  2. Executing defined commands.
  3. Integrating features of virtualenvwrapper and makefile.
  4. Generating a .tox directory for environment management.

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: Configuring Package Installation

The setup.cfg file is utilized by setuptools for configuring the packaging and installation processes of our Python project. This file plays a pivotal role in defining how the project is packaged and distributed.

Testing Python Application: Ensuring Quality and Reliability

Our approach to testing is comprehensive, encompassing various types and modes to guarantee the highest quality.

Types of Testing:

  1. Automated Testing: Streamlining test execution.
  2. Manual Testing: Personal inspection and evaluation.

Modes of Testing:

  1. Unit Testing: Verifying individual components.
  2. Integration Testing: Ensuring combined components work harmoniously.

Preferred Testing Frameworks:

  1. pytest: For powerful and simple tests.
  2. unittest: Standard unit testing framework.
  3. robotframework: For acceptance testing and automation.
  4. selenium: Specialized in web application testing.
  5. behave: For behavior-driven development.
  6. doctest: Embedding tests in documentation.

Adhering to Coding Standards: Style Formatting and Syntax

Maintaining a high standard of code quality is crucial. We ensure this through the use of:

  1. pylint: Analyzing code for potential errors.
  2. flake8: A comprehensive tool combining pylint, pycodestyle, and mccabe for robust syntax checking.
  3. pycodestyle: Enforcing Python style conventions

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors