<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: xrc</title>
    <description>The latest articles on DEV Community by xrc (@xrc).</description>
    <link>https://dev.to/xrc</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2444896%2F9f642de9-ee0d-49be-8fed-c70dd6e61366.PNG</url>
      <title>DEV Community: xrc</title>
      <link>https://dev.to/xrc</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/xrc"/>
    <language>en</language>
    <item>
      <title>Easily Set Up Your Usual tmux Pane Layout</title>
      <dc:creator>xrc</dc:creator>
      <pubDate>Sun, 15 Jun 2025 12:17:42 +0000</pubDate>
      <link>https://dev.to/xrc/easily-set-up-your-usual-tmux-pane-layout-2m5g</link>
      <guid>https://dev.to/xrc/easily-set-up-your-usual-tmux-pane-layout-2m5g</guid>
      <description>&lt;h2&gt;
  
  
  Overview
&lt;/h2&gt;

&lt;p&gt;Every time I start new development work, I have to manually split tmux panes,&lt;br&gt;
navigate to the necessary directories in each pane, and execute commands.&lt;br&gt;
This got tedious, so I created a tool called &lt;code&gt;tsps&lt;/code&gt; to eliminate this repetitive work.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/yyossy5/tsps" rel="noopener noreferrer"&gt;https://github.com/yyossy5/tsps&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://crates.io/crates/tsps" rel="noopener noreferrer"&gt;https://crates.io/crates/tsps&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  tsps Demo
&lt;/h2&gt;

&lt;p&gt;I've prepared a demo video since seeing it in action is the quickest way to understand:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqy3gn8y69o0k5zs1pdtf.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqy3gn8y69o0k5zs1pdtf.gif" alt=" " width="800" height="446"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Key Features
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Simple Operation&lt;/strong&gt;: Create multiple panes with a single command&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Automatic Directory Navigation&lt;/strong&gt;: Move all panes to a specified directory&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Automatic Command Execution&lt;/strong&gt;: Run arbitrary commands in each pane automatically&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;YAML Configuration&lt;/strong&gt;: Reusable custom layout configurations&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Focus Control&lt;/strong&gt;: Specify which pane gets initial focus&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Installation
&lt;/h2&gt;

&lt;p&gt;I recommend installing via Cargo:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;cargo &lt;span class="nb"&gt;install &lt;/span&gt;tsps
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For macOS users without Cargo, I've also prepared pre-built binaries in the Releases.&lt;br&gt;
Details are available in the README.&lt;/p&gt;
&lt;h2&gt;
  
  
  Basic Usage
&lt;/h2&gt;
&lt;h3&gt;
  
  
  Simple Pane Splitting
&lt;/h3&gt;

&lt;p&gt;Create a specified number of panes, all navigated to the specified directory:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Create 4 panes, all cd'd to the current directory&lt;/span&gt;
tsps 4 &lt;span class="nb"&gt;.&lt;/span&gt;

&lt;span class="c"&gt;# Create 3 panes, all cd'd to a specific project directory&lt;/span&gt;
tsps 3 /path/to/project
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Using YAML Configuration Files
&lt;/h3&gt;

&lt;p&gt;For even more convenience, use YAML files:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;tsps &lt;span class="nt"&gt;-l&lt;/span&gt; config.yaml &lt;span class="nt"&gt;-d&lt;/span&gt; /path/to/project
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  YAML Configuration Files
&lt;/h2&gt;

&lt;p&gt;I expect that using configuration files will be the most common use case.&lt;/p&gt;

&lt;h3&gt;
  
  
  Simple Example
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Simple 2-pane layout&lt;/span&gt;
&lt;span class="na"&gt;workspace&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;simple"&lt;/span&gt;
  &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;2-pane&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;layout&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;with&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;editor&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;and&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;terminal"&lt;/span&gt;
  &lt;span class="na"&gt;directory&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;."&lt;/span&gt;

&lt;span class="na"&gt;panes&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;editor"&lt;/span&gt;
    &lt;span class="na"&gt;commands&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;nvim&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;."&lt;/span&gt;
    &lt;span class="na"&gt;focus&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;

  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;terminal"&lt;/span&gt;
    &lt;span class="na"&gt;split&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;horizontal"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This configuration creates:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Editor pane (launches Neovim, has focus)&lt;/li&gt;
&lt;li&gt;Terminal pane (positioned with horizontal split)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  More Practical Example
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="c1"&gt;# Development layout example&lt;/span&gt;
&lt;span class="na"&gt;workspace&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;dev"&lt;/span&gt;
  &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;4-pane&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;layout&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;for&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;development"&lt;/span&gt;
  &lt;span class="na"&gt;directory&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;/Users/me/Projects/tsps"&lt;/span&gt;

&lt;span class="na"&gt;panes&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="c1"&gt;# Main editor (top-left)&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;editor"&lt;/span&gt;
    &lt;span class="na"&gt;commands&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;nvim&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;."&lt;/span&gt;
    &lt;span class="na"&gt;focus&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;

  &lt;span class="c1"&gt;# Claude Code (top-right, smaller)&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;claude"&lt;/span&gt;
    &lt;span class="na"&gt;split&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;vertical"&lt;/span&gt;
    &lt;span class="na"&gt;size&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;38%"&lt;/span&gt;
    &lt;span class="na"&gt;commands&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;claude"&lt;/span&gt;

  &lt;span class="c1"&gt;# General terminal (bottom-left)&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;terminal"&lt;/span&gt;
    &lt;span class="na"&gt;split&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;horizontal"&lt;/span&gt;
    &lt;span class="na"&gt;size&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;30%"&lt;/span&gt;
    &lt;span class="na"&gt;commands&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;ls&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;-la"&lt;/span&gt;

  &lt;span class="c1"&gt;# Git operations (bottom-right, larger)&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;git"&lt;/span&gt;
    &lt;span class="na"&gt;split&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;vertical"&lt;/span&gt;
    &lt;span class="na"&gt;size&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;60%"&lt;/span&gt;
    &lt;span class="na"&gt;commands&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;lazygit"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This configuration creates:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;editor&lt;/strong&gt; pane: Opens the project in Neovim&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;claude&lt;/strong&gt; pane: Vertical split, 38% size, launches Claude CLI&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;terminal&lt;/strong&gt; pane: Horizontal split, 30% size, displays directory contents&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;git&lt;/strong&gt; pane: Vertical split, 60% size, launches Lazygit&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The result looks like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fshin03ta1bbxp03phvhy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fshin03ta1bbxp03phvhy.png" alt=" " width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Configuration Options Details
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Option&lt;/th&gt;
&lt;th&gt;Description&lt;/th&gt;
&lt;th&gt;Example&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;name&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Workspace name&lt;/td&gt;
&lt;td&gt;&lt;code&gt;"development"&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;description&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Description text&lt;/td&gt;
&lt;td&gt;&lt;code&gt;"Development setup"&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;directory&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Working directory (can be overridden with -d option)&lt;/td&gt;
&lt;td&gt;&lt;code&gt;"~/projects/myapp"&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;split&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Split direction&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;"horizontal"&lt;/code&gt; / &lt;code&gt;"vertical"&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;size&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Pane size (%)&lt;/td&gt;
&lt;td&gt;&lt;code&gt;50&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;commands&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Array of commands to execute&lt;/td&gt;
&lt;td&gt;&lt;code&gt;["git status", "npm start"]&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;focus&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Initial focus&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;true&lt;/code&gt; / &lt;code&gt;false&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;If you use tmux and want to make your daily development workflow a bit easier, please give this tool a try.&lt;/p&gt;

