Planet Python

Subscribe to Planet Python feed
Planet Python - http://planetpython.org/
Updated: 11 hours 39 min ago

Real Python: The Real Python Podcast – Episode #232: Exploring Modern Sentiment Analysis Approaches in Python

Fri, 2024-12-20 07:00

What are the current approaches for analyzing emotions within a piece of text? Which tools and Python packages should you use for sentiment analysis? This week, Jodie Burchell, developer advocate for data science at JetBrains, returns to the show to discuss modern sentiment analysis in Python.

[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short & sweet Python Trick delivered to your inbox every couple of days. >> Click here to learn more and see examples ]

Categories: FLOSS Project Planets

Talk Python to Me: #489: Anaconda Toolbox for Excel and more with Peter Wang

Fri, 2024-12-20 03:00
Peter Wang has been pushing Python forward since the early days of its data science roots. We're lucky to have him back on the show. We're going to talk about the Anaconda Toolbox for Excel as well as many other trends and topics that are hot in the Python space right now. I'm sure you'll enjoy listening to the two of us exchanging our takes on the topics and trends.<br/> <br/> <strong>Episode sponsors</strong><br/> <br/> <a href='https://talkpython.fm/sentry'>Sentry Error Monitoring, Code TALKPYTHON</a><br> <a href='https://talkpython.fm/bluehost'>Bluehost</a><br> <a href='https://talkpython.fm/training'>Talk Python Courses</a><br/> <br/> <strong>Links from the show</strong><br/> <br/> <div><b>Peter on BSky</b>: <a href="https://bsky.app/profile/wang.social?featured_on=talkpython" target="_blank" >@wang.social</a><br/> <b>Michael on BSky</b>: <a href="https://bsky.app/profile/mkennedy.codes?featured_on=talkpython" target="_blank" >@mkennedy.codes</a><br/> <b>Michael's Curated BSky Starter List</b>: <a href="https://bsky.app/starter-pack/mkennedy.codes/3lbdnupl26e2x?featured_on=talkpython" target="_blank" >bsky.app</a><br/> <b>Python Blsky Starter Pack List</b>: <a href="https://blueskydirectory.com/starter-packs/all?q=python&featured_on=talkpython" target="_blank" >blueskydirectory.com</a><br/> <br/> <b>Anaconda Toolbox for Microsoft Excel</b>: <a href="https://www.anaconda.com/products/anaconda-toolbox?featured_on=talkpython" target="_blank" >anaconda.com</a><br/> <b>JupyterLite</b>: <a href="https://jupyter.org/try-jupyter/lab/?featured_on=talkpython" target="_blank" >jupyter.org</a><br/> <b>8 of the Biggest Excel Mistakes of All Time</b>: <a href="https://blog.hurree.co/8-of-the-biggest-excel-mistakes-of-all-time?featured_on=talkpython" target="_blank" >blog.hurree.co</a><br/> <b>The Five Demons of Python Packaging PyBay talk</b>: <a href="https://www.youtube.com/watch?v=qA7NVwmx3gw&ab_channel=SFPython" target="_blank" >youtube.com</a><br/> <b>PEP 759</b>: <a href="https://peps.python.org/pep-0759/?featured_on=talkpython" target="_blank" >peps.python.org</a><br/> <b>TIOBE Index</b>: <a href="https://www.tiobe.com/tiobe-index/?featured_on=talkpython" target="_blank" >tiobe.com</a><br/> <b>pyscript</b>: <a href="https://pyscript.net/?featured_on=talkpython" target="_blank" >pyscript.net</a><br/> <b>Watch this episode on YouTube</b>: <a href="https://www.youtube.com/watch?v=H2mFIZnVBok" target="_blank" >youtube.com</a><br/> <b>Episode transcripts</b>: <a href="https://talkpython.fm/episodes/transcript/489/anaconda-toolbox-for-excel-and-more-with-peter-wang" target="_blank" >talkpython.fm</a><br/> <br/> <b>--- Stay in touch with us ---</b><br/> <b>Subscribe to us on YouTube</b>: <a href="https://talkpython.fm/youtube" target="_blank" >youtube.com</a><br/> <b>Follow Talk Python on Mastodon</b>: <a href="https://fosstodon.org/web/@talkpython" target="_blank" ><i class="fa-brands fa-mastodon"></i>talkpython</a><br/> <b>Follow Michael on Mastodon</b>: <a href="https://fosstodon.org/web/@mkennedy" target="_blank" ><i class="fa-brands fa-mastodon"></i>mkennedy</a><br/></div>
Categories: FLOSS Project Planets

Python Morsels: Merging dictionaries in Python

Thu, 2024-12-19 17:10

Merging dictionaries in Python is usually as simple as a single pipe character.

Table of contents

  1. Merging dictionaries with | in Python
  2. Merging dictionaries with the update method
  3. Merging dictionaries with **
  4. The difference between | and **
  5. Handling duplicate keys when merging
  6. The | operator performs a "union" between dictionaries
  7. Join dictionaries with the | operator

Merging dictionaries with | in Python

First let's talk about the simplest way to merge dictionaries, which will usually be all that you need.

Here are two dictionaries:

>>> context = {"language": "en", "timezone": "UTC"} >>> more_context = {"title": "Home", "breadcrumbs": ["Home"]}

We'd like to make a new third dictionary that combines these two. This new dictionary should contain all the key-value pairs from both dictionaries.

The easiest way to do this is to use the pipe (|) operator:

>>> new_context = context | more_context

This made a new dictionary that contains all the items from both of the two initial dictionaries:

>>> new_context {'language': 'en', 'timezone': 'UTC', 'title': 'Home', 'breadcrumbs': ['Home']}

Using the | operator is basically the same as making a new empty dictionary, and then looping over all the items in the first dictionary and then all the items in the second dictionary, and adding all of them to the new dictionary:

>>> new_context = {} >>> for key, value in context.items(): ... new_context[key] = value ... >>> for key, value in more_context.items(): ... new_context[key] = value ... >>> new_context {'language': 'en', 'timezone': 'UTC', 'title': 'Home', 'breadcrumbs': ['Home']} Merging dictionaries with the update method

What if we wanted to …

Read the full article: https://www.pythonmorsels.com/merging-dictionaries/
Categories: FLOSS Project Planets

Quansight Labs Blog: LAPACK in your web browser: high-performance linear algebra with stdlib

Thu, 2024-12-19 14:41
Implementing LAPACK routines for numerical computation in web applications
Categories: FLOSS Project Planets

The Python Show: 50 - Imposter Syndrome

Thu, 2024-12-19 10:54

Imposter syndrome is a topic that some engineers and developers struggle with. It’s basically a type of self-doubt. WebMD has a good description and some good ideas for fighting self-doubt.

