DEV Community

Phan Hieu Nguyen
Phan Hieu Nguyen

Posted on

Release CLI tool Python package


I worked on releasing Python package.
Repo link
Python Package


With this package, people can download and install is in (almost) one line of command.


The first problem was (again) structure of python project. In order to make it works, I had to roll back to the structure I had at the beginning (I knew this was gonna happen) when I started working on this. In the previous task, I had to make it work on GitHub action, so I have to modify the structure to fit that CI. So it is very annoying, and I have to accept that it can only work with one platform. I chose Package platform and dumped Github build.
The second problem was (again) follow wrong instructions. The instruction was to use PyPI test server. I followed and uploaded my tools. Things were ok. But when I download and install on a different machine, I can't install it. I wasted a lot of time debugging it but nothing change the missing packages. So I tried to test my code with another still files. I felt like I cheated for this task. But it still didn't work?! So after a while, I compared everything (except how the actual code works) with a submitted project, the different was he didn't submit to test PyPI server. I tried to upload to actual PyPI server and it works. So why on earth did I have to work with test server in given instructions?!


The fun part is inviting anyone (not limited to fellow student) to test your tools. I asked a friend in class because at least, he is a programmer, it will make my life easier :). The test went pretty well. I learnt from it that I should be a little bit more clear in installation instruction. Because right now, I'm just saying Python3 required, but didn't show how to install Python.


It's good to know how to publish your own package. I know my past project, we had very useful "self-made" npm package, and it's beautiful. It seems easier in Node, npm. I still don't like Python project structures, it is very confusing and annoying :(

Top comments (0)