</description>
      <category>tmux</category>
      <category>cli</category>
      <category>terminal</category>
    </item>
    <item>
      <title>Using uv Environment Kernels in Jupyter Notebook</title>
      <dc:creator>xrc</dc:creator>
      <pubDate>Sat, 14 Jun 2025 05:25:42 +0000</pubDate>
      <link>https://dev.to/xrc/using-uv-environment-kernels-in-jupyter-notebook-4mmd</link>
      <guid>https://dev.to/xrc/using-uv-environment-kernels-in-jupyter-notebook-4mmd</guid>
      <description>&lt;h1&gt;
  
  
  Article Overview
&lt;/h1&gt;

&lt;p&gt;This article describes how to add/remove kernels for uv virtual environments.&lt;/p&gt;

&lt;h1&gt;
  
  
  Assumed Scenario
&lt;/h1&gt;

&lt;p&gt;There is a uv-managed Python repository called my-python-repo, and we want to create a kernel for this repository's library environment to work in Jupyter Notebook.&lt;/p&gt;

&lt;h1&gt;
  
  
  Kernel Addition Steps
&lt;/h1&gt;

&lt;h2&gt;
  
  
  1. Clone my-python-repo
&lt;/h2&gt;

&lt;p&gt;First, let's get my-python-repo.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone git@xxx.org:myorg-dev/my-python-repo.git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  2. Create Virtual Environment from uv.lock
&lt;/h2&gt;

&lt;p&gt;After &lt;code&gt;cd&lt;/code&gt; into the cloned my-python-repo, you can create a virtual environment based on &lt;code&gt;uv.lock&lt;/code&gt; by running &lt;code&gt;uv sync&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;uv &lt;span class="nb"&gt;sync&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This creates a venv virtual environment (.venv directory) based on &lt;code&gt;uv.lock&lt;/code&gt;.&lt;br&gt;
We just need to create a kernel linked to this virtual environment.&lt;/p&gt;
&lt;h2&gt;
  
  
  3. Add ipykernel to Virtual Environment for Jupyter Kernel Recognition
&lt;/h2&gt;

&lt;p&gt;Jupyter requires &lt;code&gt;ipykernel&lt;/code&gt; to recognize the virtual environment as a kernel.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;uv add &lt;span class="nt"&gt;--dev&lt;/span&gt; ipykernel
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  4. Register Virtual Environment as Jupyter Kernel
&lt;/h2&gt;

