Python Forum
Should I use my own package?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Should I use my own package?
#1
Hello everyone,

there may be a few function of mine I will use and re-use through several projects.
These are something like copying files or create symlinks with all needed exception handling for this kind of operations.
I was wondering about creating again those elementary operations for each projects I manage or should I include a personal package that would prevent me from create the wheel again and again.
The question sounds dumb and the answer obvious but I am afraid to loose knowledge of standards modules like Path, subprocess and others if I wrap all elementary operations in a pretty package.

What do you think?
Reply
#2
If it's something that others can use, publish on GitHub and Pypi.org.
If it's just something that you use all the time, definitely create a separate module that you can import.
It's a very powerful feature of python, one used all the time.
Reply
#3
Thanks for this quick answer.

What about the losting of knowledge about standard library modules due to the wrapping?
Reply
#4
Everything that you can do to make your programming more comfortable is good. The issue with creating your own utility package is not forgetting the standard library, it is to create a dependency of your programs on this utility package. It means that if you want to modify the utility package later, you'll need to care about backward compatibility, and if you want to detach your programs later from this package, there will be some work here too. That said, as it will increase your productivity today, go for it.
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020