Ways to combat imposter syndrome:

  • List out your accomplishments on a regular basis (keep it in a Google doc)

  • Review the list

  • If you receive compliments, record them (make a copy, write it down, take a screenshot) and store those too

  • Reminder: you will never stop learning. Embrace it!

Sponsor

🚨 Python devs, this one’s for you. If you’re tired of struggling with context-unaware coding tools, let me introduce you to a game-changer I’ve been exploring: Zencoder.

Here’s why it’s caught my attention:

1️⃣ Python-friendly to its core. Whether you’re building web apps, analyzing data, or automating tasks, Zencoder delivers context-aware suggestions that actually understand your project. No more “guessing” code completions. But don't worry it supports other programming languages as well!

2️⃣ Custom AI agents you can create and tweak. Imagine having a bot that automates your repetitive Python tasks—refactoring, testing, debugging—leaving you free to tackle the fun parts.

3️⃣ Natural language to code magic. Want to build a quick game for fun or a Python script in seconds? Just describe it in plain English, and Zencoder makes it happen. (Yes, it’s that good.)

I’ve also been loving how it seamlessly supports unit testing and bug fixing—a massive time-saver for clean code lovers like me.

Check out Zencoder if you’re looking for an AI assistant that actually gets Python devs:

Zencoder

Categories: FLOSS Project Planets

Django Weblog: Django 6.x Steering Council Election Results

Wed, 2024-12-18 14:38

The Steering Council for the Django 6.x release cycle will be:

  • Carlton Gibson
  • Emma Delescolle
  • Frank Wiles
  • Lily Foote
  • Tim Schilling

Voting breakdown:

  • 400 eligible voters
  • 215 votes received (54%)

We had 400 eligible voters, and received 215 votes (54%). See the full voting breakdown on RankedVote.

Congratulations to the new council members! And thank you to all 12 candidates who stood for election, and everyone who took part in the voting.

For anyone looking for further opportunities to have their say on the future of Django, consider submitting our 2024 Django Developers survey, closing in 3 days.

Categories: FLOSS Project Planets

Real Python: Get Started With Django User Management

Wed, 2024-12-18 09:00

Django user management allows you to integrate user authentication and management into your web applications. By using Django, you can leverage the framework’s built-in authentication system to manage user registration, login, and logout. With just a few additional templates, you can enable users to reset and change their passwords independently.

This tutorial guides you through setting up a basic user management system with Django that you can extend later. You’ll learn how to create a dashboard, implement user registration, and connect authentication URLs, as well as customize templates for login, logout, and password management.

By the end of this tutorial, you’ll understand that:

  • Django’s user authentication is a built-in authentication system that comes with pre-configured URLs and views.
  • Authentication verifies user identity, while authorization determines user permissions within Django.
  • Registering as a user in Django requires setting up views, templates, and URLs.
  • Creating a login system in Django involves built-in authentication views and creating custom templates.
  • Resetting passwords in Django involves configuring email backends for sending reset links.

This tutorial focuses on user authentication and user management. If you want to learn more about permissions and groups, then you can check out the tutorial about managing users in Django’s admin site.

Get Your Code: Click here to download the free sample code you’ll use to set up a basic user management system with Django .

Start With the Basics

For bigger projects, you may consider creating a custom user model. In this tutorial, you’ll be using Django’s built-in user model. This is a great place to start to familiarize yourself with user authentication in general.

In this section of the tutorial, you’ll first create a small Django project with a users app. Then, you’ll make some adjustments to Django’s password validator to make your development more convenient. Finally, you’ll create an admin user to verify your setup.

Set Up the Django Project

It’s a good idea to use a virtual environment when working with Python projects. That way, you can always be sure that the python command points to the right version of Python and that the modules required by your project have the correct versions. To read more about creating virtual environments, check out Python Virtual Environments: A Primer.

Select your operating system below and use your platform-specific command to set up a virtual environment:

Windows PowerShell PS> python -m venv venv\ PS> .\venv\Scripts\activate (venv) PS> Copied! Shell $ python -m venv venv/ $ source venv/bin/activate (venv) $ Copied!

With the above commands, you create and activate a virtual environment named venv by using Python’s built-in venv module. The parenthesized (venv) in front of the prompt indicate that you’ve successfully activated the virtual environment.

Now that the environment is ready, you can install Django, start a new project, and create an application to store all your user management code:

Shell (venv) $ python -m pip install Django (venv) $ django-admin startproject user_auth_intro (venv) $ cd user_auth_intro (venv) $ python manage.py startapp users Copied!

In this example, you name your project user_auth_intro and your application users. To include the users app in your Django project, you need to add a reference to the app’s configuration class at the beginning of the INSTALLED_APPS list in settings.py:

Python user_auth_intro/settings.py 1# ... 2 3INSTALLED_APPS = [ 4 "users.apps.UsersConfig", 5 "django.contrib.admin", 6 "django.contrib.auth", 7 "django.contrib.contenttypes", 8 "django.contrib.sessions", 9 "django.contrib.messages", 10 "django.contrib.staticfiles", 11] 12 13# ... Copied!

By adding users.apps.UsersConfig, you let Django know that the users app you just created exists. If you have a look at the INSTALLED_APPS list, then you’ll spot Django’s default authentication system on line 6. In django.contrib.auth, Django stores the core of its authentication framework and the default models that you’ll build on later.

Next, apply the migrations and run the Django development server:

Shell (venv) $ python manage.py migrate (venv) $ python manage.py runserver Copied!

These commands create all default models in the database and start the Django development server.

Deactivate the Password Validator

By default, Django enforces strong passwords to make user accounts less prone to attacks. Since you’ll need to change passwords often throughout this tutorial, figuring out a strong password each time would be inconvenient.

Read the full article at https://realpython.com/django-user-management/ »

[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short & sweet Python Trick delivered to your inbox every couple of days. >> Click here to learn more and see examples ]

Categories: FLOSS Project Planets

Real Python: Quiz: How to Remove Items From Lists in Python

Wed, 2024-12-18 07:00

In this quiz, you’ll test your understanding of How to Remove Items From Lists in Python.

By working through this quiz, you’ll revisit the different approaches to removing items from a list in Python, including .pop(), .remove(), the del statement, and more.

[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short & sweet Python Trick delivered to your inbox every couple of days. >> Click here to learn more and see examples ]

Categories: FLOSS Project Planets

EuroPython: EuroPython 2025 is Staying in Prague 🎉 - Join as a Contributor!

Wed, 2024-12-18 03:00

&#x1F4C5; Save the Date: 14th - 20th July 2025 &#x1F4CD;


After an amazing year in Prague, we’re thrilled to announce that EuroPython 2025 is heading back to this beautiful city! &#x1F389; Mark your calendars for another epic week of learning, collaboration, and community vibes.

&#x1F680; What’s Happening?
  • &#x1F5D3;️ Monday & Tuesday (14th-15th): Tutorials & Workshops
  • &#x1F3A4; Wednesday to Friday (16th-18th): Main Conference Talks
  • &#x1F468;‍&#x1F4BB; Saturday & Sunday (19th-20th): Community Sprints
&#x1F914; What would you like to see at EuroPython?

We’d love to hear your thoughts! We’ve put together a short form with just three quick questions—it’ll take less than a few minutes to complete. Your input will help us make EuroPython 2025 an amazing experience for everyone! 

&#x1F449; Form: https://forms.gle/Ne2FFd26MVqHKNa16

&#x1F91D; Join Us as a Contributor!

EuroPython thrives on the energy of passionate volunteers. &#x1F4AA; Whether you’re experienced or joining for the first time, we’d love to have you on board!

&#x1F5D3;️ Deadline to Apply: Sunday, 22nd
&#x1F4DD; Fill out the form: https://forms.gle/kY7jqSJTjEhFccWJ6

POV: You are just a chill EuroPython Volunteer&#x1F4BC; Want to Sponsor?

EuroPython is one of Europe’s largest Python community conferences, and we couldn’t do it without our amazing sponsors! &#x1F91D; Interested? Reach out to us at sponsoring@europython.eu.

&#x1F4E3; Stay Updated!

&#x1F517; Visit our website: https://ep2025.europython.eu/
&#x1F4EC; Subscribe to our newsletter for the latest updates

We can’t wait to see you in Prague next year! &#x1F1E8;&#x1F1FF;✨

Mia, on behalf of the EuroPython Organizing Team

Categories: FLOSS Project Planets

Wingware: Wing Python IDE Version 10.0.8 - December 18, 2024

Tue, 2024-12-17 20:00

This release fixes AI Chat to continue to work after OpenAI drops v1 API support this month, uses the configured AI model also for AI Chat, fixes the debugger to work when two or more versions of Python are loaded into a process, improves OpenAI Assistant, File, and Vector Store resource management, reduces debugger stack space usage, fixes using ${WING:PROJECT_DIR} and other environment variable references in a Python File OS Commands, and fixes several other minor usage issues.

See the change log for details.

Important Note: Users of the AI Chat beta in Wing version 10.0.7.1 and earlier may find many untitled Vector Stores in their OpenAI account, which were left as a side effect of Wing's earlier use of the beta Assistants API. OpenAI may start charging for these or other resources in your OpenAI account at the end of 2024. These resources can be removed by invoking internal-ai-delete-resources(untitled_vector_stores=True) from the Edit > Command by Name menu. This runs in the background, may take several minutes to finish, and will be terminated if Wing is quit before it completes. Use caution if you have other applications that call OpenAI's Assistants API, as this cannot distinguish the Vector Stores created by Wing and other applications. Once resources have been deleted, you will need to restart all instances of Wing before AI Chat will work again. Afterward, you should not see any further accumulation of Vector Stores or other resources in your OpenAI account, other than those that are actively in use. However, please note that Wing's AI Chat is based on API that is still being flagged as 'beta' by OpenAI.

Download Wing 10 Now: Wing Pro | Wing Personal | Wing 101 | Compare Products


What's New in Wing 10

AI Assisted Development

Wing Pro 10 takes advantage of recent advances in the capabilities of generative AI to provide powerful AI assisted development, including AI code suggestion, AI driven code refactoring, description-driven development, and AI chat. You can ask Wing to use AI to (1) implement missing code at the current input position, (2) refactor, enhance, or extend existing code by describing the changes that you want to make, (3) write new code from a description of its functionality and design, or (4) chat in order to work through understanding and making changes to code.

Examples of requests you can make include:

"Add a docstring to this method" "Create unit tests for class SearchEngine" "Add a phone number field to the Person class" "Clean up this code" "Convert this into a Python generator" "Create an RPC server that exposes all the public methods in class BuildingManager" "Change this method to wait asynchronously for data and return the result with a callback" "Rewrite this threaded code to instead run asynchronously"

Yes, really!

Your role changes to one of directing an intelligent assistant capable of completing a wide range of programming tasks in relatively short periods of time. Instead of typing out code by hand every step of the way, you are essentially directing someone else to work through the details of manageable steps in the software development process.

Read More

Support for Python 3.12, 3.13, and ARM64 Linux

Wing 10 adds support for Python 3.12 and 3.13, including (1) faster debugging with PEP 669 low impact monitoring API, (2) PEP 695 parameterized classes, functions and methods, (3) PEP 695 type statements, and (4) PEP 701 style f-strings.

Wing 10 also adds support for running Wing on ARM64 Linux systems.

Poetry Package Management

Wing Pro 10 adds support for Poetry package management in the New Project dialog and the Packages tool in the Tools menu. Poetry is an easy-to-use cross-platform dependency and package manager for Python, similar to pipenv.

Ruff Code Warnings & Reformatting

Wing Pro 10 adds support for Ruff as an external code checker in the Code Warnings tool, accessed from the Tools menu. Ruff can also be used as a code reformatter in the Source > Reformatting menu group. Ruff is an incredibly fast Python code checker that can replace or supplement flake8, pylint, pep8, and mypy.


Try Wing 10 Now!

Wing 10 is a ground-breaking new release in Wingware's Python IDE product line. Find out how Wing 10 can turbocharge your Python development by trying it today.

Downloads: Wing Pro | Wing Personal | Wing 101 | Compare Products

See Upgrading for details on upgrading from Wing 9 and earlier, and Migrating from Older Versions for a list of compatibility notes.

Categories: FLOSS Project Planets

Michael Foord: New Course: Object Oriented Programming Theory with Python

Tue, 2024-12-17 19:00

A practical two day course on the object oriented features of Python. Perfect for programmers with some experience of Python looking to use objects and classes and to understand them. An excellent course for data scientists, devops engineers and those self taught with Python looking to move beyond scripting into programming.

Course Contents

Fundamentals: Classes and methods

  • Computer architecture and programming languages
  • Python as a high-level, object-oriented language
  • Objects as abstractions, for thinking
  • The class statement
  • The explicit self
  • The initialiser method __init__
  • Bound methods
  • Attributes and the built-in attribute access functions
  • References and assignment (how Python works)
  • Mutable objects (and call by object)
  • Object copying

Object Oriented Features

  • Class attributes
  • Class methods
  • Properties
  • Private attributes
  • Single inheritance
  • Inheritance to extend and modify the parent
  • The use of super
  • Cooperative multiple inheritance
  • Mixin Classes
  • Attribute lookup and the method resolution order
  • The type system: isinstance and issubclass

Inside Python Objects

  • The instance dictionary
  • Slots
  • Class dictionaries
  • The descriptor protocol

Python Protocols

  • Magic methods and Python protocols
  • Operator overloading
  • The string representation protocol
  • The container protocols
  • Implementing custom containers
  • Inheriting from collections.abc.MutableSequence

Alternative Approaches

  • namedtuples
  • dataclasses
  • type as a class factory

Object oriented theory:

  • History of Object Oriented Programming
  • The pillars of OOP
  • Abstraction
  • Inheritance
  • Encapsulation
  • Polymorphism
  • Object oriented design principles
  • Design patterns
  • The Liskov Substitution Principle
  • Composition versus inheritance

Optional advanced section (third day):

  1. Advanced OOP Concepts

    • Interfaces and API design
    • Abstract base classes and protocols
    • Type hints and static typing with mypy
    • Class decorators
    • Decoration via inheritance with __init_sublass__
    • Metaclasses
    • Context managers and the with statement
    • Weak references and destructors
    • The descriptor protocol
  2. OOP Design Principles

    • SOLID principles
    • Law of Demeter
    • Liskov Substitution Principle
    • Composition vs inheritance
    • Domain Driven Design
    • Test Driven Development
    • Stop writing classes
    • The hexagon pattern (microservices)
    • The C4 Model for system architecture
Categories: FLOSS Project Planets

Michael Foord: New Course: Secure Python Web Application Development

Tue, 2024-12-17 19:00

This two day course covers Full Stack Security with the Defence in Depth approach. It covers important security principles, and mitigating specific vulnerabilities including The OWASP Top Ten, but is focused on secure Python web application development.

Course Contents

This is a practical and hands on, two day, course. Learn how to use the security tools that come in the Python standard library. Modules covered include:

  • hashlib
  • hmac
  • secrets
  • random
  • socket
  • ssl

Web application frameworks:

  • Security features in web application frameworks for API servers and web applications
  • How to secure data in Django, Flask and other popular web application frameworks
  • Secure deployment practises with containers and application servers (WSGI or ASGI)

Third party libraries for cryptography and secure network access:

  • authlib
  • cryptography
  • httpx and requests
  • websocket
  • jwt
  • OpenZiti for application level zero trust architecture
  • certifi for TLS certification verification

Tooling for secure Python development and as part of your CI pipelines:

  • uv/pipenv
  • pip-audit
  • bandit
  • ruff
  • mypy
  • dependabot/renovate
  • Security testing

Network security with TLS:

  • How, why and when to use TLS
  • How TLS works
  • mTLS for enhanced security
  • Generating self-signed certificates for local development, with the cryptography library

Michael Foord has been a Python application developer for over twenty years, is a Python core developer and the creator of unittest.mock in the Python standard library, and is the author of The Absolute Minimum Every Python Web Application Developer Must Know About Security.

Topics Covered: Core Python Security Fundamentals
  • Security principles and defence in depth strategies with Python frameworks
  • Implementing OWASP Top 10 protections in Django, Flask and FastAPI applications
  • Security principles and defence in depth strategies
  • Principles from The OWASP Web Security Testing Guide
  • Threat modelling and the security requirements document
  • The principles of least privilege and deny by default
  • Zero trust architecture fundamentals
  • Building zero trust architecture with OpenZiti’s Python SDK
Cryptography and Data Security
  • Hashing, encryption, and digital signatures
  • Symmetric encryption and public key encryption
  • Secure password storage and management
  • Using Python’s hashlib and hmac modules for secure hashing
  • Using Python’s cryptography libraries correctly
  • Data encryption at rest and in transit
  • Data encryption at rest using Django’s encrypted model fields and SQLAlchemy StringEncryptedType
Authentication and Authorization
  • Secure session management
  • OAuth 2.0 and JWT for authentication
  • Oauth2 with the Python library authlib
  • JWT handling with PyJWT and managing token lifecycles
  • Role-based access control (RBAC), plus alternatives
  • Multi-factor authentication
  • Managing access tokens and permissions
Secure Coding Practices
  • Proven security with modern cryptography algorithms
  • Protection against SQL injection
  • Input validation and sanitisation
  • Using secrets vs random for cryptographic operations
  • Sanitizing logs in Python applications
  • Django template escaping and Flask/Jinja2 for XSS prevention
  • Preventing timing attacks and token prediction attacks
  • Cryptographically secure randomness
  • Cross-site scripting (XSS) prevention
  • Cross-site request forgery (CSRF) protection
  • Secure file handling and upload validation
  • Preventing TLS downgrade attacks
Network Security
  • Networking fundamentals
  • TLS/SSL implementation and certificate management
  • Secure API design and implementation
  • WebSocket security
  • Network architecture and segmentation
  • Firewalls, routers, network interfaces
  • Protocols, HTTP & TLS, with the Python standard library
  • Application deployment
  • Software Defined Networking
Infrastructure Security
  • Container security best practices
  • Secure deployment patterns
  • Network interfaces and routing
  • Building DMZ architectures for Python web applications
  • Virtual private networks (VPN)
Security Tools and Testing
  • Static analysis with bandit and ruff
  • Dependency scanning using pip-audit
  • Automated security testing integration
  • Container scanning and runtime protection
  • Code review practices for security
Operational Security
  • Live security alerts
  • Statutory duties around security
  • Monitoring Python applications for security issues
  • Security patch management for Python applications
  • Updating and patching strategies

The course includes practical exercises throughout, with participants implementing secure coding patterns, identifying vulnerabilities in sample code, and building secure components.

Categories: FLOSS Project Planets

PyCoder’s Weekly: Issue #660 (Dec. 17, 2024)

Tue, 2024-12-17 14:30

#660 – DECEMBER 17, 2024
View in Browser »

PyMyFlySpy: Track Your Flight Using Its Headrest Data

Robert is the creator of PySkyWiFi, a “completely free, unbelievably stupid wi-fi on long-haul flights” and he is back. This time getting flight data information if you aren’t on a plane with seat-back monitors showing you where you are.
ROBERT HEATON

Python Set Comprehensions: How and When to Use Them

In this tutorial, you’ll learn how to write set comprehensions in Python. You’ll also explore the most common use cases for set comprehensions and learn about some bad practices that you should avoid when using them in your code.
REAL PYTHON

Free Workshop: Temporal 101 With Python

🚀 Unlock power of Temporal in our Python 101 Workshop on January 8th! Join us to explore how to build resilient workflows effortlessly, handle complex scenarios, and automate tasks like a pro. Perfect for developers of all skill levels. Reserve your spot and elevate your coding game →
TEMPORAL TECHNOLOGIES sponsor

Typed Python in 2024

This article discusses the results from a survey on the usage of Typing features in Python. It discusses how much the feature has been adopted and what stands in coders’ way of using it.
AARON POLLACK

JupyterLab 4.3 and Notebook 7.3 Are Available!

JUPYTER.ORG

PEP 757: C API to Import-Export Python Integers (Accepted)

PYTHON.ORG

NumPy Release 2.2.0

GITHUB.COM/NUMPY

PSF Year End Fundraiser / Membership Drive

PYTHON.ORG

Articles & Tutorials Check if a Point Is in a Cylinder

Luke’s current project requires a fair amount of geometry. He wasn’t happy with solutions posted on the web so her wrote his own. This article covers the geometry involved in finding if a point is in a cylinder and the corresponding Python code to do the calculation.
LUKE PLANT

Build Your Own AI Assistant with Edge AI

Simplify workloads and elevate customer service. Build customized AI assistants that respond to voice prompts with powerful language and comprehension capabilities. Personalized AI assistance based on your unique needs with Intel’s OpenVINO toolkit.
INTEL CORPORATION sponsor

Customising Pattern Matching Behaviour

Jamie has been doing the Advent of Code and two techniques that come up a lot in Python are iteration and pattern matching. This post talks about how they don’t work well together and what you can do about it.
JAMIE CHANG

Major Releases of Plotly and Dash

Four of Plotly’s open-source libraries are getting major releases. Includes: lightning-fast server-side performance with Narwhals in Plotly.py, a new hooks system for Dash, a new design for Kaleido, and more.
PLOTLY.COM • Shared by Marco Gorelli

The State of Python 2024

This is a guest post on the PyCharm blog by Talk Python host Michael Kennedy who talks about the current state of Python in 2024. Topics include language usage, web frameworks, uv, and more.
MICHAEL KENNEDY

PEP 768: Safe External Debugger Interface for CPython

“This PEP proposes adding a zero-overhead debugging interface to CPython that allows debuggers and profilers to safely attach to running Python processes.”
PYTHON.ORG

Trusted Publishing

It has never been easier to publish your Python packages. This post explains how to setup a workflow that uses Trusted Publishing through GitHub Actions.
CHRISTIAN LEDERMANN

Lazy Self-Installing Python Scripts With uv

This post talks about how to manage all of your one-off small scripts using uv, especially if they have need of third party libraries.
TREY HUNNER

Django 2024 Year in Review

Carlton is a core contributor to Django and this post talks about what happened in 2024 with your favorite web framework.
CARLTON GIBSON

Multimodal Data With LanceDB

Talk Python interviews Chang She and they talk about LanceDB, and open source database for AI.
KENNEDY & SHE podcast

Write pydantic Testing Models as Dictionaries

GITHUB.COM/KKLUONAITIS • Shared by Karolis Kluonaitis podcast

Projects & Code Bagels: Powerful TUI Expense Tracker

GITHUB.COM/ENHANCEDJAX

moka-py: High Performance Caching Library

GITHUB.COM/DELIRO

ridgeplot: Beautiful Ridgeline Plots in Python

GITHUB.COM/TPVASCONCELOS

ddmin-python: Python Version of Delta Debugging Tool

GITHUB.COM/ANDREWCHAMBERS

django-removals: Check for Django Removals and Deprecations

GITHUB.COM/AMBIENT-INNOVATION

Events Weekly Real Python Office Hours Q&A (Virtual)

December 18, 2024
REALPYTHON.COM

PyData Bristol Meetup

December 19, 2024
MEETUP.COM

PyLadies Dublin

December 19, 2024
PYLADIES.COM

Chattanooga Python User Group

December 20 to December 21, 2024
MEETUP.COM

PyKla Monthly Meetup

December 25, 2024
MEETUP.COM

SPb Python Drinkup

December 26, 2024
MEETUP.COM

Happy Pythoning!
This was PyCoder’s Weekly Issue #660.
View in Browser »

[ Subscribe to 🐍 PyCoder’s Weekly 💌 – Get the best Python news, articles, and tutorials delivered to your inbox once a week >> Click here to learn more ]

Categories: FLOSS Project Planets

Real Python: Programming Sockets in Python

Tue, 2024-12-17 09:00

Sockets and the socket API are used to send messages across a network. They provide a form of inter-process communication (IPC). The network can be a logical, local network to the computer, or one that’s physically connected to an external network with its own connections to other networks. The obvious example is the Internet, which you connect to via your ISP.

In this video course, you’ll create:

  • A simple socket server and client
  • An improved version that handles multiple connections simultaneously
  • A server-client application that functions like a full-fledged socket application, complete with its own custom header and content

[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short & sweet Python Trick delivered to your inbox every couple of days. >> Click here to learn more and see examples ]

Categories: FLOSS Project Planets

Python Insider: Python 3.14.0 alpha 3 is out

Tue, 2024-12-17 06:30

O Alpha 3, O Alpha 3, how lovely are your branches!

https://www.python.org/downloads/release/python-3140a3/

This is an early developer preview of Python 3.14

Major new features of the 3.14 series, compared to 3.13

Python 3.14 is still in development. This release, 3.14.0a3, is the third of seven planned alpha releases.

Alpha releases are intended to make it easier to test the current state of new features and bug fixes and to test the release process.

During the alpha phase, features may be added up until the start of the beta phase (2025-05-06) and, if necessary, may be modified or deleted up until the release candidate phase (2025-07-22). Please keep in mind that this is a preview release and its use is not recommended for production environments.

Many new features for Python 3.14 are still being planned and written. Among the new major new features and changes so far:

The next pre-release of Python 3.14 will be 3.14.0a4, currently scheduled for 2025-01-14.

More resources And now for something completely different

A mince pie is a small, round covered tart filled with “mincemeat”, usually eaten during the Christmas season – the UK consumes some 800 million each Christmas. Mincemeat is a mixture of things like apple, dried fruits, candied peel and spices, and originally would have contained meat chopped small, but rarely nowadays. They are often served warm with brandy butter.

According to the Oxford English Dictionary, the earliest mention of Christmas mince pies is by Thomas Dekker, writing in the aftermath of the 1603 London plague, in Newes from Graues-end: Sent to Nobody (1604):

Ten thousand in London swore to feast their neighbors with nothing but plum-porredge, and mince-pyes all Christmas.

Here’s a meaty recipe from Rare and Excellent Receipts, Experienc’d and Taught by Mrs Mary Tillinghast and now Printed for the Use of her Scholars Only (1678):

  1. How to make Mince-pies.

To every pound of Meat, take two pound of beef Suet, a pound of Corrants, and a quarter of an Ounce of Cinnamon, one Nutmeg, a little beaten Mace, some beaten Colves, a little Sack & Rose-water, two large Pippins, some Orange and Lemon peel cut very thin, and shred very small, a few beaten Carraway-seeds, if you love them the Juyce of half a Lemon squez’d into this quantity of meat; for Sugar, sweeten it to your relish; then mix all these together and fill your Pie. The best meat for Pies is Neats-Tongues, or a leg of Veal; you may make them of a leg of Mutton if you please; the meat must be parboyl’d if you do not spend it presently; but if it be for present use, you may do it raw, and the Pies will be the better.

Enjoy the new release

Thanks to all of the many volunteers who help make Python Development and these releases possible! Please consider supporting our efforts by volunteering yourself or through organisation contributions to the Python Software Foundation.

Regards from a snowy and slippery Helsinki,

Your release team,
Hugo van Kemenade
Ned Deily
Steve Dower
Łukasz Langa

Categories: FLOSS Project Planets

Glyph Lefkowitz: DANGIT

Mon, 2024-12-16 17:58

Over the last decade, it has become a common experience to be using a social media app, and to perceive that app as saying something specific to you. This manifests in statements like “Twitter thinks Rudy Giuliani has lost his mind”, “Facebook is up in arms about DEI”, “Instagram is going crazy for this new water bottle”, “BlueSky loves this bigoted substack”, or “Mastodon can’t stop talking about Linux”. Sometimes this will even be expressed with “the Internet” as a metonym for the speaker’s preferred social media: “the Internet thinks that Kate Middleton is missing”.

However, even the smallest of these networks comprises literal millions of human beings, speaking dozens of different languages, many of whom never interact with each other at all. The hot takes that you see from a certain excitable sub-community, on your particular timeline or “for you” page, are not necessarily representative of “the Internet” — at this point, a group that represents a significant majority of the entire human population.

If I may coin a phrase, I will refer to these as “Diffuse, Amorphous, Nebulous, Generalized Internet Takes”, or DANGITs, which handily evokes the frustrating feeling of arguing against them.

A DANGIT is not really a new “internet” phenomenon: it is a specific expression of the availability heuristic.

If we look at our device and see a bunch of comments in our inbox, particularly if those comments have high salience via being recent, emotive, and repeated, we will naturally think that this is what The Internet thinks. However, just because we will naturally think this does not mean that we will accurately think it.

It is worth keeping this concept in mind when participating in public discourse because it leads to a specific type of communication breakdown. If you are arguing with a DANGIT, you will feel like you are arguing with someone with incredibly inconsistent, hypocritical, and sometimes even totally self-contradictory views. But to be self-contradictory, one needs to have a self. And if you are arguing with 9 different people from 3 different ideological factions, all making completely different points and not even taking time to agree on the facts beforehand, of course it’s going to sound like cacophonous nonsense. You’re arguing with the cacophony, it’s just presented to you in a way that deceives you into thinking that it’s one group.

There are subtle variations on this breakdown; for example, it can also make people’s taste seem incoherent. If it seems like one week the Interior Designer internet loves stark Scandinavian minimalism, and the next week baroque Rococo styles are making a comeback, it might seem like The Internet has no coherent sense of taste, and these things don’t go together. That’s because it doesn’t! Why would you expect it to?

Most likely, you are simply seeing some posts from minimalists, and then, separately, some posts from Rococo aficionados. Any particular person’s feed may be dedicated to a specific, internally coherent viewpoint, aesthetic, or ideology, but if you dump them all into a blender to separate them from their context, of course they will look jumbled together.

This is what social media does. It is context collapse as a service. Even if you eliminate engagement-maximizing algorithms and view everything perfectly chronologically, even if you have the world’s best trust & safety team making sure that there is nothing harmful and no disinformation, social media — like email — inherently remains that context-collapsing blender. There’s no way for it not to be; if two people you follow, who do not follow and are not aware of each other, are both posting unrelated things at the same time, you’re going to see them at around the same time.

Do not argue with a DANGIT. Discussions are the internet are famously Pyrrhic battles to begin with, but if you argue with a DANGIT it’s not that you will achieve a Pyrrhic victory, you cannot possibly achieve any victory, because you are shadowboxing an imagined consensus where none exits.

You can’t win against something that isn’t there.

Acknowledgments

Thank you to my patrons who are supporting my writing on this blog. If you like what you’ve read here and you’d like to read more things like it, or you’d like to support my various open-source endeavors, you can support my work as a sponsor!

Categories: FLOSS Project Planets

Mike Driscoll: The Python Countdown to Christmas 2024 Giveaway

Mon, 2024-12-16 15:41

Happy Holidays and Merry Christmas from me to you! I have been giving away hundreds of Python books and courses for Christmas for the last couple of years!

https://www.blog.pythonlibrary.org/wp-content/uploads/2024/12/Countdown-to-christmas-1.mp4

From now until Christmas, I will be giving away hundreds more. You can start learning Python for free using my books or courses.

All you have to do is follow me on one of these platforms and watch out for my post that describes how to get a free book or course:

The post The Python Countdown to Christmas 2024 Giveaway appeared first on Mouse Vs Python.

Categories: FLOSS Project Planets

Real Python: Dictionaries in Python

Mon, 2024-12-16 09:00

Python dictionaries are a powerful built-in data type that allows you to store key-value pairs for efficient data retrieval and manipulation. Learning about them is essential for developers who want to process data efficiently. In this tutorial, you’ll explore how to create dictionaries using literals and the dict() constructor, as well as how to use Python’s operators and built-in functions to manipulate them.

By learning about Python dictionaries, you’ll be able to access values through key lookups and modify dictionary content using various methods. This knowledge will help you in data processing, configuration management, and dealing with JSON and CSV data.

By the end of this tutorial, you’ll understand that:

  • A dictionary in Python is a mutable collection of key-value pairs that allows for efficient data retrieval using unique keys.
  • Both dict() and {} can create dictionaries in Python. Use {} for concise syntax and dict() for dynamic creation from iterable objects.
  • dict() is a class used to create dictionaries. However, it’s commonly called a built-in function in Python.
  • .__dict__ is a special attribute in Python that holds an object’s writable attributes in a dictionary.
  • Python dict is implemented as a hashmap, which allows for fast key lookups.

To get the most out of this tutorial, you should be familiar with basic Python syntax and concepts such as variables, loops, and built-in functions. Some experience with basic Python data types will also be helpful.

Get Your Code: Click here to download the free sample code that you’ll use to learn about dictionaries in Python.

Take the Quiz: Test your knowledge with our interactive “Python Dictionaries” quiz. You’ll receive a score upon completion to help you track your learning progress:

Interactive Quiz

Python Dictionaries

Test your understanding of Python dictionaries

Getting Started With Python Dictionaries

Dictionaries are one of Python’s most important and useful built-in data types. They provide a mutable collection of key-value pairs that lets you efficiently access and mutate values through their corresponding keys:

Python >>> config = { ... "color": "green", ... "width": 42, ... "height": 100, ... "font": "Courier", ... } >>> # Access a value through its key >>> config["color"] 'green' >>> # Update a value >>> config["font"] = "Helvetica" >>> config { 'color': 'green', 'width': 42, 'height': 100, 'font': 'Helvetica' } Copied!

A Python dictionary consists of a collection of key-value pairs, where each key corresponds to its associated value. In this example, "color" is a key, and "green" is the associated value.

Dictionaries are a fundamental part of Python. You’ll find them behind core concepts like scopes and namespaces as seen with the built-in functions globals() and locals():

Python >>> globals() { '__name__': '__main__', '__doc__': None, '__package__': None, ... } Copied!

The globals() function returns a dictionary containing key-value pairs that map names to objects that live in your current global scope.

Python also uses dictionaries to support the internal implementation of classes. Consider the following demo class:

Python >>> class Number: ... def __init__(self, value): ... self.value = value ... >>> Number(42).__dict__ {'value': 42} Copied!

The .__dict__ special attribute is a dictionary that maps attribute names to their corresponding values in Python classes and objects. This implementation makes attribute and method lookup fast and efficient in object-oriented code.

You can use dictionaries to approach many programming tasks in your Python code. They come in handy when processing CSV and JSON files, working with databases, loading configuration files, and more.

Python’s dictionaries have the following characteristics:

  • Mutable: The dictionary values can be updated in place.
  • Dynamic: Dictionaries can grow and shrink as needed.
  • Efficient: They’re implemented as hash tables, which allows for fast key lookup.
  • Ordered: Starting with Python 3.7, dictionaries keep their items in the same order they were inserted.

The keys of a dictionary have a couple of restrictions. They need to be:

  • Hashable: This means that you can’t use unhashable objects like lists as dictionary keys.
  • Unique: This means that your dictionaries won’t have duplicate keys.

In contrast, the values in a dictionary aren’t restricted. They can be of any Python type, including other dictionaries, which makes it possible to have nested dictionaries.

It’s important to note that dictionaries are collections of pairs. So, you can’t insert a key without its corresponding value or vice versa. Since they come as a pair, you always have to insert a key with its corresponding value.

Note: In some situations, you may want to add keys to a dictionary without deciding what the associated value should be. In those cases, you can use the .setdefault() method to create keys with a default or placeholder value.

Read the full article at https://realpython.com/python-dicts/ »

[ Improve Your Python With 🐍 Python Tricks 💌 – Get a short & sweet Python Trick delivered to your inbox every couple of days. >> Click here to learn more and see examples ]

Categories: FLOSS Project Planets

PyCharm: 7 Reasons You Should Use dbt Core in PyCharm

Mon, 2024-12-16 07:58

dbt Core is a modern data transformation framework. It doesn’t extract or load data and is only responsible for the T in the ELT (extract-load-transform) process. dbt connects to your data warehouse and helps you prepare your data so it can later be used to answer business questions.

In this blog post, we’ll talk about the top benefits of dbt and the advantages of using it in PyCharm Professional. To make the most of these features, you should be familiar with the framework. If you know SQL well, you’ll likely find it easy to use, and if you are a total novice in the field, you can use the dbt portal to get acquainted with it.

Why you should use dbt
  • Modularity and code reusability – Transformations can be saved into modular, reusable models. For instance, in this example the model int_count_customer.sql has a reference to stg_day_customer.sql and reuses its code.
  • Versioning – dbt projects can be stored in version control systems like Git or GitHub. This allows you to track changes, collaborate with other team members, and maintain a record of all transformations.
  • Testing – dbt allows you to write tests for your data models easily and check whether the data has any duplicates or null values. Additionally, you can even create specific rules to test against, and you can perform tests on both the model and the project levels.
  • Documentation – dbt auto-generates documentation for data models, ensuring that team members and stakeholders all understand the data lineage and model definitions in the same way.

To summarize, dbt brings best practices in engineering to the field of data analysis, allowing you to produce higher-quality results while providing you with a straightforward and intuitive workflow.

These benefits are just the tip of the iceberg when it comes to what the tool can do.

How PyCharm streamlines your dbt workflow

Having established the benefits of dbt, we can now turn to the 7 key reasons to use it in PyCharm:

1. User-friendly onboarding – PyCharm streamlines the initial setup. As demonstrated in this video, setting up a project and configuring the necessary settings is straightforward. 

2. Unified workspace for databases and dbt – PyCharm’s integrated database plugin powered by JetBrains DataGrip makes handling SQL databases significantly easier. Since it’s compatible with all databases that dbt works with, you don’t have to worry about juggling multiple tools. You can focus on data modeling and instantly view outcomes all in one place. To cover even a small number of the plugin’s features would take hours, but luckily we have a nice set of webinars dedicated to PyCharm’s functionality for databases:  Visual SQL Development with PyCharm.

3. Git and dbt integration – In one interface, you can easily clone the repo, track any changes, manage branches, resolve conflicts, and collaborate with teammates.

4. Autocompletion for your .yml  and jinja-template SQL files – People love using PyCharm because of its smart autocompletion, which it, of course, offers for dbt as well.

5. Local history –This feature lets you undo recent changes if they cause problems. You can also compare different versions to see what was changed and check whether updates were made correctly.

6. AI Assistant – AI Assistant is really helpful, especially if you’re just starting with dbt Core. It is context-aware, and in addition to having it answer your questions in the AI chat, you can have it generate code and fix problems for you, streamlining your work with data models. It also saves you from worrying about what to write in commit messages by composing them for you.

7. Project navigation – PyCharm excels in project navigation, offering features like fast search functionality and the Go to Declaration feature, both of which allow you to navigate through your dbt models effortlessly.

That’s just a glimpse of the benefits PyCharm already offers for dbt, and our support is still in its early stages. We invite you to test it out and share your insights. Whether you have suggestions for features or want to let us know about areas for improvement, we’re eager to hear from you. 

Get started with PyCharm by using the promo code dbt-PyCharm to get a 3-month free trial.

Redeem your code

Want to learn how to use dbt in PyCharm? Head to the documentation page to learn more about the IDE’s dbt support.

Eager to learn more about dbt in general? Take a look at this post on the experience of using dbt and this analysis of deeper dbt concepts by Pavel Finkelshteyn.

Categories: FLOSS Project Planets

Python Bytes: #414 Because we are not monsters

Mon, 2024-12-16 03:00
<strong>Topics covered in this episode:</strong><br> <ul> <li><strong><a href="https://micro.webology.dev/2024/12/14/new-project-to.html?featured_on=pythonbytes">New project to shorten django-admin to django because we are not monsters</a></strong></li> <li><strong><a href="https://github.com/adamghill/django-unicorn?featured_on=pythonbytes">django-unicorn</a>: The magical reactive component framework for Django <img src="https://paper.dropboxstatic.com/static/img/ace/emoji/2728.png?version=8.0.0" alt="sparkles" /></strong></li> <li><strong><a href="https://nedbatchelder.com/blog/202412/testing_some_tidbits.html?featured_on=pythonbytes">Testing some tidbits</a></strong></li> <li><strong><a href="https://blog.jetbrains.com/pycharm/2024/12/the-state-of-python/?featured_on=pythonbytes">The State of Python 2024 article</a></strong></li> <li><strong>Extras</strong></li> <li><strong>Joke</strong></li> </ul><a href='https://www.youtube.com/watch?v=y1_HzSE83jc' style='font-weight: bold;'data-umami-event="Livestream-Past" data-umami-event-episode="414">Watch on YouTube</a><br> <p><strong>About the show</strong></p> <p>Sponsored by us! Support our work through:</p> <ul> <li>Our <a href="https://training.talkpython.fm/?featured_on=pythonbytes"><strong>courses at Talk Python Training</strong></a></li> <li><a href="https://courses.pythontest.com/p/the-complete-pytest-course?featured_on=pythonbytes"><strong>The Complete pytest Course</strong></a></li> <li><a href="https://www.patreon.com/pythonbytes"><strong>Patreon Supporters</strong></a></li> </ul> <p><strong>Connect with the hosts</strong></p> <ul> <li>Michael: <a href="https://fosstodon.org/@mkennedy"><strong>@mkennedy@fosstodon.org</strong></a> <strong>/</strong> <a href="https://bsky.app/profile/mkennedy.codes?featured_on=pythonbytes"><strong>@mkennedy.codes</strong></a> <strong>(bsky)</strong></li> <li>Brian: <a href="https://fosstodon.org/@brianokken"><strong>@brianokken@fosstodon.org</strong></a> <strong>/</strong> <a href="https://bsky.app/profile/brianokken.bsky.social?featured_on=pythonbytes"><strong>@brianokken.bsky.social</strong></a></li> <li>Show: <a href="https://fosstodon.org/@pythonbytes"><strong>@pythonbytes@fosstodon.org</strong></a> <strong>/</strong> <a href="https://bsky.app/profile/pythonbytes.fm"><strong>@pythonbytes.fm</strong></a> <strong>(bsky)</strong></li> </ul> <p>Join us on YouTube at <a href="https://pythonbytes.fm/stream/live"><strong>pythonbytes.fm/live</strong></a> to be part of the audience. Usually <strong>Monday</strong> at 10am PT. Older video versions available there too.</p> <p>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 <a href="https://pythonbytes.fm/friends-of-the-show">our friends of the show list</a>, we'll never share it. </p> <p><strong>Brian #1:</strong> <a href="https://micro.webology.dev/2024/12/14/new-project-to.html?featured_on=pythonbytes">New project to shorten django-admin to django because we are not monsters</a></p> <ul> <li>Jeff Tripplet has created <a href="https://github.com/jefftriplett/django-cli-no-admin?featured_on=pythonbytes">django-cli-no-admin</a> to shorten django-admin to just django.</li> <li>“One of the biggest mysteries in Django is why I have to run django-admin from my terminal instead of just running django. Confusingly, django-admin has nothing to do with Django’s admin app.”</li> <li>Instead of typing things like: django-admin startproject mysite projectname</li> <li>We can type the shorter: django startproject mysite projectname</li> <li>I love this kind of developer speedup / comfort improvements</li> <li>And yes, Jeff wants Django to eventually include this as the default way to run the command line utilities.</li> </ul> <p><strong>Michael #2:</strong> <a href="https://github.com/adamghill/django-unicorn?featured_on=pythonbytes">django-unicorn</a>: The magical reactive component framework for Django <img src="https://paper.dropboxstatic.com/static/img/ace/emoji/2728.png?version=8.0.0" alt="sparkles" /></p> <ul> <li>Add modern site functionality: Quickly add in simple interactions to regular Django templates without learning a new templating language.</li> <li>Skip the JavaScript build tools</li> <li>No API required: Skip creating a bunch of serializers and just use Django.</li> </ul> <p><strong>Brian #3:</strong> <a href="https://nedbatchelder.com/blog/202412/testing_some_tidbits.html?featured_on=pythonbytes">Testing some tidbits</a></p> <ul> <li>Ned Batchelder</li> <li>Different ways to test to see if a string has only 0 or 1 in it.</li> <li>And also, a way to check all the different ways to make sure they work.</li> <li>Fun post, and I learned about <ul> <li>cleandoc - a way to strip leading blank space and maintain code block indentation <ul> <li>I usually use textwrap.dedent()</li> </ul></li> <li>partition - splitting strings based on a substring</li> <li>Using | to pass imports to eval() - I don't use eval much.</li> </ul></li> <li>However, no pytest! </li> <li>Here’s a way to check all this with pytest: <ul> <li><a href="https://pythontest.com/pytest/testing-tidbits-pytest/?featured_on=pythonbytes">Testing some tidbits with pytest</a></li> </ul></li> </ul> <p><strong>Michael #4:</strong> <a href="https://blog.jetbrains.com/pycharm/2024/12/the-state-of-python/?featured_on=pythonbytes">The State of Python 2024 article</a></p> <ol> <li>Python usage with other languages drops as general adoption grows</li> <li>41% of Python developers have under 2 years of experience</li> <li>Python learning expands through diverse channels</li> <li>The Python 2 vs. 3 divide is in the distant past</li> <li>Flask, Django, and FastAPI remain top Python web frameworks</li> <li>Most Python web apps run on hyperscale clouds</li> <li>Containers over VMs over hardware</li> <li>uv takes Python packaging by storm</li> </ol> <p><strong>Extras</strong> </p> <p>Brian:</p> <ul> <li>More Django: <a href="https://draculatheme.com/django-admin?featured_on=pythonbytes">Dracula Theme for Django Admin</a></li> </ul> <p>Michael:</p> <ul> <li><a href="https://zen-browser.app/?featured_on=pythonbytes">Zen Browser update</a></li> <li><a href="https://bsky.app/profile/did:plc:u4qsxlhzx76gwoyj4xvtxbuf/post/3lcye7a5flk2d?featured_on=pythonbytes">Office refresh</a></li> <li><a href="https://blobs.pythonbytes.fm/transcripts-in-player.webp">Transcripts</a> (in some players)</li> </ul> <p><img src="https://blobs.pythonbytes.fm/transcripts-in-player.webp" alt="" /></p> <p><strong>Joke:</strong></p> <ul> <li><a href="https://bsky.app/profile/mbetm.bsky.social/post/3lcl6qoo43c2q?featured_on=pythonbytes">Volkswagen, passing all the tests </a></li> </ul>
Categories: FLOSS Project Planets

Pages