Skip to main content

A Package Which allows to access and perform Operations on Different Relational and Non-Relational DataBases

Project description

DBTron

  • A Package that allows to access Cloud as well as Local Databases and allows user to Performs Operation using prebuilt functions, Currently the available Databases are MySql and MongoDB.' This is basically the Automation of SQL and NoSQL Database Queries

:desktop_computer: Installation

:gear: Setting up environment for project

  1. Create a Environment using below Command
$ conda create -n YourEnvName python=3.6
  1. Activate Your Environment
$ conda activate EnvName
  1. Install the Package using pip or pip3
$ pip install DBTron
  1. How to use the package after installing

MongoDB

# Importing Class from package
$ from DBTron.mongoDBOps import MongoDBOps

# Creating class object with appropriate arguments
$ mongo_obj = MongoDBOps(url,password)

# Calling the function using class object with appropriaters arguments
$ mongo_obj.func(parameters)

# NOTE: In our case class object can also be called as connection object

MySQL

# Importing Class from package
$ from DBTron.sqlOps import SqlOps

# Creating class object with appropriate arguments
$ sql_obj = SqlOps(host, user, password)

# Calling the function using class object with appropriaters arguments
$ sql_obj.func(parameters)

# NOTE: In our case class object can also be called as connection object

List of Function available in DBTron as of now are as follows:

In MongoDB


$ getMongoDBClientObject()
$ closeMongoDBconnection(mongo_client)
$ isDatabasePresent(db_name)
$ createDatabase(db_name)
$ dropDatabase(db_name)
$ getDatabase(db_name)
$ getCollection(collection_name, db_name)
$ isCollectionPresent(collection_name, db_name)
$ createCollection(collection_name, db_name)
$ dropCollection(collection_name, db_name)
$ insertRecord(db_name, collection_name, record)
$ insertRecords(db_name, collection_name, records)
$ findfirstRecord(db_name, collection_name,query=None)
$ findAllRecords(db_name, collection_name)
$ findRecordOnQuery(db_name, collection_name, query)
$ updateOneRecord(db_name, collection_name, previous_record, new_record)
$ updateMultipleRecord(db_name, collection_name, previous_record, new_record)
$ deleteRecord(db_name, collection_name, query)
$ deleteRecords(db_name, collection_name, query)
$ getDatabaseList()
$ getCollectionList(db_name)
$ getDataFrameOfCollection(db_name, collection_name)
$ saveDataFrameIntoCollection(collection_name, db_name, dataframe)
$ getResultToDisplayOnBrowser(db_name, collection_name)
$ downloadDataFromCollection(db_name, collection_name, file_name)

In MySQL


$ sql_show_db()
$ sql_show_tables(db)
$ sql_create_db(db_name)
$ sql_delete_db(db_name)
$ sql_create_table(db_name , table_name , columns)
$ sql_delete_table(db_name , table_name)
$ sql_insert_table(db_name , table_name , values)
$ sql_display_all_data(db_name, table_name)
$ sql_update_data(db_name, table_name ,set_value , where_value)
$ sql_download_data(db_name , table_name , new_filename="sql_data")

Contributors

  • Suraj Jaiswal

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

DBTron-0.0.5.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

DBTron-0.0.5-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file DBTron-0.0.5.tar.gz.

File metadata

  • Download URL: DBTron-0.0.5.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.6.7

File hashes

Hashes for DBTron-0.0.5.tar.gz
Algorithm Hash digest
SHA256 bdd802c4d07f31860fa994e87d5725b100922be961c4875b538a3f73be88a4fe
MD5 0fa2acea00e2884136c2fc4dcdd3981a
BLAKE2b-256 752617803a1d0580e1f7ed5f1f9d9c68db94d6cdc9e6970b8115f5497e536128

See more details on using hashes here.

File details

Details for the file DBTron-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: DBTron-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.6.7

File hashes

Hashes for DBTron-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 6782a28c1ea4f9c6af210a1617044b39743ea80c50090e09709ef7351b635928
MD5 43f4e990fe190c866658b6e563be9ab5
BLAKE2b-256 d448669ccb7ac7852e5cde34d609ac42f01921110fe907fbeaa6088be2b2cf73

See more details on using hashes here.

Supported by

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