Closed Ullaakut closed 4 years ago
@Ullaakut could you please do a PR to dev branch? dev branch is where most recent code lives. We move code to master when we plan to do a release. I guess we need to make it clear for contributors in README.md to avoid future confusions. Sorry for that!
@martynaut I changed the base of the PR and there are no conflicts. It should be okay now :)
Pushed a fix for the path issues, did the following tests:
Goal of this PR
Fixes #22
This PR implements a simple MySQL connector for Sroka. Just like other connectors, it supports fetching data into pandas dataframes as well as
csv
files.It also:
mysql.connector
to therequirements.txt
file,requirements.txt
file alphabetically, the waypip freeze
normally sorts dependencies. Can be reverted if needed, since it is not part of the scope of the PR but is a side-effect,MySQL
section and example to the sample Jupyter Notebook,setup.py
file which contained whitespaces at the end of the line 4, which prevented the pre-commit hook from letting commits pass.How to test it
I personally tested this feature by using this public MySQL server. You can do the same by using the following configuration values in your
config.ini
file:Here is an example of running it in the sample Jupyter Notebook on this public database:
And here is the CSV file created when an argument is given for the filename:
Additional Notes
Feel free to be nit-picky about the PR, it's my first ever Python contribution so I don't know any of the best practices that are specific to Python.