&lt;p&gt;As an example, we'll register a kernel with the name &lt;code&gt;Python3.13.2-my-python-repo-new-feature&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;uv run ipython kernel &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;--user&lt;/span&gt; &lt;span class="nt"&gt;--env&lt;/span&gt; VIRTUAL_ENV &lt;span class="si"&gt;$(&lt;/span&gt;&lt;span class="nb"&gt;pwd&lt;/span&gt;&lt;span class="si"&gt;)&lt;/span&gt;/.venv &lt;span class="nt"&gt;--name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"Python3.13.2-my-python-repo-new-feature"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can confirm it's been added by checking the kernel list with the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;jupyter kernelspec list
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Check &lt;code&gt;kernel.json&lt;/code&gt; and verify that the destinations of &lt;code&gt;python&lt;/code&gt; and &lt;code&gt;VIRTUAL_ENV&lt;/code&gt; are as expected.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The first element of argv points to &lt;code&gt;python&lt;/code&gt; in &lt;code&gt;.venv/bin&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;VIRTUAL_ENV&lt;/code&gt; points to the &lt;code&gt;.venv&lt;/code&gt; created by uv
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;cat&lt;/span&gt; ~/.local/share/jupyter/kernel/python3.13.2-my-python-repo-new-feature/kernel.json
&lt;span class="o"&gt;{&lt;/span&gt;
 &lt;span class="s2"&gt;"argv"&lt;/span&gt;: &lt;span class="o"&gt;[&lt;/span&gt;
  &lt;span class="s2"&gt;"/home/xxx/workspace/xxx_notebooks/my-python-repo/.venv/bin/python3"&lt;/span&gt;,
  &lt;span class="s2"&gt;"-m"&lt;/span&gt;,
  &lt;span class="s2"&gt;"ipykernel_launcher"&lt;/span&gt;,
  &lt;span class="s2"&gt;"-f"&lt;/span&gt;,
  &lt;span class="s2"&gt;"{connection_file}"&lt;/span&gt;
 &lt;span class="o"&gt;]&lt;/span&gt;,
 &lt;span class="s2"&gt;"display_name"&lt;/span&gt;: &lt;span class="s2"&gt;"Python3.13.2-my-python-repo-new-feature"&lt;/span&gt;,
 &lt;span class="s2"&gt;"language"&lt;/span&gt;: &lt;span class="s2"&gt;"python"&lt;/span&gt;,
 &lt;span class="s2"&gt;"metadata"&lt;/span&gt;: &lt;span class="o"&gt;{&lt;/span&gt;
  &lt;span class="s2"&gt;"debugger"&lt;/span&gt;: &lt;span class="nb"&gt;true&lt;/span&gt;
 &lt;span class="o"&gt;}&lt;/span&gt;,
 &lt;span class="s2"&gt;"env"&lt;/span&gt;: &lt;span class="o"&gt;{&lt;/span&gt;
  &lt;span class="s2"&gt;"VIRTUAL_ENV"&lt;/span&gt;: &lt;span class="s2"&gt;"/home/xxx/workspace/xxx_notebooks/my-python-repo/.venv"&lt;/span&gt;
 &lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  5. Open Jupyter Notebook and Use the Kernel
&lt;/h2&gt;

&lt;p&gt;When you open Jupyter Notebook, the kernel has been added, so select it and start working.&lt;/p&gt;

&lt;h1&gt;
  
  
  Kernel Removal Steps
&lt;/h1&gt;

&lt;p&gt;To remove a kernel, do the following:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Check kernel list&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;jupyter kernelspec list

&lt;span class="c"&gt;# Remove myenv kernel&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;jupyter kernelspec uninstall myenv
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  How to Add Libraries in Kernels Linked to uv Virtual Environment
&lt;/h1&gt;

&lt;p&gt;By running &lt;code&gt;!uv add&lt;/code&gt; in a notebook cell as shown below, you can add libraries to the uv virtual environment and immediately import them.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;!uv add requests
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Alternatively, instead of from the notebook, you can go to the location where the uv virtual environment is in the terminal&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;uv add requests
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and add normally like this, which will add the library to the kernel.&lt;br&gt;
In this case too, you can immediately import it on the notebook side.&lt;/p&gt;

&lt;h1&gt;
  
  
  Summary
&lt;/h1&gt;

&lt;p&gt;I think it's good to value environment reproducibility and utilize uv even in Jupyter Notebook.&lt;/p&gt;

&lt;h1&gt;
  
  
  References
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://docs.astral.sh/uv/guides/integration/jupyter/" rel="noopener noreferrer"&gt;https://docs.astral.sh/uv/guides/integration/jupyter/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>python</category>
      <category>uv</category>
      <category>jupyter</category>
    </item>
    <item>
      <title>Essential uv Usage for Daily Development</title>
      <dc:creator>xrc</dc:creator>
      <pubDate>Sat, 14 Jun 2025 05:19:32 +0000</pubDate>
      <link>https://dev.to/xrc/essential-uv-usage-for-daily-development-gl0</link>
      <guid>https://dev.to/xrc/essential-uv-usage-for-daily-development-gl0</guid>
      <description>&lt;h1&gt;
  
  
  Article Overview
&lt;/h1&gt;

&lt;p&gt;This article describes how to use uv, a Python project management tool.&lt;br&gt;
I use uv for Python projects both at work and in personal projects, and have compiled the essentials I frequently use in daily development based on official documentation and my own experience.&lt;br&gt;
The content is based on v0.6.14.&lt;br&gt;
Since it has Stable status, I don't think the usage will change dramatically, but please refer to the official documentation for the latest information.&lt;/p&gt;
&lt;h1&gt;
  
  
  Main Things Managed by uv
&lt;/h1&gt;

&lt;p&gt;Python project management can be done with uv alone, no other tools are needed.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Python version used in the project&lt;/li&gt;
&lt;li&gt;Dependencies (complete environment reproduction possible with lock files)&lt;/li&gt;
&lt;li&gt;Virtual environments&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  About Python Version Management
&lt;/h2&gt;

&lt;p&gt;uv can manage Python itself and versions, claiming to be a replacement for pyenv.&lt;br&gt;
As of v0.6.14, uv can manage Python versions per project, but it doesn't manage system-level Python and is not a complete replacement for pyenv (though I personally think pyenv is no longer needed since you basically don't need multiple system-level Pythons).&lt;br&gt;
It plans to support system-level Python management in the future&lt;sup id="fnref1"&gt;1&lt;/sup&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  About Lock Files
&lt;/h2&gt;

&lt;p&gt;A lock file is a record file used for complete environment reproduction, and in uv, &lt;code&gt;uv.lock&lt;/code&gt; is the lock file (this is not a concept originating from uv, but a concept adopted by package managers in other languages like npm).&lt;br&gt;
It has the following characteristics:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Manages versions down to transitive dependencies&lt;/li&gt;
&lt;li&gt;Cross-platform support&lt;/li&gt;
&lt;li&gt;Git-managed and manual editing is prohibited &lt;sup id="fnref2"&gt;2&lt;/sup&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Unlike managing libraries with pip + requirements.txt, environment reproducibility is cross-platform.&lt;/p&gt;

&lt;p&gt;Example of pandas in &lt;code&gt;uv.lock&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[[package]]
name = "pandas"
version = "2.2.3"
source = { registry = "https://pypi.org/simple" }
dependencies = [
    { name = "numpy" },
    { name = "python-dateutil" },
    { name = "pytz" },
    { name = "tzdata" },
]
sdist = { url = "https://files.pythonhosted.org/packages/9c/d6/9f8431bacc2e19dca897724cd097b1bb224a6ad5433784a44b587c7c13af/pandas-2.2.3.tar.gz", hash = "sha256:4f18ba62b61d7e192368b84517265a99b4d7ee8912f8708660fb4a366cc82667", size = 4399213 }
wheels = [
    { url = "https://files.pythonhosted.org/packages/64/22/3b8f4e0ed70644e85cfdcd57454686b9057c6c38d2f74fe4b8bc2527214a/pandas-2.2.3-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:f00d1345d84d8c86a63e476bb4955e46458b304b9575dcf71102b5c705320015", size = 12477643 },
    { url = "https://files.pythonhosted.org/packages/e4/93/b3f5d1838500e22c8d793625da672f3eec046b1a99257666c94446969282/pandas-2.2.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:3508d914817e153ad359d7e069d752cdd736a247c322d932eb89e6bc84217f28", size = 11281573 },
    { url = "https://files.pythonhosted.org/packages/f5/94/6c79b07f0e5aab1dcfa35a75f4817f5c4f677931d4234afcd75f0e6a66ca/pandas-2.2.3-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:22a9d949bfc9a502d320aa04e5d02feab689d61da4e7764b62c30b991c42c5f0", size = 15196085 },
    { url = "https://files.pythonhosted.org/packages/e8/31/aa8da88ca0eadbabd0a639788a6da13bb2ff6edbbb9f29aa786450a30a91/pandas-2.2.3-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f3a255b2c19987fbbe62a9dfd6cff7ff2aa9ccab3fc75218fd4b7530f01efa24", size = 12711809 },
    { url = "https://files.pythonhosted.org/packages/ee/7c/c6dbdb0cb2a4344cacfb8de1c5808ca885b2e4dcfde8008266608f9372af/pandas-2.2.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:800250ecdadb6d9c78eae4990da62743b857b470883fa27f652db8bdde7f6659", size = 16356316 },
    { url = "https://files.pythonhosted.org/packages/57/b7/8b757e7d92023b832869fa8881a992696a0bfe2e26f72c9ae9f255988d42/pandas-2.2.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:6374c452ff3ec675a8f46fd9ab25c4ad0ba590b71cf0656f8b6daa5202bca3fb", size = 14022055 },
    { url = "https://files.pythonhosted.org/packages/3b/bc/4b18e2b8c002572c5a441a64826252ce5da2aa738855747247a971988043/pandas-2.2.3-cp313-cp313-win_amd64.whl", hash = "sha256:61c5ad4043f791b61dd4752191d9f07f0ae412515d59ba8f005832a532f8736d", size = 11481175 },
    { url = "https://files.pythonhosted.org/packages/76/a3/a5d88146815e972d40d19247b2c162e88213ef51c7c25993942c39dbf41d/pandas-2.2.3-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:3b71f27954685ee685317063bf13c7709a7ba74fc996b84fc6821c59b0f06468", size = 12615650 },
    { url = "https://files.pythonhosted.org/packages/9c/8c/f0fd18f6140ddafc0c24122c8a964e48294acc579d47def376fef12bcb4a/pandas-2.2.3-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:38cf8125c40dae9d5acc10fa66af8ea6fdf760b2714ee482ca691fc66e6fcb18", size = 11290177 },
    { url = "https://files.pythonhosted.org/packages/ed/f9/e995754eab9c0f14c6777401f7eece0943840b7a9fc932221c19d1abee9f/pandas-2.2.3-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:ba96630bc17c875161df3818780af30e43be9b166ce51c9a18c1feae342906c2", size = 14651526 },
    { url = "https://files.pythonhosted.org/packages/25/b0/98d6ae2e1abac4f35230aa756005e8654649d305df9a28b16b9ae4353bff/pandas-2.2.3-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1db71525a1538b30142094edb9adc10be3f3e176748cd7acc2240c2f2e5aa3a4", size = 11871013 },
    { url = "https://files.pythonhosted.org/packages/cc/57/0f72a10f9db6a4628744c8e8f0df4e6e21de01212c7c981d31e50ffc8328/pandas-2.2.3-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:15c0e1e02e93116177d29ff83e8b1619c93ddc9c49083f237d4312337a61165d", size = 15711620 },
    { url = "https://files.pythonhosted.org/packages/ab/5f/b38085618b950b79d2d9164a711c52b10aefc0ae6833b96f626b7021b2ed/pandas-2.2.3-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:ad5b65698ab28ed8d7f18790a0dc58005c7629f227be9ecc1072aa74c0c1d43a", size = 13098436 },
]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Virtual Environment
&lt;/h2&gt;

&lt;p&gt;The virtual environment is not something unique to uv, it just uses venv.&lt;br&gt;
(So it's possible to execute Python in the virtual environment by manually activating the venv environment and using the &lt;code&gt;python&lt;/code&gt; command instead of the &lt;code&gt;uv run&lt;/code&gt; described later, though this is not recommended.)&lt;/p&gt;

&lt;p&gt;The Python version used will be the one specified in &lt;code&gt;.python-version&lt;/code&gt; (at the time of virtual environment creation).&lt;/p&gt;
&lt;h1&gt;
  
  
  Comparison of Flow from Clone to Application Execution (Without uv / With uv)
&lt;/h1&gt;

&lt;p&gt;Let me show examples of the flow after &lt;code&gt;git clone&lt;/code&gt; of a uv-managed project, along with cases not using uv.&lt;/p&gt;

&lt;p&gt;When managing with pyenv, pip + requirements.txt and using venv directly, it would be something like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Clone repository&lt;/span&gt;
git clone xxx.git

&lt;span class="c"&gt;# Specify Python version if .python-version is not committed to repository&lt;/span&gt;
pyenv &lt;span class="nb"&gt;local &lt;/span&gt;3.13.2

&lt;span class="c"&gt;# Create virtual environment with venv and install packages&lt;/span&gt;
python &lt;span class="nt"&gt;-m&lt;/span&gt; venv .venv
&lt;span class="nb"&gt;source&lt;/span&gt; .venv/bin/activate
pip &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-r&lt;/span&gt; requirements.txt

&lt;span class="c"&gt;# Verify that python command points to .venv/bin/python and is the intended version&lt;/span&gt;
&lt;span class="nb"&gt;ls&lt;/span&gt; &lt;span class="nt"&gt;-l&lt;/span&gt; &lt;span class="si"&gt;$(&lt;/span&gt;which python&lt;span class="si"&gt;)&lt;/span&gt;
lrwxrwxrwx. 1 ec2-user ec2-user 48  Apr 11 02:24 /home/ec2-user/myproj/.venv/bin/python -&amp;gt; /home/ec2-user/.pyenv/versions/3.13.2/bin/python

&lt;span class="c"&gt;# Execute&lt;/span&gt;
python example.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This procedure has subtle traps.&lt;br&gt;
If you don't specify the Python version with pyenv before creating the venv environment, you won't be able to use the Python version specified with &lt;code&gt;pyenv local&lt;/code&gt;, or if you forget to activate the venv environment and run &lt;code&gt;pip install&lt;/code&gt;, it will be installed globally on the system.&lt;/p&gt;

&lt;p&gt;For uv-managed projects, it would be as follows:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Clone repository&lt;/span&gt;
git clone xxx.git

&lt;span class="c"&gt;# A venv virtual environment with libraries from uv.lock is automatically created&lt;/span&gt;
&lt;span class="c"&gt;# using the Python version specified in .python-version,&lt;/span&gt;
&lt;span class="c"&gt;# and example.py is executed within it&lt;/span&gt;
uv run example.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Very simple, isn't it?&lt;/p&gt;

&lt;h1&gt;
  
  
  Usage
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://docs.astral.sh/uv/getting-started/features/" rel="noopener noreferrer"&gt;https://docs.astral.sh/uv/getting-started/features/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The official page above serves as a cheat sheet, so if you're stuck, run &lt;code&gt;uv --help&lt;/code&gt; or refer to the above.&lt;/p&gt;

&lt;h2&gt;
  
  
  Initialize Project with uv
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://docs.astral.sh/uv/guides/projects/" rel="noopener noreferrer"&gt;https://docs.astral.sh/uv/guides/projects/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Initialize a project for uv management with &lt;code&gt;uv init&lt;/code&gt;.&lt;br&gt;
&lt;code&gt;main.py&lt;/code&gt;, &lt;code&gt;pyproject.toml&lt;/code&gt;, &lt;code&gt;.python-version&lt;/code&gt;, and &lt;code&gt;README.md&lt;/code&gt; are created.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Initialize as a project using Python 3.13.2&lt;/span&gt;
uv init &lt;span class="nt"&gt;-p&lt;/span&gt; 3.13.2

&lt;span class="c"&gt;# Running the created main.py with uv run also creates virtual environment and uv.lock&lt;/span&gt;
uv run main.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Python Management
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://docs.astral.sh/uv/concepts/python-versions/" rel="noopener noreferrer"&gt;https://docs.astral.sh/uv/concepts/python-versions/&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Check Available/Installed Python Versions
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;uv python list
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output Example:&lt;/p&gt;

&lt;p&gt;Installed versions show installation paths as follows:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;uv python list
cpython-3.14.0a6-linux-x86_64-gnu                 &amp;lt;download available&amp;gt;
cpython-3.14.0a6+freethreaded-linux-x86_64-gnu    &amp;lt;download available&amp;gt;
cpython-3.13.3-linux-x86_64-gnu                   &amp;lt;download available&amp;gt;
cpython-3.13.3+freethreaded-linux-x86_64-gnu      &amp;lt;download available&amp;gt;
cpython-3.13.2-linux-x86_64-gnu                   /home/ec2-user/.local/share/uv/python/cpython-3.13.2-linux-x86_64-gnu/bin/python3.13
cpython-3.12.10-linux-x86_64-gnu                  &amp;lt;download available&amp;gt;
cpython-3.11.12-linux-x86_64-gnu                  &amp;lt;download available&amp;gt;
cpython-3.10.17-linux-x86_64-gnu                  &amp;lt;download available&amp;gt;
cpython-3.9.22-linux-x86_64-gnu                   &amp;lt;download available&amp;gt;
cpython-3.8.20-linux-x86_64-gnu                   &amp;lt;download available&amp;gt;
cpython-3.7.9-linux-x86_64-gnu                    &amp;lt;download available&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Install Python
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;uv python install&lt;/code&gt; allows you to install Python that can be used via uv.&lt;br&gt;
This makes it possible to use installed Python versions in uv-managed projects.&lt;br&gt;
(※However, even without pre-installation, Python is automatically installed when needed with default settings, so explicit pre-installation is not mandatory.)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Example of installing 3.13&lt;/span&gt;
uv python &lt;span class="nb"&gt;install &lt;/span&gt;3.13
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;uv python &lt;span class="nb"&gt;install &lt;/span&gt;3.13
Installed Python 3.13.2 &lt;span class="k"&gt;in &lt;/span&gt;1.89s
 + cpython-3.13.2-linux-x86_64-gnu
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Note:&lt;/p&gt;

&lt;p&gt;As of v0.6.14, Python installed this way cannot be called directly with the &lt;code&gt;python&lt;/code&gt; command; you need to use &lt;code&gt;uv run&lt;/code&gt; or manually create a virtual environment with &lt;code&gt;uv venv&lt;/code&gt;, &lt;code&gt;source .venv/bin/activate&lt;/code&gt;, and then use the &lt;code&gt;python&lt;/code&gt; command (recommended is &lt;code&gt;uv run&lt;/code&gt; described later).&lt;br&gt;
&lt;a href="https://docs.astral.sh/uv/guides/install-python/#getting-started" rel="noopener noreferrer"&gt;https://docs.astral.sh/uv/guides/install-python/#getting-started&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Permanently Change Python Version Used by &lt;code&gt;uv&lt;/code&gt; Command
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://docs.astral.sh/uv/reference/cli/#uv-python-pin" rel="noopener noreferrer"&gt;https://docs.astral.sh/uv/reference/cli/#uv-python-pin&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;uv python pin&lt;/code&gt; permanently changes the Python version used by the &lt;code&gt;uv&lt;/code&gt; command.&lt;br&gt;
(It rewrites &lt;code&gt;.python-version&lt;/code&gt;.)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Example of using 3.13.2&lt;/span&gt;
uv python pin 3.13.2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Dependency Management
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Add/Update Dependencies
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;uv add&lt;/code&gt;&lt;sup id="fnref3"&gt;3&lt;/sup&gt; performs the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Install in venv virtual environment&lt;/li&gt;
&lt;li&gt;Add to dependencies in &lt;code&gt;pyproject.toml&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Update &lt;code&gt;uv.lock&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Add latest version of requests package&lt;/span&gt;
uv add requests

&lt;span class="c"&gt;# Specify version&lt;/span&gt;
uv add &lt;span class="s1"&gt;'requests==2.31.0'&lt;/span&gt;

&lt;span class="c"&gt;# Add git dependency&lt;/span&gt;
uv add git+https://github.com/psf/requests

&lt;span class="c"&gt;# Migrate from requirements.txt&lt;/span&gt;
uv add &lt;span class="nt"&gt;-r&lt;/span&gt; requirements.txt &lt;span class="nt"&gt;-c&lt;/span&gt; constraints.txt
&lt;span class="c"&gt;# If not using constraints.txt, use this&lt;/span&gt;
uv add &lt;span class="nt"&gt;-r&lt;/span&gt; requirements.txt

&lt;span class="c"&gt;# Adding --dev makes it a development dependency&lt;/span&gt;
&lt;span class="c"&gt;# (added to dev in [dependency-groups] of pyproject.toml).&lt;/span&gt;
&lt;span class="c"&gt;# Example of adding moto needed only for testing as development dependency&lt;/span&gt;
uv add moto &lt;span class="nt"&gt;--dev&lt;/span&gt;

&lt;span class="c"&gt;# Updates are also possible with uv add --upgrade&lt;/span&gt;
uv add requests &lt;span class="nt"&gt;--upgrade&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Note:&lt;/p&gt;

&lt;p&gt;If library dependencies conflict and cannot be resolved, an error occurs (for example, when you want to use pandas 2.2.3 but a dependency requires pandas &amp;lt; 2.0.0).&lt;br&gt;
In such cases, you can use the &lt;code&gt;--frozen&lt;/code&gt; flag of &lt;code&gt;uv add&lt;/code&gt; to install while ignoring dependency conflicts.&lt;br&gt;
However, since it's not written to &lt;code&gt;uv.lock&lt;/code&gt;, if you use it, I recommend understanding the risks (possibility of losing consistency between library dependencies, possibility of errors related to libraries with conflicting versions, etc.).&lt;/p&gt;

&lt;p&gt;Note:&lt;/p&gt;

&lt;p&gt;When using &lt;code&gt;uv add&lt;/code&gt;, not only the package you're trying to add but the entire project's dependencies are re-evaluated&lt;sup id="fnref4"&gt;4&lt;/sup&gt;.&lt;br&gt;
Therefore, if something that failed dependency resolution but was forcibly added with &lt;code&gt;--frozen&lt;/code&gt; is included in &lt;code&gt;pyproject.toml&lt;/code&gt; dependencies, it will error even if there's no problem with what you're trying to &lt;code&gt;uv add&lt;/code&gt;.&lt;br&gt;
In such cases, you should first remove the problematic item with &lt;code&gt;uv remove&lt;/code&gt;, then &lt;code&gt;uv add&lt;/code&gt; what you want to add, and re-add the removed item with &lt;code&gt;uv add --frozen&lt;/code&gt;.&lt;/p&gt;
&lt;h3&gt;
  
  
  Remove Dependencies
&lt;/h3&gt;

&lt;p&gt;You can remove dependencies using &lt;code&gt;uv remove&lt;/code&gt;&lt;sup id="fnref5"&gt;5&lt;/sup&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Remove requests package from dependencies&lt;/span&gt;
uv remove requests

&lt;span class="c"&gt;# Add --dev when removing development dependencies&lt;/span&gt;
uv remove moto &lt;span class="nt"&gt;--dev&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Python Execution
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://docs.astral.sh/uv/guides/scripts/" rel="noopener noreferrer"&gt;https://docs.astral.sh/uv/guides/scripts/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Use the &lt;code&gt;uv run&lt;/code&gt; command to execute Python in uv's virtual environment.&lt;br&gt;
If they don't exist on first run, virtual environment and &lt;code&gt;uv.lock&lt;/code&gt; are created.&lt;sup id="fnref6"&gt;6&lt;/sup&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Execute example.py in uv.lock's virtual environment&lt;/span&gt;
uv run example.py

&lt;span class="c"&gt;# You can also explicitly specify Python version when running scripts&lt;/span&gt;
uv run &lt;span class="nt"&gt;--python&lt;/span&gt; 3.10 example.py

&lt;span class="c"&gt;# To run python -m unittest test/unit/test_main.py with uv&lt;/span&gt;
uv run python &lt;span class="nt"&gt;-m&lt;/span&gt; unittest &lt;span class="nb"&gt;test&lt;/span&gt;/unit/test_main.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;By the way, adding the &lt;code&gt;-v&lt;/code&gt; option displays uv's internal operations in logs, which is useful for troubleshooting.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sync Virtual Environment State with &lt;code&gt;uv.lock&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://docs.astral.sh/uv/concepts/projects/sync/#syncing-the-environment" rel="noopener noreferrer"&gt;https://docs.astral.sh/uv/concepts/projects/sync/#syncing-the-environment&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;uv sync&lt;/code&gt; can synchronize the virtual environment state with the contents of &lt;code&gt;uv.lock&lt;/code&gt;.&lt;br&gt;
Since using &lt;code&gt;uv run&lt;/code&gt; guarantees that Python can be executed in the &lt;code&gt;uv.lock&lt;/code&gt; environment&lt;sup id="fnref7"&gt;7&lt;/sup&gt;, there's basically no need to explicitly run &lt;code&gt;uv sync&lt;/code&gt;, but if you want to manually activate and use the venv environment, you can synchronize the virtual environment state with the contents of &lt;code&gt;uv.lock&lt;/code&gt; by running &lt;code&gt;uv sync&lt;/code&gt; as follows:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;uv &lt;span class="nb"&gt;sync
source&lt;/span&gt; .venv/bin/activate
flask run &lt;span class="nt"&gt;-p&lt;/span&gt; 3000
python example.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Tool-Related
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Run Tools Without Installing
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://docs.astral.sh/uv/guides/tools/#running-tools" rel="noopener noreferrer"&gt;https://docs.astral.sh/uv/guides/tools/#running-tools&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;uvx&lt;/code&gt; command allows you to run tools without installing them.&lt;br&gt;
(They are actually installed in a temporary environment for &lt;code&gt;uvx&lt;/code&gt;)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Example of running ruff check&lt;/span&gt;
uvx ruff

&lt;span class="c"&gt;# Example of running with ruff 0.3.0&lt;/span&gt;
uvx ruff@0.3.0 check
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Install/Update Tools to bin
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://docs.astral.sh/uv/guides/tools/#installing-tools" rel="noopener noreferrer"&gt;https://docs.astral.sh/uv/guides/tools/#installing-tools&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For frequently used tools, you can install them to the bin directory in PATH with &lt;code&gt;uv tool install&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Example of installing ruff&lt;/span&gt;
uv tool &lt;span class="nb"&gt;install &lt;/span&gt;ruff

&lt;span class="c"&gt;# ruff is now available&lt;/span&gt;
ruff &lt;span class="nt"&gt;--version&lt;/span&gt;

&lt;span class="c"&gt;# Tools installed this way don't become available as modules, so the following will fail&lt;/span&gt;
python &lt;span class="nt"&gt;-c&lt;/span&gt; &lt;span class="s2"&gt;"import ruff"&lt;/span&gt;

&lt;span class="c"&gt;# Update ruff installed in bin to latest version&lt;/span&gt;
uv tool upgrade ruff

&lt;span class="c"&gt;# Update ruff installed in bin to version 0.4 or higher&lt;/span&gt;
uv tool &lt;span class="nb"&gt;install &lt;/span&gt;ruff&amp;gt;&lt;span class="o"&gt;=&lt;/span&gt;0.4
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  pip-Compatible CLI
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://docs.astral.sh/uv/getting-started/features/#the-pip-interface" rel="noopener noreferrer"&gt;https://docs.astral.sh/uv/getting-started/features/#the-pip-interface&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Although rarely used, I'll mention that manual environment and package management is possible with pip-compatible CLI.&lt;br&gt;
It's intended for use in legacy workflows that want to use uv with the pip interface, or cases that cannot be controlled with high-level commands.&lt;/p&gt;

&lt;p&gt;Note:&lt;/p&gt;

&lt;p&gt;Since it doesn't aim to completely mimic pip, you may encounter behavioral differences. &lt;sup id="fnref8"&gt;8&lt;/sup&gt;&lt;/p&gt;

&lt;p&gt;Simply add &lt;code&gt;uv&lt;/code&gt; before traditional &lt;code&gt;pip&lt;/code&gt; commands.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;uv pip &lt;span class="nb"&gt;install
&lt;/span&gt;uv pip list
uv pip uninstall
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Virtual environment (venv) creation is possible with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;uv venv
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Summary
&lt;/h1&gt;

&lt;p&gt;The development experience with uv is very good, so please try it!&lt;/p&gt;




&lt;ol&gt;

&lt;li id="fn1"&gt;
&lt;p&gt;&lt;a href="https://github.com/astral-sh/uv/issues/6265" rel="noopener noreferrer"&gt;https://github.com/astral-sh/uv/issues/6265&lt;/a&gt; ↩&lt;/p&gt;
&lt;/li&gt;

&lt;li id="fn2"&gt;
&lt;p&gt;&lt;a href="https://docs.astral.sh/uv/guides/projects/#uvlock" rel="noopener noreferrer"&gt;https://docs.astral.sh/uv/guides/projects/#uvlock&lt;/a&gt; ↩&lt;/p&gt;
&lt;/li&gt;

&lt;li id="fn3"&gt;
&lt;p&gt;&lt;a href="https://docs.astral.sh/uv/reference/cli/#uv-add" rel="noopener noreferrer"&gt;https://docs.astral.sh/uv/reference/cli/#uv-add&lt;/a&gt; ↩&lt;/p&gt;
&lt;/li&gt;

&lt;li id="fn4"&gt;
&lt;p&gt;&lt;a href="https://docs.astral.sh/uv/reference/resolver-internals/" rel="noopener noreferrer"&gt;https://docs.astral.sh/uv/reference/resolver-internals/&lt;/a&gt; ↩&lt;/p&gt;
&lt;/li&gt;

&lt;li id="fn5"&gt;
&lt;p&gt;&lt;a href="https://docs.astral.sh/uv/reference/cli/#uv-remove" rel="noopener noreferrer"&gt;https://docs.astral.sh/uv/reference/cli/#uv-remove&lt;/a&gt; ↩&lt;/p&gt;
&lt;/li&gt;

&lt;li id="fn6"&gt;
&lt;p&gt;&lt;a href="https://docs.astral.sh/uv/guides/projects/#project-structure" rel="noopener noreferrer"&gt;https://docs.astral.sh/uv/guides/projects/#project-structure&lt;/a&gt; ↩&lt;/p&gt;
&lt;/li&gt;

&lt;li id="fn7"&gt;
&lt;p&gt;&lt;a href="https://docs.astral.sh/uv/guides/projects/#running-commands" rel="noopener noreferrer"&gt;https://docs.astral.sh/uv/guides/projects/#running-commands&lt;/a&gt; ↩&lt;/p&gt;
&lt;/li&gt;

&lt;li id="fn8"&gt;
&lt;p&gt;&lt;a href="https://docs.astral.sh/uv/pip/compatibility/" rel="noopener noreferrer"&gt;https://docs.astral.sh/uv/pip/compatibility/&lt;/a&gt; ↩&lt;/p&gt;
&lt;/li&gt;

&lt;/ol&gt;

</description>
      <category>python</category>
      <category>uv</category>
    </item>
    <item>
      <title>Motivation and Methods for Migrating Existing Python Projects to uv</title>
      <dc:creator>xrc</dc:creator>
      <pubDate>Sat, 14 Jun 2025 05:01:46 +0000</pubDate>
      <link>https://dev.to/xrc/motivation-and-methods-for-migrating-existing-python-projects-to-uv-2228</link>
      <guid>https://dev.to/xrc/motivation-and-methods-for-migrating-existing-python-projects-to-uv-2228</guid>
      <description>&lt;h1&gt;
  
  
  Article Overview
&lt;/h1&gt;

&lt;p&gt;This article describes the motivation and methods for migrating existing Python projects to uv management.&lt;br&gt;
The detailed usage of uv is not covered in this article (a separate article is planned).&lt;/p&gt;

&lt;p&gt;Note: The content of this article is based on information from uv v0.6.13. Please refer to the official documentation for the latest information.&lt;/p&gt;
&lt;h1&gt;
  
  
  Target Audience
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;People who are interested in uv but hesitate to migrate

&lt;ul&gt;
&lt;li&gt;→ I recommend creating a branch and trying migration to experience the usability.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h1&gt;
  
  
  Common Existing Configuration of Python Projects
&lt;/h1&gt;

&lt;p&gt;We assume the following common configuration for existing Python projects:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Management Target&lt;/th&gt;
&lt;th&gt;Management Method&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Python Version&lt;/td&gt;
&lt;td&gt;pyenv&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Dependencies&lt;/td&gt;
&lt;td&gt;pip + requirements.txt&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Virtual Environment&lt;/td&gt;
&lt;td&gt;pyenv-virtualenv or venv&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;This is a common configuration when not using modern package managers.&lt;/p&gt;
&lt;h1&gt;
  
  
  Issues with the Above Configuration Management
&lt;/h1&gt;

&lt;p&gt;When managing with the above configuration, you encounter the following issues.&lt;br&gt;
I've also included the causes and possible countermeasures.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Issue&lt;/th&gt;
&lt;th&gt;Cause&lt;/th&gt;
&lt;th&gt;Countermeasures&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Dependency resolution often fails during library installation, forcing manual investigation and resolution&lt;/td&gt;
&lt;td&gt;pip's dependency resolution algorithm is relatively naive&lt;sup id="fnref1"&gt;1&lt;/sup&gt;, making it impossible to build completely consistent dependencies overall&lt;/td&gt;
&lt;td&gt;• Use tools with more advanced dependency resolution algorithms&lt;br&gt; • Use tools with clear error messages&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Complete environment reproduction is difficult because transitive dependencies cannot be managed (especially in machine learning, complete environment reproduction is desirable)&lt;/td&gt;
&lt;td&gt;requirements.txt only manages directly dependent libraries&lt;sup id="fnref2"&gt;2&lt;/sup&gt;
&lt;/td&gt;
&lt;td&gt;• Use tools with lock file mechanisms&lt;br&gt; • Containerize each application&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;When running locally, forgetting to activate the virtual environment and running pip install installs globally, easily contaminating the global environment&lt;/td&gt;
&lt;td&gt;pyenv-virtualenv and venv virtual environments require manual activation&lt;/td&gt;
&lt;td&gt;• Use tools that can use virtual environments without being conscious of it&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Production dependencies and development dependencies tend to be mixed together, making it difficult to configure minimal environments, properly separate CI pipelines, and making them fragile/unclear&lt;/td&gt;
&lt;td&gt;Everything tends to be put in a single requirements.txt&lt;/td&gt;
&lt;td&gt;• Use tools that can manage them separately&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;
&lt;h1&gt;
  
  
  Brief Explanation of uv
&lt;/h1&gt;

&lt;p&gt;Using uv, a Python development environment management tool, can solve the above issues.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://docs.astral.sh/uv/" rel="noopener noreferrer"&gt;https://docs.astral.sh/uv/&lt;/a&gt;&lt;br&gt;
You can understand the overview of uv by looking at the Introduction page above.&lt;/p&gt;

&lt;p&gt;However, let me briefly list the features here:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Can manage Python versions, dependencies, and virtual environments with uv alone&lt;/li&gt;
&lt;li&gt;Has an intuitive CLI (similar to poetry)&lt;/li&gt;
&lt;li&gt;Operates extremely fast (uv is written in Rust and solves dependency resolution problems quickly)&lt;/li&gt;
&lt;li&gt;Has cross-platform lock files&lt;/li&gt;
&lt;li&gt;Has advanced dependency resolution algorithms&lt;/li&gt;
&lt;li&gt;Supports macOS, Linux, Windows&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For Rust users, it's a "Cargo in Python" philosophy tool, so the user experience is close to Cargo and very user-friendly.&lt;/p&gt;

&lt;p&gt;I compared it with Poetry and PDM, but I think uv is the way to go now as the latest tool.&lt;br&gt;
uv has the advantage of being able to manage Python versions, making other tools unnecessary, and operating surprisingly fast compared to them.&lt;br&gt;
Although uv is in version 0.x, it is already considered &lt;a href="https://github.com/astral-sh/uv/issues/8941" rel="noopener noreferrer"&gt;Stable&lt;/a&gt; and core functions are already stable, so I think it's ready for production use.&lt;br&gt;
In the latest Technology Radar (April 2025, Vol32), it received the highest rank of Adopt (strongly recommended for adoption if it fits the project).&lt;/p&gt;
&lt;h1&gt;
  
  
  Preparation: Installing uv
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://docs.astral.sh/uv/getting-started/installation/" rel="noopener noreferrer"&gt;https://docs.astral.sh/uv/getting-started/installation/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Please install the standalone version from the above (installing with &lt;code&gt;pip install&lt;/code&gt; ties it to the Python environment, so if you can install the standalone version, that's better).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;curl &lt;span class="nt"&gt;-LsSf&lt;/span&gt; https://astral.sh/uv/install.sh | sh
downloading uv 0.6.13 x86_64-unknown-linux-gnu
no checksums to verify
installing to /home/ec2-user/.local/bin
  uv
  uvx
everything&lt;span class="s1"&gt;'s installed!
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Migration Steps for Existing Projects to uv Management
&lt;/h1&gt;

&lt;p&gt;We assume migrating a repository called my-python-repo managed with the above configuration to uv management.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://docs.astral.sh/uv/guides/projects/" rel="noopener noreferrer"&gt;https://docs.astral.sh/uv/guides/projects/&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  1. &lt;code&gt;uv init&lt;/code&gt; &amp;amp; Setting Python Version
&lt;/h2&gt;

&lt;p&gt;By running the following in the project root, we initialize it as a uv-managed project using Python 3.13.2.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;uv init &lt;span class="nt"&gt;-p&lt;/span&gt; 3.13.2
Initialized project &lt;span class="sb"&gt;`&lt;/span&gt;my-python-repo&lt;span class="sb"&gt;`&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will create &lt;code&gt;main.py&lt;/code&gt;, &lt;code&gt;pyproject.toml&lt;/code&gt;, &lt;code&gt;.python-version&lt;/code&gt;, and &lt;code&gt;README.md&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;main.py&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Hello from my-python-repo!&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;__name__&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;__main__&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;pyproject.toml&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;project&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="n"&gt;name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;my-python-repo&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="n"&gt;version&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;0.1.0&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="n"&gt;description&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Add your description here&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="n"&gt;readme&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;README.md&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="n"&gt;requires&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;python&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;&amp;gt;=3.13.2&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="n"&gt;dependencies&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;.python-version&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;3.13.2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When you run &lt;code&gt;uv run main.py&lt;/code&gt;, a virtual environment (.venv directory&lt;sup id="fnref3"&gt;3&lt;/sup&gt;) and &lt;code&gt;uv.lock&lt;/code&gt; are created.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;uv run main.py
Using CPython 3.13.2
Creating virtual environment at: .venv
Hello from my-python-repo!
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;main.py&lt;/code&gt; is not needed, so you can delete it.&lt;br&gt;
Also, you should update the meta information such as the project name in &lt;code&gt;pyproject.toml&lt;/code&gt; as needed.&lt;/p&gt;
&lt;h2&gt;
  
  
  2. Adding Dependencies to &lt;code&gt;pyproject.toml&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://docs.astral.sh/uv/guides/projects/#managing-dependencies" rel="noopener noreferrer"&gt;https://docs.astral.sh/uv/guides/projects/#managing-dependencies&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Since uv manages dependencies in &lt;code&gt;pyproject.toml&lt;/code&gt;, we migrate the current &lt;code&gt;requirements.txt&lt;/code&gt; content there.&lt;/p&gt;

&lt;p&gt;Migration from &lt;code&gt;requirements.txt&lt;/code&gt; can be done with &lt;code&gt;uv add -r&lt;/code&gt;, but first, if &lt;code&gt;requirements.txt&lt;/code&gt; contains both production-required libraries and development-only libraries, separate them into two.&lt;/p&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;requirements-new-lib.txt&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pyarrow==19.0.1
pandas==2.2.3
lightgbm==4.6.0
...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;requirements-new-dev.txt&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;moto==5.1.3
my-python-test-libs==1.4.2
...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Using the above, add dependencies to &lt;code&gt;pyproject.toml&lt;/code&gt; with the following commands:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;uv add &lt;span class="nt"&gt;-r&lt;/span&gt; requirements-new-lib.txt
&lt;span class="nv"&gt;$ &lt;/span&gt;uv add &lt;span class="nt"&gt;-r&lt;/span&gt; requirements-new-dev.txt &lt;span class="nt"&gt;--dev&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If there are conflicting dependencies that cannot be resolved, you will get an error like the following.&lt;br&gt;
For example, if there is a repository called my-python-test-libs (fictitious) like in the above example,&lt;br&gt;
and it requires pandas &amp;lt; 2.0.0, it will conflict with &lt;code&gt;pandas==2.2.3&lt;/code&gt;.&lt;br&gt;
If my-python-test-libs is under your management, it's desirable to test that pandas 2.2.3 can be used without problems and update the dependency.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  Updated ssh://git@xxx.org/my-techorg/my-python-test-libs.git &lt;span class="o"&gt;(&lt;/span&gt;6gp94f50b4dc39402f612f9df7bdd6aabbc53471&lt;span class="o"&gt;)&lt;/span&gt;
  × No solution found when resolving dependencies:
  ╰─▶ Because your project depends on &lt;span class="nv"&gt;pandas&lt;/span&gt;&lt;span class="o"&gt;==&lt;/span&gt;2.2.3 and my-python-test-libs&lt;span class="o"&gt;==&lt;/span&gt;1.4.2 depends on pandas&amp;gt;&lt;span class="o"&gt;=&lt;/span&gt;1.3.0,&amp;lt;2.0.0, we can
      conclude that your project and my-python-test-libs&lt;span class="o"&gt;==&lt;/span&gt;1.4.2 are incompatible.
      And because only my-python-test-libs&lt;span class="o"&gt;==&lt;/span&gt;1.4.2 is available and my-python-repo:dev depends on my-python-test-libs, we can conclude that
      your project and my-python-repo:dev are incompatible.
      And because your project requires your project and my-python-repo:dev, we can conclude that your project&lt;span class="s1"&gt;'s
      requirements are unsatisfiable.
  help: If you want to add the package regardless of the failed resolution, provide the `--frozen` flag to skip locking
        and syncing.
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;However, using &lt;code&gt;--frozen&lt;/code&gt; allows you to force addition without recording to the lock file&lt;sup id="fnref4"&gt;4&lt;/sup&gt;.&lt;br&gt;
If you really want to add it as is, you should understand that runtime errors may occur due to how my-python-test-libs uses pandas.&lt;/p&gt;
&lt;h2&gt;
  
  
  3. Testing
&lt;/h2&gt;

&lt;p&gt;Confirm that it works correctly after uv migration by running the application or executing automated tests.&lt;br&gt;
For example, to run a uv-managed Python application, execute &lt;code&gt;uv run&lt;/code&gt; as follows:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;uv run my-python-repo-main.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  4. Clean Up Unnecessary Items
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Delete unnecessary requirements.txt&lt;/li&gt;
&lt;li&gt;If there are shell scripts executing Python scripts, rewrite them to go through uv
and other cleanup tasks to complete the migration.&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Summary
&lt;/h1&gt;

&lt;p&gt;The migration is just this much, and I think it can be done easily without any particular difficulty.&lt;br&gt;
The development experience with uv is very good, so I recommend it.&lt;/p&gt;

&lt;h1&gt;
  
  
  References
&lt;/h1&gt;

&lt;ol&gt;
&lt;li&gt;&lt;a href="https://docs.astral.sh/uv/" rel="noopener noreferrer"&gt;https://docs.astral.sh/uv/&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;




&lt;ol&gt;

&lt;li id="fn1"&gt;
&lt;p&gt;pip seems to be getting stronger ↩&lt;/p&gt;
&lt;/li&gt;

&lt;li id="fn2"&gt;
&lt;p&gt;You can create a lock file with &lt;code&gt;pip freeze &amp;gt; requirements.lock&lt;/code&gt;, but you probably don't do that... ↩&lt;/p&gt;
&lt;/li&gt;

&lt;li id="fn3"&gt;
&lt;p&gt;uv also uses .venv as a virtual environment (but it's designed to be usable without being conscious of it) ↩&lt;/p&gt;
&lt;/li&gt;

&lt;li id="fn4"&gt;
&lt;p&gt;&lt;a href="https://docs.astral.sh/uv/reference/cli/#uv-add" rel="noopener noreferrer"&gt;https://docs.astral.sh/uv/reference/cli/#uv-add&lt;/a&gt; ↩&lt;/p&gt;
&lt;/li&gt;

&lt;/ol&gt;

</description>
      <category>python</category>
      <category>uv</category>
    </item>
    <item>
      <title>Introducing Code Review Best Practices Repository</title>
      <dc:creator>xrc</dc:creator>
      <pubDate>Thu, 06 Mar 2025 16:57:27 +0000</pubDate>
      <link>https://dev.to/xrc/introducing-code-review-best-practices-repository-3cb4</link>
      <guid>https://dev.to/xrc/introducing-code-review-best-practices-repository-3cb4</guid>
      <description>&lt;p&gt;I'd like to share a repository I've put together that compiles various code review best practices. This collection brings together insights from my personal experience, along with valuable knowledge gathered from books and technical articles.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/teihenn/effective-code-review" rel="noopener noreferrer"&gt;https://github.com/teihenn/effective-code-review&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What's Inside
&lt;/h2&gt;

&lt;p&gt;The repository covers several aspects of the code review process:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Benefits of code reviews - Why they matter for team productivity and code quality&lt;/li&gt;
&lt;li&gt;Practical coding tips - Writing code that's easier to review&lt;/li&gt;
&lt;li&gt;PR preparation guidelines - How to structure your changes for efficient reviews&lt;/li&gt;
&lt;li&gt;Reviewer best practices - Approaches for providing constructive feedback&lt;/li&gt;
&lt;li&gt;Reviewee best practices - How to receive and implement feedback effectively&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why I Created This Repos
&lt;/h2&gt;

&lt;p&gt;As code reviews became an increasingly significant part of my workflow, I wanted to organize the knowledge I've gathered to make the process more efficient and valuable for everyone involved. While many of these practices come from established sources and experienced developers, I've curated them based on what I've found most helpful.&lt;/p&gt;

&lt;h2&gt;
  
  
  Available in Multiple Languages
&lt;/h2&gt;

&lt;p&gt;The content is available in both Japanese and English to make it accessible to a wider audience.&lt;/p&gt;

&lt;h2&gt;
  
  
  Exploring the Repository
&lt;/h2&gt;

&lt;p&gt;If you're looking to improve your code review process or just curious about best practices, feel free to explore the repository. I welcome any feedback or additional insights you might have!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/teihenn/effective-code-review" rel="noopener noreferrer"&gt;https://github.com/teihenn/effective-code-review&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Note: This is a curated collection of practices from various sources, including published books and articles, combined with personal observations. Full references are included in the repository.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>codereview</category>
      <category>productivity</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Edit .json.gz Files Effortlessly with jgze – A Flexible CLI Tool</title>
      <dc:creator>xrc</dc:creator>
      <pubDate>Sun, 17 Nov 2024 12:20:26 +0000</pubDate>
      <link>https://dev.to/xrc/edit-jsongz-files-effortlessly-with-jgze-a-flexible-cli-tool-4c4k</link>
      <guid>https://dev.to/xrc/edit-jsongz-files-effortlessly-with-jgze-a-flexible-cli-tool-4c4k</guid>
      <description>&lt;p&gt;Working with .json.gz files can be tedious, especially when you need to extract, edit, and recompress them manually. Meet jgze, a command-line tool that simplifies this process by allowing you to directly edit .json.gz files in a seamless workflow.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/teihenn/jgze" rel="noopener noreferrer"&gt;https://github.com/teihenn/jgze&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  What is jgze?
&lt;/h1&gt;

&lt;p&gt;jgze is a CLI tool designed to let you edit .json.gz files without the hassle of separate decompression and recompression steps. It also provides flexibility in handling file formats during the editing process.&lt;/p&gt;

&lt;h2&gt;
  
  
  Key Features
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Direct Editing:&lt;/strong&gt; Open and edit .json.gz files as if they were plain JSON files.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pretty Formatting During Editing:&lt;/strong&gt; Regardless of the original file's format (compact or JSON Lines), the tool presents the content in a pretty-printed, readable structure during editing.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Automatic Reformatting:&lt;/strong&gt; After editing, jgze saves the file back to its original format (e.g., compact, pretty-printed, or JSON Lines).&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Usage
&lt;/h1&gt;

&lt;ol&gt;
&lt;li&gt;Run jgze to open your .json.gz file in your preferred editor.(default: vim)&lt;/li&gt;
&lt;li&gt;Edit the content in a pretty-printed format for easier readability.&lt;/li&gt;
&lt;li&gt;Save and close – the file will automatically be compressed and reformatted to its original structure.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Example usage&lt;/span&gt;
jgze your_file.json.gz
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Example: Compact to Pretty and Back to Compact
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Original (Compact Format):
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nl"&gt;"key1"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="s2"&gt;"value1"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nl"&gt;"key2"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="s2"&gt;"value2"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nl"&gt;"key3"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"value3"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Editing (Pretty Format):
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"key1"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"value1"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"key2"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"value2"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"key3"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"value3"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Suppose you edited this as follows:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"key1"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"value1"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"key2"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"value2"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Saved File (Reverted to Compact):
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nl"&gt;"key1"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="s2"&gt;"value1"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nl"&gt;"key2"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="s2"&gt;"value2"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  Why Use jgze?
&lt;/h1&gt;

&lt;p&gt;Traditional workflows with .json.gz files require decompression, manual editing, and recompression – a repetitive and error-prone process. With jgze, you can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Save time by skipping manual steps.&lt;/li&gt;
&lt;li&gt;Easily read and edit JSON content in pretty-printed format.&lt;/li&gt;
&lt;li&gt;Preserve the file’s original format, ensuring compatibility with downstream systems.&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  Installation
&lt;/h1&gt;

&lt;p&gt;You can install jgze via Cargo or download the pre-built binaries from the GitHub releases page.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Install via Cargo&lt;/span&gt;
cargo &lt;span class="nb"&gt;install &lt;/span&gt;jgze
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Alternatively, download the appropriate binary for your platform from the GitHub repository.&lt;/p&gt;

&lt;h1&gt;
  
  
  Example Use Case
&lt;/h1&gt;

&lt;p&gt;Imagine you're working with large .json.gz files. Instead of juggling multiple tools, use jgze to directly edit and maintain the file format.&lt;/p&gt;

&lt;h1&gt;
  
  
  Get Started
&lt;/h1&gt;

&lt;p&gt;jgze is open-source and available on GitHub. Feel free to explore the repository.&lt;/p&gt;

</description>
      <category>json</category>
      <category>cli</category>
      <category>opensource</category>
      <category>tooling</category>
    </item>
  </channel>
</rss>
