Python package for connecting and importing data from different DataBases
Project description
Database Connector Package
Overview
dbsconnector is a Python package designed to simplify the process of connecting to different data sources like csv files, excel sheets, google sheets, MongoDB database etc. This package provides a streamlined API for loading the data from different sources and return as Pandas DataFrame for any kind of DataScience, DataAnalysis and MachineLearning purpose.
Features
- Easy connection to multiple data sources
- Return Pandas DataFrame as the Output
Project Structure
dbsconnector/
├── .github/
│ └── workflows/
│ └── ci.yaml
│ └── python-publish.yaml
├── src/
│ └── dbsconnector/
│ └── databases.py
├── tests/
│ ├── unit/
│ │ └── test_unit.py
│ └── integration/
│ └── test_integration.py
├── .gitignore
├── LICENSE
├── pyproject.toml
├── README.md
├── requirements_dev.txt
├── requirements.txt
├── setup.cfg
├── setup.py
├── template.py
└── tox.ini
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
- Install depedencies and packages
- Run commands
- Its a combination of the (virtualenvwrapper and makefile)
- 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
- Automated testing
- Manual testing
Mode of testing
- Unit testing
- 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
CI/CD
Implemented a robust CI/CD pipeline using GitHub Actions to automate testing, building, and deployment of this package to the PyPI repository. This ensures that every change is thoroughly tested and seamlessly deployed, maintaining the highest quality standards.
How to use this package?
Installation
To install the package, use pip:
pip install dbsconnector==0.1
Usage
Connecting to csv
# import the module:
from dbsconnector import databases
# load the data:
df = databases.load_csv('sample.csv', ',')
# display the data:
df
Connecting to Excel
# import the module:
from dbsconnector import databases
# load the data:
df = databases.load_excelsheet('sample.xlsx', 'sample_sheet')
# display the data:
df
Connecting to gsheet
# import the module:
from dbsconnector import databases
# load the data:
df = databases.load_gsheet('17r9f4BL7sjmdLBnt92OdQP3CHK5bdT3hozg6DUJXGqU', 'sample_sheet')
# display the data:
df
Connecting to MongoDB
# import the module:
from dbsconnector import databases
# load the data:
df = databases.load_mongodbdata('localhost', 'sample_database', 'sample_collection')
# display the data:
df
Contributing
- Several other data sources are to be included in upcomming versions.
- Contributions are welcome! Please open an issue or submit a pull request on GitHub.
License
This project is licensed under the MIT License.
Contact
For any questions or suggestions, please contact yuvaneshkm05@gmail.com
Connect
Connect with me on LinkedIn
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
Built Distribution
File details
Details for the file dbsconnector-0.1.tar.gz
.
File metadata
- Download URL: dbsconnector-0.1.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c76b02a5774c925356b02483a5640e2ff3ae7285c2f39c778443b161f4d340aa |
|
MD5 | df458b4ad3a33c75a30afa48c1320058 |
|
BLAKE2b-256 | 9aeb0023d6da9ddc1593f009daa3682d63741e4c4ab69a2ca75831145333793f |
File details
Details for the file dbsconnector-0.1-py3-none-any.whl
.
File metadata
- Download URL: dbsconnector-0.1-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 61496ceceefa07d79587c3e4a18a4e16b6ea6f8038db9b527fabb1a25f11e50c |
|
MD5 | 04dbe73d8de7068f5ce431a30f1520e9 |
|
BLAKE2b-256 | 21c9d5834bc487fce7e1545d1c06a81ba502e1905d4f5f5d2402f81140d5a7b1 |