Creating Your First Python Package
This is my first blog post with hopefully many more to come, talking about how to create your first Python package and release it on PyPI. I’ve been writing software for my startup and for various ad hoc development projects for the past couple of years, however, after I put out my first package a couple of weeks ago, I realized there is so much one learns and sees the benefit of, that not writing code in a “good practice” way actually becomes more painful.
Being a data scientist first, best software principals weren’t always at the forefront of my mind when doing projects. After forcing myself to write tests and attempt to pick up more best practices, I find it being a mindset that I can’t believe I’ve lived without for so long. These are things learned from a small package, I put out in under 1 weeks too! For those of you who are interested, the package is called icd. I have also just released a second one called fastteradata, however, I accidentally got too excited and am currently in progress of writing the retroactive tests for it and doing a major cleaning of the code now.
Some of the benefits of writing your first package, no matter how small, will be:
- Being forced to think much more modularly
- Writing code with tests in mind
- Thinking about making the api simple enough for…