<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Poetry on The Edge Cases</title>
    <link>https://www.kylestratis.com/tags/poetry/</link>
    <description>Recent content in Poetry on The Edge Cases</description>
    <generator>Hugo</generator>
    <language>en</language>
    <copyright>© 2025</copyright>
    <lastBuildDate>Fri, 18 Sep 2026 22:38:55 -0400</lastBuildDate>
    <atom:link href="https://www.kylestratis.com/tags/poetry/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Installing Dependencies from Github Repos with Pip and Poetry</title>
      <link>https://www.kylestratis.com/notes/installing-dependencies-from-github-repos-with-pip-and-poetry/</link>
      <pubDate>Thu, 16 Nov 2023 20:24:35 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/installing-dependencies-from-github-repos-with-pip-and-poetry/</guid>
      <description>&lt;p&gt;There is a standardized way to install Python packages from VCS repos. The examples will show a complex case that include a branch and subdirectory&lt;/p&gt;&#xA;&lt;h2 id=&#34;pyprojecttoml&#34;&gt;pyproject.toml&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;package-name = {git = &amp;quot;git@github.com:&amp;lt;User&amp;gt;/repo-name.git}&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;package-name = {git = &amp;quot;git@github.com:&amp;lt;User&amp;gt;/repo-name.git&amp;quot;, branch = &amp;quot;test-branch&amp;quot;, subdirectory = &amp;quot;repo_dir&amp;quot;}&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;requirementstxt&#34;&gt;requirements.txt&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;package-name @ git+ssh://git@github.com/&amp;lt;User&amp;gt;/repo-name.git&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;package-name @ git+ssh://git@github.com/&amp;lt;User&amp;gt;/repo-name.git@ptest-branch#subdirectory=repo_dir&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;pip&#34;&gt;pip&lt;/h2&gt;&#xA;&lt;p&gt;This is basically the same format as requirements.txt.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;code&gt;pip install &amp;quot;package-name @ git+ssh://git@github.com/&amp;lt;User&amp;gt;/repo-name.git&amp;quot;&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;code&gt;pip install &amp;quot;package-name @ git+ssh://git@github.com/&amp;lt;User&amp;gt;/repo-name.git@ptest-branch#subdirectory=repo_dir&amp;quot;&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;private-repos&#34;&gt;Private repos&lt;/h2&gt;&#xA;&lt;p&gt;To install from private repos, simply ensure your Github keys are set up on your machine and that they are linked to your Github account (and that you have access to the private accounts).&lt;/p&gt;</description>
    </item>
    <item>
      <title>Using Entry Points in Poetry</title>
      <link>https://www.kylestratis.com/notes/using-entry-points-in-poetry/</link>
      <pubDate>Wed, 27 Apr 2022 00:59:17 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/using-entry-points-in-poetry/</guid>
      <description>&lt;p&gt;same: &lt;a href=&#34;https://www.kylestratis.com/notes/using-poetry-to-change-python-versions-and-create-new-virtual-environment/&#34;&gt;Using Poetry to Change Python Versions and Create New Virtual Environment&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;using-entry-points-in-poetry&#34;&gt;Using Entry Points in Poetry&lt;/h2&gt;&#xA;&lt;p&gt;If you need to use &lt;a href=&#34;https://stackoverflow.com/questions/774824/explain-python-entry-points&#34;&gt;entry points&lt;/a&gt; in a Poetry project, you can use a feature in &lt;code&gt;pyproject.toml&lt;/code&gt; for the same behavior as in setuptools. This feature is the heading &lt;code&gt;[tool.poetry.scripts]&lt;/code&gt;. Under this, you create the linkage between a command and a function in your script in the form of &lt;code&gt;cmd = &amp;quot;package.module.path:function&amp;quot;&lt;/code&gt;, giving the fully qualified location of the function using the same dot notation as you would with an &lt;code&gt;import&lt;/code&gt; statement.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Using Poetry to Change Python Versions and Create New Virtual Environment</title>
      <link>https://www.kylestratis.com/notes/using-poetry-to-change-python-versions-and-create-new-virtual-environment/</link>
      <pubDate>Fri, 25 Mar 2022 00:05:44 +0000</pubDate>
      <guid>https://www.kylestratis.com/notes/using-poetry-to-change-python-versions-and-create-new-virtual-environment/</guid>
      <description>&lt;p&gt;With Poetry, to change an underlying Python version (for testing, etc.) and create a new virtualenv on top of that, use &lt;code&gt;poetry env use /PATH/TO/VERSION/BINARY&lt;/code&gt;. For pyenv, this will be &lt;code&gt;poetry env use ~/.pyenv/versions/x.y.z/bin/python3&lt;/code&gt;. This will create and activate a new virtual environment, but it won&amp;rsquo;t show up automatically in the shell. To make it show up, get the full path of the activated virtual environment with &lt;code&gt;poetry env list --full-path&lt;/code&gt;, then use that with &lt;code&gt;source /VIRTUALENV/PATH/bin/activate&lt;/code&gt;.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
