Sunday, May 5, 2024
HomePythonBundle Python Code With pyproject.toml & Itemizing Recordsdata With pathlib – The...

Bundle Python Code With pyproject.toml & Itemizing Recordsdata With pathlib – The Actual Python Podcast


Dec 09, 2022 54m

Christopher Bailey
Christopher Trudeau

How do you begin packaging your code with pyproject.toml? Would you want to affix a dialog that lightly walks you thru organising your Python initiatives to share? This week on the present, Christopher Trudeau is right here, bringing one other batch of PyCoder’s Weekly articles and initiatives.

Episode Sponsor:

We talk about a current code dialog that includes Actual Python staff members Ian Currie and Geir Arne Hjelle. The video dives into the formally sanctioned solution to configure your venture utilizing a pyproject.toml file. We cowl how this comparatively new strategy will enable you package deal your code to be used in your system or for sharing with others.

Christopher shares a Actual Python tutorial about utilizing pathlib to get a listing of all of the recordsdata inside a listing. We’re each followers of pathlib and the way it simplifies working with file paths. The tutorial digs into strategies to recursively record all listing contents or create a conditional itemizing.

We share a number of different articles and initiatives from the Python neighborhood, together with an evidence of Python bytecode, an argument for all the time utilizing [closed, open) intervals, a discussion about building the monolith before microservices, a way to parse natural language time and date expressions, and a project for posting on Mastodon.

Topics:

  • 00:00:00 – Introduction
  • 00:02:30 – Always Use [closed, open) Intervals
  • 00:07:05 – Everyday Project Packaging With pyproject.toml
  • 00:15:38 – Sponsor: InfluxDB
  • 00:16:27 – How to Get a List of All Files in a Directory With Python
  • 00:20:37 – Python Bytecode Explained
  • 00:29:39 – Video Course Spotlight
  • 00:30:48 – Build the Modular Monolith First
  • 00:44:34 – toot – PyPI
  • 00:49:58 – quickadd: Parse Natural Language Time and Date Expressions
  • 00:53:09 – Thanks and goodbye

Show Links:

  • Always Use [closed, open) Intervals – “Intervals or ranges pop-up everywhere in the programming world. The classic example is picking a start and end date, like you would when booking an AirBnB or a flight. Have you ever wondered why they are always implemented as [closed, open) as opposed to [closed, closed]?”
  • On a regular basis Mission Packaging With pyproject.toml – On this Code Dialog video course, you’ll discover ways to package deal your on a regular basis initiatives with pyproject.toml. Taking part in on the identical staff because the import system means you’ll be able to name your venture from wherever, guarantee constant imports, and have one file that’ll work for a lot of construct programs.
  • The best way to Get a Checklist of All Recordsdata in a Listing With Python – On this tutorial, you’ll be analyzing a few strategies to get a listing of recordsdata and folders in a listing with Python. You’ll additionally use each strategies to recursively record listing contents. Lastly, you’ll look at a scenario that pits one technique towards the opposite.
  • Python Bytecode Defined – When a Python program is run, the interpreter first parses your code and checks for syntax errors, then it interprets it into bytecode directions. This text explains a few of the options of Python bytecode.

Dialogue:

Initiatives:

Further Hyperlinks:


Tweet
Share
Share
E-mail
class=”h4″>

Degree Up Your Python Expertise With These Programs:

« Browse All Episodes



RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments