Daily Dose of Data Science

Share this post

Execute Python Project Directory as a Script

www.blog.dailydoseofds.com

Discover more from Daily Dose of Data Science

High-quality insights on Data Science and Python, along with best practices โ€” shared daily. Get a 550+ Page Data Science PDF Guide and 450+ Practice Questions Notebook, FREE.
Over 36,000 subscribers
Continue reading
Sign in

Execute Python Project Directory as a Script

An elegant way to execute Python projects.

Avi Chawla
May 28, 2023
19
Share this post

Execute Python Project Directory as a Script

www.blog.dailydoseofds.com
Share

We mostly run a Python pipeline by invoking a script (.๐—ฝ๐˜† file).

But did you know you can also execute the Python project directory as a script?

To do this, rename the base file of your project to __๐—บ๐—ฎ๐—ถ๐—ป__.๐—ฝ๐˜†.

As a result, you can execute the whole pipeline by running the parent directory itself.

This is concise and elegant.

It also makes it easier for other users to use your project, as they are not required to dig into the directory and locate the base file.

Thanks for reading Daily Dose of Data Science! Subscribe for free to learn something new and insightful about Python and Data Science every day. Also, get a Free Data Science PDF (250+ pages) with 200+ tips.

๐Ÿ‘‰ Over to you: What are some elegant Python tricks that you frequently use? Let me know :)


๐Ÿ‘‰ Read what others are saying about this post on LinkedIn and Twitter.

๐Ÿ‘‰ Tell the world what makes this newsletter special for you by leaving a review here :)

Review Daily Dose of Data Science

๐Ÿ‘‰ If you liked this post, donโ€™t forget to leave a like โค๏ธ. It helps more people discover this newsletter on Substack and tells me that you appreciate reading these daily insights. The button is located towards the bottom of this email.

๐Ÿ‘‰ If you love reading this newsletter, feel free to share it with friends!

Share Daily Dose of Data Science

๐Ÿ‘‰ Sponsor the Daily Dose of Data Science Newsletter. More info here: Sponsorship details.


Find the code for my tips here:ย GitHub.

I like to explore, experiment and write about data science concepts and tools. You can read my articles on Medium. Also, you can connect with me on LinkedIn and Twitter.

19
Share this post

Execute Python Project Directory as a Script

www.blog.dailydoseofds.com
Share
Previous
Next
Comments
Top
New
Community

No posts

Ready for more?

ยฉ 2023 Avi Chawla
Privacy โˆ™ Terms โˆ™ Collection notice
Start WritingGet the app
Substack is the home for great writing