DEV Community

P-DR0ZD
P-DR0ZD

Posted on • Updated on

Adding my SSG to PyPi

This week i had my first experience releasing an open source project and Creating a package on pypi. This allows anyone to install my package with the pip install command.

How Did I do this

using Poetry I was able to build and deploy my code into pypi into the page pdrozd-ssg. With this i can use pip install pdrozd-ssg. Simple enough right?

:(

How many Iterations did i need

15 15 versions it took me to finally get it working. I had many issues from my script not passing correctly or Having to change how my program started or finding an error that I saw after.

Finally I think i have my SSG in a workable state and allows you to run the script with the command pdrozd [whatever command you want]

What I Did

First I needed to add a main attribute to my code and even make my main code into a callable function so I can specify an entry point.

Also i needed to make my .toml file specify the entry point of the script so i could directly call it from the command line.

Finally I wanted to attempt to automatically publish any new versions when their is a PR merged into the main. This was pretty interesting and I learned their are certain parts that are hard to automate because I need to manually change the version

How did testing go

Testing with someone else taught me a bunch of things from making sure to add the upgrade command because you cant just install again you need to upgrade it so it can uninstall and reinstall the new version.

What Next

Overall this was a cool experience i wouldn't think i would be able to make a python package especially because I only started 11 weeks ago. Now I want to continue to improve my SSG but also make a new package that might get used by new people on python.

Top comments (0)