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.
- Automated database operations.
- Simple CI/CD integration.
- Direct deployment to MongoDB Atlas.
Install the mymongoo-automate library using pip:
pip install mymongoo-automate==0.0.4Import the mongo_crud module from the library:
python
from database_automation import mongo_crud print("Library Imported Successfully")
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>"
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 ].
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.
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 is crucial for testing our Python package across various Python versions.
Tox environments function through:
- Installing necessary dependencies and packages.
- Executing defined commands.
- Integrating features of
virtualenvwrapperandmakefile. - Generating a
.toxdirectory for environment management.
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
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.
Our approach to testing is comprehensive, encompassing various types and modes to guarantee the highest quality.
Types of Testing:
- Automated Testing: Streamlining test execution.
- Manual Testing: Personal inspection and evaluation.
Modes of Testing:
- Unit Testing: Verifying individual components.
- Integration Testing: Ensuring combined components work harmoniously.
Preferred Testing Frameworks:
pytest: For powerful and simple tests.unittest: Standard unit testing framework.robotframework: For acceptance testing and automation.selenium: Specialized in web application testing.behave: For behavior-driven development.doctest: Embedding tests in documentation.
Maintaining a high standard of code quality is crucial. We ensure this through the use of:
- pylint: Analyzing code for potential errors.
- flake8: A comprehensive tool combining
pylint,pycodestyle, andmccabefor robust syntax checking. - pycodestyle: Enforcing Python style conventions.
=======
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.
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 is crucial for testing our Python package across various Python versions.
Tox environments function through:
- Installing necessary dependencies and packages.
- Executing defined commands.
- Integrating features of
virtualenvwrapperandmakefile. - Generating a
.toxdirectory for environment management.
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
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.
Our approach to testing is comprehensive, encompassing various types and modes to guarantee the highest quality.
Types of Testing:
- Automated Testing: Streamlining test execution.
- Manual Testing: Personal inspection and evaluation.
Modes of Testing:
- Unit Testing: Verifying individual components.
- Integration Testing: Ensuring combined components work harmoniously.
Preferred Testing Frameworks:
pytest: For powerful and simple tests.unittest: Standard unit testing framework.robotframework: For acceptance testing and automation.selenium: Specialized in web application testing.behave: For behavior-driven development.doctest: Embedding tests in documentation.
Maintaining a high standard of code quality is crucial. We ensure this through the use of:
- pylint: Analyzing code for potential errors.
- flake8: A comprehensive tool combining
pylint,pycodestyle, andmccabefor robust syntax checking. - pycodestyle: Enforcing Python style conventions