How to Build Python Packages for Pip

preview_player
Показать описание
The most powerful feature of Python is its community. Almost every use-case out there has a package built specifically for it.

Need to send mobile/email alerts? pip install knockknock  -  Build ML apps? pip install streamlit  -  Bored of your terminal? pip install colorama  -  It's too easy!

I know this is obvious, but those libraries didn't magically appear. For each package, there is a person, or many persons - that actively developed and deployed that package.

Every single one.

All 300K+ of them.

That is why Python is Python, the level of support is phenomenal - mindblowing.

In this video, we will learn how to build our own packages. And add them to the Python Package Index (PyPI). Afterward, we will be able to install our packages using pip install!

GitHub Repo:

🤖 70% Discount on the NLP With Transformers in Python course:

Medium Article:

📖 Here's a free link:
Рекомендации по теме
Комментарии
Автор

Thank you James. Appreciate it. Created my first python package with your help. For people reading this, the install url has a space between simple/ and your package name. Good luck and have a great day/night everyone.

RudradeepMukherjee
Автор

Thanks for this great tutorial. After being a simple user of packages for a long time I now get the the pieces of the puzzle together how to create usable python packages. Everything is well explained and due to the step by step approach I can now try to program, setup, built and upload my own packages.

uliuphoff
Автор

This is a brilliant tutorial. This is a must watch for anyone thinking about being a Python developer!

bosra
Автор

I've been trying to get my head around this stuff the past couple of days, and found this video very helpful, especially about which files are uploaded to pypi and how to.
The only thing I would add here is that, I read about PEP-621, where it seems that the community now has chosen the pypackage.toml file to contain all metadata. I was surprised to see the setup.cfg file in this. Could the contents of setup.cfg be slightly reformatted and instead put inside pypackage.toml?

frodethorsenbrseth
Автор

I will do by following your procedure to create package soon. Thank you very much

alphonseinbaraj
Автор

Thank you. I really needed this video. I had been trying to figure out why my relative paths break on install. Instead of using resources and io I used import os.

I made a simple function:

def get_dir() -> str:
return

Then used that to get the path needed to retrieve any files (in this case .sql files).

Do you see any disadvantage to this approach compared to the approach you use?

Diffyemo
Автор

First off, super great tutorial. It’s made creating packages really easy for me.
A question I had was, if I wanted to include a whole folder that had things I needed for my package, how would I do this? I tried using the approach you used for the images, but maybe I am doing it wrong because I keep getting errors when I do a ‘pip install .’ to test things before building the wheel. I have a folder with files needed for an ML package I am building, but I’m having problems including the folder as a whole in the wheel package, so I can easily point a function to the folder

yawofori-addae
Автор

how do you add requirements.txt file for larger projects?

andrewdavies
Автор

Awesome video, made one of my goals for the summer of 2023 true! Thanks a lot!

aavvironalex
Автор

Hi thanks for the video. What about the dependencies? How we specify that? Also what if we want to install it locally? Thanks

titusfx
Автор

This was a great tutorial! Hopefully I'll be able to share my first python package soon

JoshvsData
Автор

Thank you for this video !
I love you VS Code thème 😍
Which one are you using ?
Thank you very much !

CrossK
Автор

Great job on this tutorial. I tried some other tuts on YouTube. This one was by far the most clear on the subject.

baldmancodes
Автор

james! i have my import nltk in my main.py file ... when i try i to build my package i get the error saying that no module named nltk.. how to resolve this please help

abhiwanders
Автор

Thank you very much!. I love you. <3

lethong
Автор

16:17

I cant do python -m build
It says that /usr/bin/python: No module named build.__main__; 'build' is a package and cannot be directly executed

snipzmattio
Автор

Great video! I must know.... Where did you get those desktop wallpapers?!?

platano
Автор

Thank you James, Super digest How to ... video. Appreciated ....

davidxcohen
Автор

Thanks! I just post so that you can have more visibility ;-) #python #tutorial #Pip #Packages

foreach
Автор

Are you divorced and was her name Abby?

thecoldlemonade