csv2db
csv2db copied to clipboard
Convert into a Python package
Hi, just thinking that there would be a number of advantages to converting this to a Python package:
- You get automatic executable installation. ie the user can
pip install csv2dband then executecsv2db loadin any directory without needing to know where the executable is (./csv2db) - You get a Python API. This allows people to run this more smoothly from Python without needing to use
subprocessetc
Hi @multimeric,
Thanks a lot for your ideas!
If I understand correctly, you would like for csv2db to also ship as a package on PyPI and hence then be invokable via python -m csv2db ...?
It's one better. pip can install executables directly into the $PATH so that you could run it as csv2db without python -m.
If you package this using setuptools (the old fashioned way), the documentation is here: https://setuptools.readthedocs.io/en/latest/userguide/entry_point.html. If you use poetry (my preference) the documentation is here: https://python-poetry.org/docs/pyproject/#scripts.
Hey @multimeric, thanks a lot for the suggestion. This is now implemented and will be released with the next version.