Skip to main content

A python package for connecting with database.

Project description

# 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

  1. pytest

  2. unittest

  3. robotframework

  4. selenium

  5. behave

  6. doctest

# check with the code style formatting and syntax(coding standard)

  1. pylint

  2. flake8(it is best because it containt 3 library pylint pycodestyle mccabe)

  3. pycodestyle

# How to use the package :-

### STEPS:-

`bash pip install mongodb-crud-automation `

`bash from mongo_connect import mongo_crud `

`bash client_url = "<client_url_of_mongodb>" database = "<database name>" collection_name = "<collection_name>" `

`bash mongo = mongo_crud.mongodb_operation(client_url,database,collection_name) `

# CRUD Operation on MongoDB :-

## How to run :-

### 1. insert record `bash mongo.insert_record( record:dict, collection_name) `

### 2. insert many record `bash mongo.insert_record([record:dict], collection_name) `

### 3. bulk insert record - in this datafile is in .csv or .xlsx file `bash mongo.bulk_insert ( datafile, collection_name: str = None, unique_field: str = None) `

### 4. find query `bash mongo.find(query: dict = {}, collection_name: str = None) ` ### 5. update query `bash mongo.update(query: dict, new_values: dict, collection_name: str = None) `

### 6. delete query `bash mongo.delete(query: dict, collection_name: str = None) `

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mongodb_crud_automation-0.0.8.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

mongodb_crud_automation-0.0.8-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file mongodb_crud_automation-0.0.8.tar.gz.

File metadata

File hashes

Hashes for mongodb_crud_automation-0.0.8.tar.gz
Algorithm Hash digest
SHA256 5404d2e5ce294ad182f3909654340e1fd6fbf6c47b55d594f399861bea37d8f4
MD5 8959bdfb1c168f4da62514bc97fe035d
BLAKE2b-256 2f70b98dd177dcc90c6087a6249a83d51a23b199ff4748c5ea08148e850c5ca5

See more details on using hashes here.

File details

Details for the file mongodb_crud_automation-0.0.8-py3-none-any.whl.

File metadata

File hashes

Hashes for mongodb_crud_automation-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 3f4dbf03a6ce75798b8c1eca08d7711be1931e1d77ff8eec8f005b2214d29c8d
MD5 4c139e111dbb9251b3332e6616e269c0
BLAKE2b-256 5333db4eb015fc92c34ac5ea0dc34e26552010d10e2ef898be2eb130865a06c0

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page