Jul 14, 2023 50m
What rules do you have to contemplate when designing a Python library? How do you assemble a library API that’s comprehensible and simple to make use of? This week on the present, Christopher Trudeau is right here, bringing one other batch of PyCoder’s Weekly articles and tasks.
We share an article about constructing library APIs. The piece offers recommendation for package deal construction, naming, error dealing with, and extra. The creator guides you towards Pythonic rules by evaluating clunky vs elegant design examples.
Christopher discusses his current video course on Jinja templating. The course covers creating textual content recordsdata with programmatic content material and using wealthy templates to construction the entrance finish of Python internet purposes.
We cowl a number of different articles and tasks from the Python neighborhood, together with a number of information updates, the reason why membership assessments are quick for the
vary() operate, CLI instruments hidden within the Python customary library, a thread about the best method to set up Python, recipes for utilizing the Polars library, and a mission for characteristic flags inside Django.
This week’s episode is delivered to you by Snyk.
Course Highlight: Jinja Templating
With Jinja, you possibly can construct wealthy templates that energy the entrance finish of your internet purposes. However you need to use Jinja with no internet framework working within the background. Anytime you need to create textual content recordsdata with programmatic content material, Jinja might help you out.
- 00:00:00 – Introduction
- 00:02:16 – PyLadies Convention (Dec 2023) Name for Volunteers
- 00:02:32 – PSF Board Election Outcomes
- 00:03:47 – PSF Pronounces New Safety Developer in Residence
- 00:04:39 – Django Safety Releases Issued
- 00:04:50 – Deprecation of
bdist_eggUploads to PyPI
- 00:05:54 – Why Are Membership Assessments So Quick for
- 00:11:51 – CLI Instruments Hidden within the Python Commonplace Library
- 00:15:59 – Sponsor: Snyk
- 00:16:49 – Designing Pythonic Library APIs
- 00:28:27 – Jinja Templating
- 00:32:49 – Kill a Developer in 4 Phrases or Much less
- 00:37:28 – Video Course Highlight
- 00:38:51 – What’s “the best approach” to put in Python on a brand new M2 MacBook?
- 00:44:11 – polars-cookbook: Recipes for Utilizing Python’s Polars Library
- 00:46:48 – waffle: Function Flags for Django
- 00:49:54 – Thanks and goodbye
- Why Are Membership Assessments So Quick for
vary()in Python? – In Python,
vary()is mostly utilized in
forloops. Nevertheless, ranges have another use instances too, as they share many properties with lists. On this tutorial, you’ll discover why it’s so quick to carry out a membership take a look at on a Python vary.
- CLI Instruments Hidden within the Python Commonplace Library – There are a number of modules in Python which can be straight callable from the command line, together with the power to gzip and pretty-print JSON. This text introduces you to what choices can be found and the way Simon found them.
- Designing Pythonic Library APIs – This text summarizes rules that Ben has discovered helpful when designing Python library APIs. Matters embrace construction, naming, error dealing with, and kind annotations.
- Jinja Templating – With Jinja, you possibly can construct wealthy templates that energy the entrance finish of your internet purposes. However you need to use Jinja with no internet framework working within the background. Anytime you need to create textual content recordsdata with programmatic content material, Jinja might help you out.
Stage Up Your Python Expertise With These Programs: