<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Python on</title><link>https://deploy-preview-3419--ornate-narwhal-088216.netlify.app/tags/python/</link><description>Recent content in Python on</description><generator>Hugo -- gohugo.io</generator><language>en</language><copyright>Copyright (c) 2023 Chainguard</copyright><lastBuildDate>Sun, 22 Jun 2025 17:00:00 +0000</lastBuildDate><atom:link href="https://deploy-preview-3419--ornate-narwhal-088216.netlify.app/tags/python/index.xml" rel="self" type="application/rss+xml"/><item><title>Chainguard Libraries for Python overview</title><link>https://deploy-preview-3419--ornate-narwhal-088216.netlify.app/chainguard/libraries/python/overview/</link><pubDate>Wed, 09 Apr 2025 04:00:00 +0000</pubDate><guid>https://deploy-preview-3419--ornate-narwhal-088216.netlify.app/chainguard/libraries/python/overview/</guid><description>&lt;h2 id="introduction" class="heading-2" data-heading-level="2"&gt;
&lt;span class="heading-text"&gt;Introduction&lt;/span&gt;
&lt;a href="#introduction" class="anchor" aria-label="Link to Introduction" title="Link to this section"&gt;
&lt;svg width="16" height="9" viewBox="0 0 16 9" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true"&gt;
&lt;path d="M6.833 8.125H4C3 8.125 2.146 7.77067 1.438 7.062C0.729333 6.354 0.375 5.5 0.375 4.5C0.375 3.5 0.729333 2.646 1.438 1.938C2.146 1.22933 3 0.875 4 0.875H6.833V1.958H4C3.30533 1.958 2.708 2.208 2.208 2.708C1.708 3.208 1.458 3.80533 1.458 4.5C1.458 5.19467 1.708 5.792 2.208 6.292C2.708 6.792 3.30533 7.042 4 7.042H6.833V8.125ZM5.208 5.042V3.958H10.792V5.042H5.208ZM9.167 8.125V7.042H12C12.6947 7.042 13.292 6.792 13.792 6.292C14.292 5.792 14.542 5.19467 14.542 4.5C14.542 3.80533 14.292 3.208 13.792 2.708C13.292 2.208 12.6947 1.958 12 1.958H9.167V0.875H12C13 0.875 13.854 1.22933 14.562 1.938C15.2707 2.646 15.625 3.5 15.625 4.5C15.625 5.5 15.2707 6.354 14.562 7.062C13.854 7.77067 13 8.125 12 8.125H9.167Z" fill="currentColor"/&gt;
&lt;/svg&gt;
&lt;/a&gt;
&lt;/h2&gt;&lt;p&gt;Chainguard Libraries for Python provides enhanced security for the vast Python
ecosystem by rebuilding PyPI packages with comprehensive supply chain protection
and automated patching. With over 600,000 packages on the &lt;a href="https://pypi.org/"&gt;Python Package Index
(PyPI)&lt;/a&gt; serving application development, machine learning,
and data science needs, Chainguard addresses the critical security challenges of
depending on packages from untrusted sources by rebuilding them within the
controlled Chainguard Factory environment. In addition, Chainguard eliminates
security risk by remediating High and Critical vulnerabilities across older
package versions where upstream maintainers are not able to prioritize fixes.&lt;/p&gt;</description></item><item><title>Global configuration</title><link>https://deploy-preview-3419--ornate-narwhal-088216.netlify.app/chainguard/libraries/python/global-configuration/</link><pubDate>Tue, 25 Mar 2025 08:04:00 +0000</pubDate><guid>https://deploy-preview-3419--ornate-narwhal-088216.netlify.app/chainguard/libraries/python/global-configuration/</guid><description>&lt;p&gt;Python library consumption in a large organization is typically managed by a
repository manager. Commonly used repository manager applications are
&lt;a href="https://cloudsmith.com/"&gt;Cloudsmith&lt;/a&gt;, &lt;a href="https://jfrog.com/artifactory/"&gt;JFrog
Artifactory&lt;/a&gt;, and &lt;a href="https://www.sonatype.com/products/sonatype-nexus-repository"&gt;Sonatype Nexus
Repository&lt;/a&gt;. The
repository manager acts as a single point of access for developers and
development tools to retrieve the required libraries.&lt;/p&gt;
&lt;p&gt;The recommended approach is to use the &lt;a href="https://deploy-preview-3419--ornate-narwhal-088216.netlify.app/chainguard/libraries/overview/#upstream-fallback-and-controls"&gt;upstream
fallback&lt;/a&gt;
feature of Chainguard Repository, which allows you to configure your repository
manager with a single upstream pointed at &lt;code&gt;https://libraries.cgr.dev/python/&lt;/code&gt;. The
Chainguard Repository handles fallback and policy enforcement; your repository
manager handles local caching and access control. Chainguard also retrieves
packages from the public PyPI repository on your behalf when upstream
fallback is enabled. This includes protections such as malware detection and a
cooldown period for newly published packages.&lt;/p&gt;</description></item><item><title>Build configuration</title><link>https://deploy-preview-3419--ornate-narwhal-088216.netlify.app/chainguard/libraries/python/build-configuration/</link><pubDate>Tue, 25 Mar 2025 08:04:00 +0000</pubDate><guid>https://deploy-preview-3419--ornate-narwhal-088216.netlify.app/chainguard/libraries/python/build-configuration/</guid><description>&lt;p&gt;The configuration for the use of Chainguard Libraries depends on how you&amp;rsquo;ve set up your build tools and CI/CD workflows. At a high level, adopting the use of Chainguard Libraries in your development, build, and deployment workflows involves the following steps:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;If you or an administrator have not done so already, &lt;a href="https://deploy-preview-3419--ornate-narwhal-088216.netlify.app/chainguard/libraries/python/global-configuration/"&gt;set up your organization&amp;rsquo;s repository manager to use Chainguard Libraries for Python&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Log into your organization&amp;rsquo;s repository manager and retrieve credentials for the build tool you are configuring.&lt;/li&gt;
&lt;li&gt;Configure your development or build tool with this information.&lt;/li&gt;
&lt;li&gt;Remove local caches on workstations and CI/CD pipelines. This step ensures that dependencies are preferentially sourced from Chainguard Libraries.&lt;/li&gt;
&lt;li&gt;Finally, confirm that your development tools and CI/CD workflows are correctly ingesting dependencies from Chainguard Libraries.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These changes must be performed on all workstations of individual developers and
other engineers running relevant application builds. They must also be performed
on any build tool such as Jenkins, TeamCity, GitHub Actions, or other
infrastructure that draws in dependencies.&lt;/p&gt;</description></item><item><title>Management and maintenance</title><link>https://deploy-preview-3419--ornate-narwhal-088216.netlify.app/chainguard/libraries/python/management/</link><pubDate>Tue, 25 Mar 2025 08:04:00 +0000</pubDate><guid>https://deploy-preview-3419--ornate-narwhal-088216.netlify.app/chainguard/libraries/python/management/</guid><description>&lt;p&gt;Chainguard Libraries for Python operates transparently after completing the &lt;a href="https://deploy-preview-3419--ornate-narwhal-088216.netlify.app/chainguard/libraries/python/global-configuration/"&gt;global configuration&lt;/a&gt; and &lt;a href="https://deploy-preview-3419--ornate-narwhal-088216.netlify.app/chainguard/libraries/python/build-configuration/"&gt;build configuration&lt;/a&gt;, automatically providing security-enhanced versions of your PyPI dependencies. New packages and versions are retrieved from Chainguard&amp;rsquo;s hardened repository when available, while PyPI and other configured repositories provide fallback access to ensure continuous development workflow without interruption.&lt;/p&gt;
&lt;p&gt;The following sections detail optional management, maintenance, and auditing
steps on the repository manager and the build tool.&lt;/p&gt;
&lt;h2 id="source-verification" class="heading-2" data-heading-level="2"&gt;
&lt;span class="heading-text"&gt;Source verification&lt;/span&gt;
&lt;a href="#source-verification" class="anchor" aria-label="Link to Source verification" title="Link to this section"&gt;
&lt;svg width="16" height="9" viewBox="0 0 16 9" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true"&gt;
&lt;path d="M6.833 8.125H4C3 8.125 2.146 7.77067 1.438 7.062C0.729333 6.354 0.375 5.5 0.375 4.5C0.375 3.5 0.729333 2.646 1.438 1.938C2.146 1.22933 3 0.875 4 0.875H6.833V1.958H4C3.30533 1.958 2.708 2.208 2.208 2.708C1.708 3.208 1.458 3.80533 1.458 4.5C1.458 5.19467 1.708 5.792 2.208 6.292C2.708 6.792 3.30533 7.042 4 7.042H6.833V8.125ZM5.208 5.042V3.958H10.792V5.042H5.208ZM9.167 8.125V7.042H12C12.6947 7.042 13.292 6.792 13.792 6.292C14.292 5.792 14.542 5.19467 14.542 4.5C14.542 3.80533 14.292 3.208 13.792 2.708C13.292 2.208 12.6947 1.958 12 1.958H9.167V0.875H12C13 0.875 13.854 1.22933 14.562 1.938C15.2707 2.646 15.625 3.5 15.625 4.5C15.625 5.5 15.2707 6.354 14.562 7.062C13.854 7.77067 13 8.125 12 8.125H9.167Z" fill="currentColor"/&gt;
&lt;/svg&gt;
&lt;/a&gt;
&lt;/h2&gt;&lt;p&gt;You can verify what artifacts are retrieved from the Chainguard Libraries
repository on a global level:&lt;/p&gt;</description></item><item><title>Chainguard Libraries for Python</title><link>https://deploy-preview-3419--ornate-narwhal-088216.netlify.app/software-security/learning-labs/ll202506/</link><pubDate>Sun, 22 Jun 2025 17:00:00 +0000</pubDate><guid>https://deploy-preview-3419--ornate-narwhal-088216.netlify.app/software-security/learning-labs/ll202506/</guid><description>&lt;p&gt;The June 2025 Learning Lab with Patrick Smyth covers Chainguard Libraries for
Python. Open source libraries help you move fast, but pulling in external
dependencies can introduce supply chain risk. This session covers fundamental
concepts of Chainguard Libraries, package managers and dependencies, PyPI and
build tools, configuring repository managers, and running example application builds.&lt;/p&gt;
&lt;div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;"&gt;
&lt;iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen" loading="eager" referrerpolicy="strict-origin-when-cross-origin" src="https://www.youtube.com/embed/h_nzhPY_vDA?autoplay=0&amp;amp;controls=1&amp;amp;end=0&amp;amp;loop=0&amp;amp;mute=0&amp;amp;start=0" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" title="YouTube video"&gt;&lt;/iframe&gt;
&lt;/div&gt;
&lt;h2 id="sections" class="heading-2" data-heading-level="2"&gt;
&lt;span class="heading-text"&gt;Sections&lt;/span&gt;
&lt;a href="#sections" class="anchor" aria-label="Link to Sections" title="Link to this section"&gt;
&lt;svg width="16" height="9" viewBox="0 0 16 9" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true"&gt;
&lt;path d="M6.833 8.125H4C3 8.125 2.146 7.77067 1.438 7.062C0.729333 6.354 0.375 5.5 0.375 4.5C0.375 3.5 0.729333 2.646 1.438 1.938C2.146 1.22933 3 0.875 4 0.875H6.833V1.958H4C3.30533 1.958 2.708 2.208 2.208 2.708C1.708 3.208 1.458 3.80533 1.458 4.5C1.458 5.19467 1.708 5.792 2.208 6.292C2.708 6.792 3.30533 7.042 4 7.042H6.833V8.125ZM5.208 5.042V3.958H10.792V5.042H5.208ZM9.167 8.125V7.042H12C12.6947 7.042 13.292 6.792 13.792 6.292C14.292 5.792 14.542 5.19467 14.542 4.5C14.542 3.80533 14.292 3.208 13.792 2.708C13.292 2.208 12.6947 1.958 12 1.958H9.167V0.875H12C13 0.875 13.854 1.22933 14.562 1.938C15.2707 2.646 15.625 3.5 15.625 4.5C15.625 5.5 15.2707 6.354 14.562 7.062C13.854 7.77067 13 8.125 12 8.125H9.167Z" fill="currentColor"/&gt;
&lt;/svg&gt;
&lt;/a&gt;
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=h_nzhPY_vDA"&gt;0:00&lt;/a&gt; Introduction and welcome&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=h_nzhPY_vDA&amp;amp;t=54s"&gt;0:54&lt;/a&gt; Patrick Smyth introduction and background&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=h_nzhPY_vDA&amp;amp;t=107s"&gt;1:47&lt;/a&gt; Chainguard! Who are we?&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=h_nzhPY_vDA&amp;amp;t=167s"&gt;2:47&lt;/a&gt; Chainguard Containers and the &amp;ldquo;boss assigned me to fix Ubuntu&amp;rdquo; problem&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=h_nzhPY_vDA&amp;amp;t=252s"&gt;4:12&lt;/a&gt; Introduction to Chainguard Libraries for Python&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=h_nzhPY_vDA&amp;amp;t=304s"&gt;5:04&lt;/a&gt; Python libraries fundamentals - modules, packages, and libraries&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=h_nzhPY_vDA&amp;amp;t=394s"&gt;6:34&lt;/a&gt; The dependency graph problem and modern ecosystem challenges&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=h_nzhPY_vDA&amp;amp;t=537s"&gt;8:57&lt;/a&gt; PyPI (Python Package Index) overview and infrastructure&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=h_nzhPY_vDA&amp;amp;t=653s"&gt;10:53&lt;/a&gt; Supply chain attacks on the rise and threats to the Python ecosystem&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=h_nzhPY_vDA&amp;amp;t=699s"&gt;11:39&lt;/a&gt; Supply chain meme calendar - an attack every month this year&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=h_nzhPY_vDA&amp;amp;t=834s"&gt;13:54&lt;/a&gt; Anatomy of supply chain attacks and attack vectors&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=h_nzhPY_vDA&amp;amp;t=1063s"&gt;17:43&lt;/a&gt; Chainguard Libraries!&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=h_nzhPY_vDA&amp;amp;t=1174s"&gt;19:34&lt;/a&gt; Chainguard Factory overview and operational security&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=h_nzhPY_vDA&amp;amp;t=1293s"&gt;21:33&lt;/a&gt; Case study: Ultralytics YOLO December 2024 attack&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=h_nzhPY_vDA&amp;amp;t=1402s"&gt;23:22&lt;/a&gt; Technical caveats and requirements for Chainguard Libraries&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=h_nzhPY_vDA&amp;amp;t=1506s"&gt;25:06&lt;/a&gt; Demo introduction and Flask project overview&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=h_nzhPY_vDA&amp;amp;t=1668s"&gt;27:48&lt;/a&gt; Accessing demo materials on Chainguard Academy&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=h_nzhPY_vDA&amp;amp;t=1740s"&gt;29:00&lt;/a&gt; Demo: Cloning and setting up the Flask project&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=h_nzhPY_vDA&amp;amp;t=1877s"&gt;31:17&lt;/a&gt; Demo: Creating virtual environment and installing from PyPI&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=h_nzhPY_vDA&amp;amp;t=1986s"&gt;33:06&lt;/a&gt; Demo: Running Flask application and testing with libCheck tool&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=h_nzhPY_vDA&amp;amp;t=2068s"&gt;34:28&lt;/a&gt; Demo: Configuring pip for Chainguard Libraries via repository manager&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=h_nzhPY_vDA&amp;amp;t=2179s"&gt;36:19&lt;/a&gt; Demo: Installing dependencies from Chainguard Libraries&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=h_nzhPY_vDA&amp;amp;t=2222s"&gt;37:02&lt;/a&gt; Demo: Verification with libCheck&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=h_nzhPY_vDA&amp;amp;t=2302s"&gt;38:22&lt;/a&gt; Demo: Containerizing the demo application&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=h_nzhPY_vDA&amp;amp;t=2425s"&gt;40:25&lt;/a&gt; Demo: Building and running containerized Flask application&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=h_nzhPY_vDA&amp;amp;t=2501s"&gt;41:41&lt;/a&gt; Additional configuration options and documentation resources&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=h_nzhPY_vDA&amp;amp;t=2539s"&gt;42:19&lt;/a&gt; Q&amp;amp;A: Repository manager setup and configuration&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=h_nzhPY_vDA&amp;amp;t=2606s"&gt;43:26&lt;/a&gt; Q&amp;amp;A: Architecture support and glibc requirements&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=h_nzhPY_vDA&amp;amp;t=2674s"&gt;44:34&lt;/a&gt; Q&amp;amp;A: libCheck tool open source plans and detailed output&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=h_nzhPY_vDA&amp;amp;t=2765s"&gt;46:05&lt;/a&gt; Q&amp;amp;A: CVE scanning with Grype and vulnerability management&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="demo" class="heading-2" data-heading-level="2"&gt;
&lt;span class="heading-text"&gt;Demo&lt;/span&gt;
&lt;a href="#demo" class="anchor" aria-label="Link to Demo" title="Link to this section"&gt;
&lt;svg width="16" height="9" viewBox="0 0 16 9" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true"&gt;
&lt;path d="M6.833 8.125H4C3 8.125 2.146 7.77067 1.438 7.062C0.729333 6.354 0.375 5.5 0.375 4.5C0.375 3.5 0.729333 2.646 1.438 1.938C2.146 1.22933 3 0.875 4 0.875H6.833V1.958H4C3.30533 1.958 2.708 2.208 2.208 2.708C1.708 3.208 1.458 3.80533 1.458 4.5C1.458 5.19467 1.708 5.792 2.208 6.292C2.708 6.792 3.30533 7.042 4 7.042H6.833V8.125ZM5.208 5.042V3.958H10.792V5.042H5.208ZM9.167 8.125V7.042H12C12.6947 7.042 13.292 6.792 13.792 6.292C14.292 5.792 14.542 5.19467 14.542 4.5C14.542 3.80533 14.292 3.208 13.792 2.708C13.292 2.208 12.6947 1.958 12 1.958H9.167V0.875H12C13 0.875 13.854 1.22933 14.562 1.938C15.2707 2.646 15.625 3.5 15.625 4.5C15.625 5.5 15.2707 6.354 14.562 7.062C13.854 7.77067 13 8.125 12 8.125H9.167Z" fill="currentColor"/&gt;
&lt;/svg&gt;
&lt;/a&gt;
&lt;/h2&gt;&lt;p&gt;In the demo, Patrick switches a Flask application to use Chainguard Libraries for Python, sourcing dependencies from a repository manager (Artifactory) set up to pull first from the Chainguard Libraries for Python index with a fallback to the Python Package Index (PyPI).&lt;/p&gt;</description></item></channel></rss>