DEV Community

Haider Ali
Haider Ali

Posted on

Setup your python package within seconds

Hello, today I'm going to tell you about a new project/package that I made related to python packages or pypi packages. Before we deep dive I really want y'all to drop a follow on Twitter Twitter Profile

So many of you while making a python package have suffered the pain of setting up the files and folders. Well not anymore I made a "Open Source" project called "create-pypi-project" what this does is makes creates a folder and creates all the file needed for a pypi package. Not only the files and folders, it also sets their content, no need to go to google and suffer the pain.

Lets get started

pip install create-pypi-project
Enter fullscreen mode Exit fullscreen mode
createpypiproject --name helloworld --author Haider
Enter fullscreen mode Exit fullscreen mode

--name will the name the folder and also name the package so its required

--author is also required because it is necessary who published the package.

Remember to change the details in setup.cfg, like the github repo, author_email and etc

Soon we will add option in which you can static or dynamic way of setup files

Now you will something like this in your terminal

Hey Pythoneer or Pythonista, are you sure you want to name your project helloworld [y/N]: y
Started creating a Pypi project helloworld
Made a directory named helloworld
Created project.toml
Created setup.cfg
Created README.md
Created LICENSE file with defualt license
You can choose a different license from https://choosealicense.com/
Sucessfully created Pypi project: helloworld
Enter fullscreen mode Exit fullscreen mode

Done, this took like 2 or 3 seconds and your project is ready to be developed.

Now you use this anytime you're wanting create a new package :)

Here is the GitHub Repository

Here is the package link create-pypi-project

Make sure to follow me on Twitter :)

Top comments (1)

Collapse
 
thomasborgen profile image
Borgen

Sorry about this, but any new or old python developer should not use this.

Python devs in 2022 should use poetry.

poetry new my_awesome_package does what you describe. But more than that it's also a dependency resolver and manager, in addition to publising to pypi with poetry publish --build. It's also peer reviewed and the closest thing we have to a standard way to manage your package.