Artwork

Konten disediakan oleh Michael Kennedy and Brian Okken. Semua konten podcast termasuk episode, grafik, dan deskripsi podcast diunggah dan disediakan langsung oleh Michael Kennedy and Brian Okken atau mitra platform podcast mereka. Jika Anda yakin seseorang menggunakan karya berhak cipta Anda tanpa izin, Anda dapat mengikuti proses yang diuraikan di sini https://id.player.fm/legal.
Player FM - Aplikasi Podcast
Offline dengan aplikasi Player FM !

#410 Entering the Django core

30:42
 
Bagikan
 

Manage episode 450848132 series 1305988
Konten disediakan oleh Michael Kennedy and Brian Okken. Semua konten podcast termasuk episode, grafik, dan deskripsi podcast diunggah dan disediakan langsung oleh Michael Kennedy and Brian Okken atau mitra platform podcast mereka. Jika Anda yakin seseorang menggunakan karya berhak cipta Anda tanpa izin, Anda dapat mengikuti proses yang diuraikan di sini https://id.player.fm/legal.
Topics covered in this episode:
Watch on YouTube
About the show

Sponsored by us! Support our work through:

Connect with the hosts

Join us on YouTube at pythonbytes.fm/live to be part of the audience. Usually Monday at 10am PT. Older video versions available there too.

Finally, if you want an artisanal, hand-crafted digest of every week of the show notes in email form? Add your name and email to our friends of the show list, we'll never share it.

Brian #1: Thoughts on Django’s Core

  • Carlton Gibson
  • Great discussion on
    • Django and Core vs Plugins
    • Sustainability with limited people
    • Keeping core small
    • The release cycle
    • eembrace plugins vs endorsing plugins.

Michael #2: futurepool

  • via Pat Decker
  • Takes the concept of multiprocessing Pool to the async/await world.
  • Create a pool then delegate the work:

    async with FuturePool(2) as fp: result = await fp.map(async_pool_fn, range(10)) 
  • I would LOVE to see something like this in a broader background asyncio worker pool concept.

  • But that concept doesn’t exist in asyncio in Python and that’s a failing of the framework IMO.

Brian #3: Don't return named tuples in new APIs

  • Brett Cannon
  • First off, I’m grateful for any post that talks about APIs and the API is a module, class, or package API and not a Web/REST API. The term API existed long before the internet.
  • “e.g., get_mouse_position() very likely has a two-item tuple of X and Y coordinates of the screen”
  • “it actually makes your API more complex for both you and your users to use. For you, it doubles the data access API surface for your return type as you have to now support index-based and attribute-based data access forever (or until you choose to break your users and change your return type so it doesn't support both approaches)”
  • “… you probably don't want people doing with your return type, like slicing, iterating over all the items …”
  • Alternatives
    • class
    • dataclass
    • dictionary
    • TypedDict
    • SimpleNamespace
  • “My key point in all of this is to prefer readability and ergonomics over brevity in your code. That means avoiding named tuples except where you are expanding to tweaking an existing API where the named tuple improves over the plain tuple that's already being used.”

Michael #4: Ziglang: Migrating from AWS to Self-Hosting

  • The Rust Foundation for example, reports that they spent $404,400 on infrastructure costs in 2023.
  • Zig lang has decided to use a single big cloud machine + mirrors

Extras

Brian:

  • Changing the Python Test community
    • Was started to answer questions for Test & Code listeners years ago.
    • Primarily pytest questions
    • Used to be Slack. Then moved to Podia forum.
    • Now I’m trying to work out a Discord solution that is both sustainable and usable.

Michael:

Joke: Breaking: JavaScript Developer Commits to Framework for Record-Breaking 3 Weeks

  continue reading

419 episode

Artwork

#410 Entering the Django core

Python Bytes

1,824 subscribers

published

iconBagikan
 
Manage episode 450848132 series 1305988
Konten disediakan oleh Michael Kennedy and Brian Okken. Semua konten podcast termasuk episode, grafik, dan deskripsi podcast diunggah dan disediakan langsung oleh Michael Kennedy and Brian Okken atau mitra platform podcast mereka. Jika Anda yakin seseorang menggunakan karya berhak cipta Anda tanpa izin, Anda dapat mengikuti proses yang diuraikan di sini https://id.player.fm/legal.
Topics covered in this episode:
Watch on YouTube
About the show

Sponsored by us! Support our work through:

Connect with the hosts

Join us on YouTube at pythonbytes.fm/live to be part of the audience. Usually Monday at 10am PT. Older video versions available there too.

Finally, if you want an artisanal, hand-crafted digest of every week of the show notes in email form? Add your name and email to our friends of the show list, we'll never share it.

Brian #1: Thoughts on Django’s Core

  • Carlton Gibson
  • Great discussion on
    • Django and Core vs Plugins
    • Sustainability with limited people
    • Keeping core small
    • The release cycle
    • eembrace plugins vs endorsing plugins.

Michael #2: futurepool

  • via Pat Decker
  • Takes the concept of multiprocessing Pool to the async/await world.
  • Create a pool then delegate the work:

    async with FuturePool(2) as fp: result = await fp.map(async_pool_fn, range(10)) 
  • I would LOVE to see something like this in a broader background asyncio worker pool concept.

  • But that concept doesn’t exist in asyncio in Python and that’s a failing of the framework IMO.

Brian #3: Don't return named tuples in new APIs

  • Brett Cannon
  • First off, I’m grateful for any post that talks about APIs and the API is a module, class, or package API and not a Web/REST API. The term API existed long before the internet.
  • “e.g., get_mouse_position() very likely has a two-item tuple of X and Y coordinates of the screen”
  • “it actually makes your API more complex for both you and your users to use. For you, it doubles the data access API surface for your return type as you have to now support index-based and attribute-based data access forever (or until you choose to break your users and change your return type so it doesn't support both approaches)”
  • “… you probably don't want people doing with your return type, like slicing, iterating over all the items …”
  • Alternatives
    • class
    • dataclass
    • dictionary
    • TypedDict
    • SimpleNamespace
  • “My key point in all of this is to prefer readability and ergonomics over brevity in your code. That means avoiding named tuples except where you are expanding to tweaking an existing API where the named tuple improves over the plain tuple that's already being used.”

Michael #4: Ziglang: Migrating from AWS to Self-Hosting

  • The Rust Foundation for example, reports that they spent $404,400 on infrastructure costs in 2023.
  • Zig lang has decided to use a single big cloud machine + mirrors

Extras

Brian:

  • Changing the Python Test community
    • Was started to answer questions for Test & Code listeners years ago.
    • Primarily pytest questions
    • Used to be Slack. Then moved to Podia forum.
    • Now I’m trying to work out a Discord solution that is both sustainable and usable.

Michael:

Joke: Breaking: JavaScript Developer Commits to Framework for Record-Breaking 3 Weeks

  continue reading

419 episode

Semua episode

×
 
Loading …

Selamat datang di Player FM!

Player FM memindai web untuk mencari podcast berkualitas tinggi untuk Anda nikmati saat ini. Ini adalah aplikasi podcast terbaik dan bekerja untuk Android, iPhone, dan web. Daftar untuk menyinkronkan langganan di seluruh perangkat.

 

Panduan Referensi Cepat