<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="/atom.xsl" type="text/xsl"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title>Posts tagged: blog</title>
  <id>https://pype.dev/tags/blog/atom.xml</id>
  <updated>2025-07-16T06:18:00Z</updated>
  <subtitle>All posts with the tag &#34;blog&#34;</subtitle>
  <link href="https://pype.dev/tags/blog/" rel="alternate" type="text/html"></link>
  <link href="https://pype.dev/tags/blog/atom.xml" rel="self" type="application/atom+xml"></link>
  <author>
    <name>Nic Payne</name>
  </author>
  <generator uri="https://github.com/WaylonWalker/markata-go">markata-go</generator>
  <entry>
    <title>Shotput</title>
    <id>https://pype.dev/shotput/</id>
    <updated>2025-07-16T06:18:00Z</updated>
    <published>2025-07-16T06:18:00Z</published>
    <link href="https://pype.dev/shotput/" rel="alternate" type="text/html"></link>
    <summary type="text">This is from i-built-a-simple-app-for-adding-images-to-my-blog</summary>
    <content type="html">&lt;p&gt;This is from &lt;a href=&#34;/i-built-a-simple-app-for-adding-images-to-my-blog/&#34; class=&#34;wikilink&#34; data-title=&#34;I built a simple app for adding images to my blog&#34; data-description=&#34;I built a simple fastAPI app called &amp;#34;shotput&amp;#34; that I run locally inside a git repo where I save images for my blog. The app is simple:&#34; data-date=&#34;2025-06-07&#34; data-preview=&#34;I built a simple fastAPI app called &amp;#34;shotput&amp;#34; that I run locally inside a git repo where I save images for my blog. The app is simple:&#34;&gt;I built a simple app for adding images to my blog&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;overview&#34;&gt;&lt;span class=&#34;heading-wear-glyph&#34;&gt;Overview&lt;/span&gt; &lt;a href=&#34;#overview&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;Shotput is a simple webapp backed by a git repo that allows you to paste a screenshot from your clipboard, it gets put into the repo and pushed, and you get a link back to using that image via statically&amp;rsquo;s CDN in your website.&lt;/p&gt;&#xA;&lt;h2 id=&#34;example&#34;&gt;&lt;span class=&#34;heading-wear-glyph&#34;&gt;Example&lt;/span&gt; &lt;a href=&#34;#example&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;figure&gt;&#xA;&lt;img src=&#34;https://cdn.statically.io/gh/pypeaday/images.pype.dev/main/blog-media/20250607130609_dadd33eb.png&#34; alt=&#34;20250607130609_dadd33eb.png&#34;&gt;&#xA;&lt;/figure&gt;&#xA;&lt;p&gt;pasting an image let&amp;rsquo;s you copy the markdown link for easy pasting&lt;/p&gt;&#xA;&lt;pre class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;![&lt;span class=&#34;nt&#34;&gt;20250607130609_dadd33eb.png&lt;/span&gt;](&lt;span class=&#34;na&#34;&gt;https://cdn.statically.io/gh/pypeaday/images.pype.dev/main/blog-media/20250607130609_dadd33eb.png&lt;/span&gt;)&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;concerns&#34;&gt;&lt;span class=&#34;heading-wear-glyph&#34;&gt;Concerns&lt;/span&gt; &lt;a href=&#34;#concerns&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;Currently this is deployed with an ssh key mounted into the container that I&#xA;put into a zfs dataset manually. Per &lt;a href=&#34;/2025-07-16-notes/#Wants&#34; class=&#34;wikilink&#34; data-title=&#34;2025-07-16 Notes&#34; data-description=&#34;yesterday - 2025-07-15-notes&#34; data-date=&#34;2025-07-16&#34;&gt;2025-07-16 Notes&lt;/a&gt; I&amp;rsquo;m struggling&#xA;with the key sharing model&amp;hellip;&lt;/p&gt;&#xA;</content>
    <author>
      <name>Nic Payne</name>
      <uri>https://pype.dev</uri>
    </author>
  </entry>
  <entry>
    <title>💭 Tyblog | systemd has been a complete, utter, unmitigated success</title>
    <id>https://pype.dev/thoughts-745/</id>
    <updated>2025-07-11T11:00:54Z</updated>
    <published>2025-07-11T11:00:54Z</published>
    <link href="https://pype.dev/thoughts-745/" rel="alternate" type="text/html"></link>
    <summary type="text">I found this post on systemd this morning, and although I&#39;ve been a Linux user for around 6 years now, there&#39;s some leve</summary>
    <content type="html">&lt;a href=&#34;https://blog.tjll.net/the-systemd-revolution-has-been-a-success/&#34;&gt;&#xA;    &lt;img&#xA;        src=&#34;https://shots.wayl.one/shot/?url=https://blog.tjll.net/the-systemd-revolution-has-been-a-success/&amp;height=450&amp;width=800&amp;scaled_width=800&amp;scaled_height=450&amp;selectors=&#34;&#xA;        alt=&#34;shot of post - Tyblog | systemd has been a complete, utter, unmitigated success&#34;&#xA;        height=450&#xA;        width=800&#xA;    &gt;&#xA;&lt;/a&gt;&#xA;&lt;p&gt;Here&amp;rsquo;s my thought on &lt;a href=&#34;https://blog.tjll.net/the-systemd-revolution-has-been-a-success/&#34;&gt;Tyblog | systemd has been a complete, utter, unmitigated success&lt;/a&gt;&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;p&gt;I found this post on systemd this morning, and although I&amp;rsquo;ve been a Linux user for around 6 years now, there&amp;rsquo;s some levels of it that are pretty foreign to me. One of the things I never got was the drama around systemd - but that&amp;rsquo;s because I wasn&amp;rsquo;t around in the beforefore times, I don&amp;rsquo;t use cron THAT MUCH, and I&amp;rsquo;ve only had to setup a few systemd unit files - not enough to generate a real opinion on it.&#xA;But lately I&amp;rsquo;m looking into more automation at home - and some stuff is fun to put into an overkill of a platform for a homelab, like temporal, but some stuff should probably be run in more hardened ways (backups for example) - so getting a little download this morning on systemd from a clearly seasoned Linux user is a nice addition to my hot cup of coffee.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;div class=&#34;admonition note&#34;&gt;&#xA;&lt;p class=&#34;admonition-title&#34;&gt;Note&lt;/p&gt;&#xA;&lt;p&gt;This is one of [[ my-thoughts ]]. I picked this up from &lt;a href=&#34;https://waylonwalker.com&#34;&gt;Waylon Walker&lt;/a&gt;(&lt;a href=&#34;https://thoughts.waylonwalker.com&#34;&gt;https://thoughts.waylonwalker.com&lt;/a&gt;). It&amp;rsquo;s a short note that I make about someone else&amp;rsquo;s content online.  Learn more about the process &lt;a href=&#34;/thoughts/&#34; class=&#34;wikilink&#34; data-title=&#34;Thoughts&#34; data-description=&#34;My thoughts are found at my thoughts feed&#34; data-date=&#34;2025-06-09&#34; data-preview=&#34;My thoughts are found at my thoughts feed&#34;&gt;Thoughts&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/div&gt;&#xA;</content>
    <author>
      <name>Nic Payne</name>
      <uri>https://pype.dev</uri>
    </author>
  </entry>
  <entry>
    <title>💭 { TechDufus } | Blog</title>
    <id>https://pype.dev/thoughts-729/</id>
    <updated>2025-07-02T11:09:01Z</updated>
    <published>2025-07-02T11:09:01Z</published>
    <link href="https://pype.dev/thoughts-729/" rel="alternate" type="text/html"></link>
    <summary type="text">Just came across TechDufus today... love his blog style... it&#39;s beautiful... definitely not gonna potentially rip this o</summary>
    <content type="html">&lt;a href=&#34;https://techdufus.com/blog/&#34;&gt;&#xA;    &lt;img&#xA;        src=&#34;https://shots.wayl.one/shot/?url=https://techdufus.com/blog/&amp;height=450&amp;width=800&amp;scaled_width=800&amp;scaled_height=450&amp;selectors=&#34;&#xA;        alt=&#34;shot of post - { TechDufus } | Blog&#34;&#xA;        height=450&#xA;        width=800&#xA;    &gt;&#xA;&lt;/a&gt;&#xA;&lt;p&gt;Here&amp;rsquo;s my thought on &lt;a href=&#34;https://techdufus.com/blog/&#34;&gt;{ TechDufus } | Blog&lt;/a&gt;&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;p&gt;Just came across TechDufus today&amp;hellip; love his blog style&amp;hellip; it&amp;rsquo;s beautiful&amp;hellip; definitely not gonna potentially rip this off&amp;hellip;&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;I like the estimated reading time&lt;/li&gt;&#xA;&lt;li&gt;the tree/ls like view of the posts is super cool&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;hr&gt;&#xA;&lt;div class=&#34;admonition note&#34;&gt;&#xA;&lt;p class=&#34;admonition-title&#34;&gt;Note&lt;/p&gt;&#xA;&lt;p&gt;This is one of [[ my-thoughts ]]. I picked this up from &lt;a href=&#34;https://waylonwalker.com&#34;&gt;Waylon Walker&lt;/a&gt;(&lt;a href=&#34;https://thoughts.waylonwalker.com&#34;&gt;https://thoughts.waylonwalker.com&lt;/a&gt;). It&amp;rsquo;s a short note that I make about someone else&amp;rsquo;s content online.  Learn more about the process &lt;a href=&#34;/thoughts/&#34; class=&#34;wikilink&#34; data-title=&#34;Thoughts&#34; data-description=&#34;My thoughts are found at my thoughts feed&#34; data-date=&#34;2025-06-09&#34; data-preview=&#34;My thoughts are found at my thoughts feed&#34;&gt;Thoughts&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/div&gt;&#xA;</content>
    <author>
      <name>Nic Payne</name>
      <uri>https://pype.dev</uri>
    </author>
  </entry>
  <entry>
    <title>💭 A Brief History &amp; Ethos of the Digital Garden</title>
    <id>https://pype.dev/thoughts-701/</id>
    <updated>2025-06-17T11:56:10Z</updated>
    <published>2025-06-17T11:56:10Z</published>
    <link href="https://pype.dev/thoughts-701/" rel="alternate" type="text/html"></link>
    <summary type="text">I am interested in the topic of &#34;digital gardening&#34;, and I didn&#39;t realize how long the term has been around. As a relati</summary>
    <content type="html">&lt;a href=&#34;https://maggieappleton.com/garden-history/&#34;&gt;&#xA;    &lt;img&#xA;        src=&#34;https://shots.wayl.one/shot/?url=https://maggieappleton.com/garden-history/&amp;height=450&amp;width=800&amp;scaled_width=800&amp;scaled_height=450&amp;selectors=&#34;&#xA;        alt=&#34;shot of post - A Brief History &amp; Ethos of the Digital Garden&#34;&#xA;        height=450&#xA;        width=800&#xA;    &gt;&#xA;&lt;/a&gt;&#xA;&lt;p&gt;Here&amp;rsquo;s my thought on &lt;a href=&#34;https://maggieappleton.com/garden-history/&#34;&gt;A Brief History &amp;amp; Ethos of the Digital Garden&lt;/a&gt;&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;p&gt;I am interested in the topic of &amp;ldquo;digital gardening&amp;rdquo;, and I didn&amp;rsquo;t realize how long the term has been around. As a relatively new member of the blogging community I&amp;rsquo;d like to formulate my own understanding and continue to grow in practicing tending to what I put out their in the digi-space.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;div class=&#34;admonition note&#34;&gt;&#xA;&lt;p class=&#34;admonition-title&#34;&gt;Note&lt;/p&gt;&#xA;&lt;p&gt;This is one of [[ my-thoughts ]]. I picked this up from &lt;a href=&#34;https://waylonwalker.com&#34;&gt;Waylon Walker&lt;/a&gt;(&lt;a href=&#34;https://thoughts.waylonwalker.com&#34;&gt;https://thoughts.waylonwalker.com&lt;/a&gt;). It&amp;rsquo;s a short note that I make about someone else&amp;rsquo;s content online.  Learn more about the process &lt;a href=&#34;/thoughts/&#34; class=&#34;wikilink&#34; data-title=&#34;Thoughts&#34; data-description=&#34;My thoughts are found at my thoughts feed&#34; data-date=&#34;2025-06-09&#34; data-preview=&#34;My thoughts are found at my thoughts feed&#34;&gt;Thoughts&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/div&gt;&#xA;</content>
    <author>
      <name>Nic Payne</name>
      <uri>https://pype.dev</uri>
    </author>
  </entry>
  <entry>
    <title>💭 Visualizing My Blog’s Internal Links - Jim Nielsen’s Blog</title>
    <id>https://pype.dev/thoughts-697/</id>
    <updated>2025-06-16T11:26:29Z</updated>
    <published>2025-06-16T11:26:29Z</published>
    <link href="https://pype.dev/thoughts-697/" rel="alternate" type="text/html"></link>
    <summary type="text">Someday I will build a thing to see the relationship in my posts and notes. Right now I&#39;m working on writing consistentl</summary>
    <content type="html">&lt;a href=&#34;https://blog.jim-nielsen.com/2022/visualizing-my-blogs-links/&#34;&gt;&#xA;    &lt;img&#xA;        src=&#34;https://shots.wayl.one/shot/?url=https://blog.jim-nielsen.com/2022/visualizing-my-blogs-links/&amp;height=450&amp;width=800&amp;scaled_width=800&amp;scaled_height=450&amp;selectors=&#34;&#xA;        alt=&#34;shot of post - Visualizing My Blog’s Internal Links - Jim Nielsen’s Blog&#34;&#xA;        height=450&#xA;        width=800&#xA;    &gt;&#xA;&lt;/a&gt;&#xA;&lt;p&gt;Here&amp;rsquo;s my thought on &lt;a href=&#34;https://blog.jim-nielsen.com/2022/visualizing-my-blogs-links/&#34;&gt;Visualizing My Blog’s Internal Links - Jim Nielsen’s Blog&lt;/a&gt;&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;p&gt;Someday I will build a thing to see the relationship in my posts and notes. Right now I&amp;rsquo;m working on writing consistently, improving my tagging, using wikilinks, and just generally thinking about what I want my website to contain - and a mindmap like this would be just awesome&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;div class=&#34;admonition note&#34;&gt;&#xA;&lt;p class=&#34;admonition-title&#34;&gt;Note&lt;/p&gt;&#xA;&lt;p&gt;This is one of [[ my-thoughts ]]. I picked this up from &lt;a href=&#34;https://waylonwalker.com&#34;&gt;Waylon Walker&lt;/a&gt;(&lt;a href=&#34;https://thoughts.waylonwalker.com&#34;&gt;https://thoughts.waylonwalker.com&lt;/a&gt;). It&amp;rsquo;s a short note that I make about someone else&amp;rsquo;s content online.  Learn more about the process &lt;a href=&#34;/thoughts/&#34; class=&#34;wikilink&#34; data-title=&#34;Thoughts&#34; data-description=&#34;My thoughts are found at my thoughts feed&#34; data-date=&#34;2025-06-09&#34; data-preview=&#34;My thoughts are found at my thoughts feed&#34;&gt;Thoughts&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/div&gt;&#xA;</content>
    <author>
      <name>Nic Payne</name>
      <uri>https://pype.dev</uri>
    </author>
  </entry>
  <entry>
    <title>💭 slash pages</title>
    <id>https://pype.dev/thoughts-688/</id>
    <updated>2025-06-12T11:41:43Z</updated>
    <published>2025-06-12T11:41:43Z</published>
    <link href="https://pype.dev/thoughts-688/" rel="alternate" type="text/html"></link>
    <summary type="text">Waylon&#39;s mentioned slash pages before, but as I work on building my blog again and writing more regularly thanks to &#34;tho</summary>
    <content type="html">&lt;a href=&#34;https://slashpages.net/&#34;&gt;&#xA;    &lt;img&#xA;        src=&#34;https://shots.wayl.one/shot/?url=https://slashpages.net/&amp;height=450&amp;width=800&amp;scaled_width=800&amp;scaled_height=450&amp;selectors=&#34;&#xA;        alt=&#34;shot of post - slash pages&#34;&#xA;        height=450&#xA;        width=800&#xA;    &gt;&#xA;&lt;/a&gt;&#xA;&lt;p&gt;Here&amp;rsquo;s my thought on &lt;a href=&#34;https://slashpages.net/&#34;&gt;slash pages&lt;/a&gt;&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;p&gt;Waylon&amp;rsquo;s mentioned slash pages before, but as I work on building my blog again and writing more regularly thanks to &amp;ldquo;thoughts&amp;rdquo; etc. I&amp;rsquo;d like to start putting together some meaningful slash pages for myself&amp;hellip; I&amp;rsquo;m not sure what to put out there yet but this thought can serve as a todo for me&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;div class=&#34;admonition note&#34;&gt;&#xA;&lt;p class=&#34;admonition-title&#34;&gt;Note&lt;/p&gt;&#xA;&lt;p&gt;This is one of [[ my-thoughts ]]. I picked this up from &lt;a href=&#34;https://waylonwalker.com&#34;&gt;Waylon Walker&lt;/a&gt;(&lt;a href=&#34;https://thoughts.waylonwalker.com&#34;&gt;https://thoughts.waylonwalker.com&lt;/a&gt;). It&amp;rsquo;s a short note that I make about someone else&amp;rsquo;s content online.  Learn more about the process &lt;a href=&#34;/thoughts/&#34; class=&#34;wikilink&#34; data-title=&#34;Thoughts&#34; data-description=&#34;My thoughts are found at my thoughts feed&#34; data-date=&#34;2025-06-09&#34; data-preview=&#34;My thoughts are found at my thoughts feed&#34;&gt;Thoughts&lt;/a&gt;&lt;/p&gt;&#xA;&lt;/div&gt;&#xA;</content>
    <author>
      <name>Nic Payne</name>
      <uri>https://pype.dev</uri>
    </author>
  </entry>
  <entry>
    <title>Recovering OPNSense</title>
    <id>https://pype.dev/recovering-opnsense/</id>
    <updated>2024-11-06T00:00:00Z</updated>
    <published>2024-11-06T00:00:00Z</published>
    <link href="https://pype.dev/recovering-opnsense/" rel="alternate" type="text/html"></link>
    <summary type="text">I woke up to faulty internet and after some troubleshooting it turns out the root zfs dataset that OPNSense boots from got corrupted...</summary>
    <content type="html">&lt;p&gt;I woke up to faulty internet and after some troubleshooting it turns out the&#xA;root zfs dataset that OPNSense boots from got corrupted&amp;hellip;&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;PRO-TIP - Auto backup your OPNSense config to Google Drive, git, or&#xA;nextcloud&amp;hellip; But if you won&amp;rsquo;t then at least back up your OPNSense config&#xA;somewhere everytime you update it.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;It&amp;rsquo;s too much to recount every issue, so here&amp;rsquo;s a bullet list what worked.&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;On a fresh drive install OPNSense&lt;/li&gt;&#xA;&lt;li&gt;Plug in the old drive through a USB enclosure - now I&amp;rsquo;m not sure what would&#xA;happen if you plugged it in along with the new drive and then booted up.&#xA;Because both drives will have a zfs pool &lt;code&gt;zroot&lt;/code&gt; and the boot dataset is&#xA;automounted at &lt;code&gt;/zroot/ROOT/default&lt;/code&gt;. My old &lt;code&gt;zroot&lt;/code&gt; pool was &lt;code&gt;SUSPENDED&lt;/code&gt; so it&#xA;didn&amp;rsquo;t automount&lt;/li&gt;&#xA;&lt;li&gt;Because the old &lt;code&gt;zoot/ROOT/default&lt;/code&gt; was corrupted I did this to mount it RO:&#xA;&lt;code&gt;zpool import -d &amp;lt;path to zfs partition - /dev/stuff&amp;gt; -N zroot zrootrecovery&lt;/code&gt;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;-d is the zfs flag to import the pool by disk id, -N it to not mount any of&#xA;the datasets (we need to change mountpoints) and the &lt;code&gt;zroot zrootrecovery&lt;/code&gt;&#xA;imports the &lt;code&gt;zroot&lt;/code&gt; pool with a new name&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;ol start=&#34;4&#34;&gt;&#xA;&lt;li&gt;Change the mountpoints for all the &lt;code&gt;zrootrecovery&lt;/code&gt; datasets to somewhere&#xA;like &lt;code&gt;/mnt/zrootrecovery&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;Depending on the mount point you set you&amp;rsquo;ll find a &lt;code&gt;config&lt;/code&gt; directory around&#xA;&lt;code&gt;/mnt/zrootrecovery/ROOT/default/config&lt;/code&gt; - copy the file you want to another&#xA;machine via scp or whatever&lt;/li&gt;&#xA;&lt;li&gt;Go to OPNSense webui and recover from that config!&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;All in all this process took me around 8 hours but I did run into about ever&#xA;issue under the sun (several bad disks in the mix, a laptop that wouldn&amp;rsquo;t live&#xA;boot into a BSD system, etc.)&lt;/p&gt;&#xA;</content>
    <author>
      <name>Nic Payne</name>
      <uri>https://pype.dev</uri>
    </author>
  </entry>
  <entry>
    <title>Wish-List-With-Fastapi</title>
    <id>https://pype.dev/wish-list-with-fastapi/</id>
    <updated>2022-05-06T00:00:00Z</updated>
    <published>2022-05-06T00:00:00Z</published>
    <link href="https://pype.dev/wish-list-with-fastapi/" rel="alternate" type="text/html"></link>
    <summary type="text">Amazon has crossed the line with me just one too many times now so we are looking to drop them like every other Big Tech provider....</summary>
    <content type="html">&lt;p&gt;Amazon has crossed the line with me just one too many times now so we are looking to drop them like every other Big Tech provider&amp;hellip;.&lt;/p&gt;&#xA;&lt;p&gt;However, one key feature of Amazon that has been so useful for us is Lists&amp;hellip; We can just maintain a list for each of us and then family members can login anytime and check it out&amp;hellip;&#xA;This really alleviates any last minute gift idea stress right before a birthday or something.&lt;/p&gt;&#xA;&lt;p&gt;So I need a nice gift list service but I don&amp;rsquo;t want to be locked into one company (like a Target registry or something) and I&amp;rsquo;d like to host it myself&lt;/p&gt;&#xA;&lt;p&gt;The internets had a few options but nothing looked/felt like I wanted to I decided to build my own.&lt;/p&gt;&#xA;&lt;h1 id=&#34;the-frontend&#34;&gt;&lt;span class=&#34;heading-wear-glyph&#34;&gt;The Frontend&lt;/span&gt;&lt;/h1&gt;&#xA;&lt;p&gt;&lt;strong&gt;I have no idea how to do front end so stay tuned&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;h1 id=&#34;the-backend&#34;&gt;&lt;span class=&#34;heading-wear-glyph&#34;&gt;The Backend&lt;/span&gt;&lt;/h1&gt;&#xA;&lt;p&gt;FastAPI for the win on this one&amp;hellip; I followed a few examples online and what I was able to build in just a few minutes is pretty impressive thanks to the design of FastAPI.&lt;/p&gt;&#xA;&lt;p&gt;Some key features are:&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Auto doc generation&lt;/li&gt;&#xA;&lt;li&gt;Required typing (which makes #1 possible)&lt;/li&gt;&#xA;&lt;li&gt;Built-in api testing in the browser&lt;/li&gt;&#xA;&lt;li&gt;Easy integration with sqlalchemy&lt;/li&gt;&#xA;&lt;li&gt;Development time so short you won&amp;rsquo;t be done with your coffee before having something up and running!&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;h2 id=&#34;database&#34;&gt;&lt;span class=&#34;heading-wear-glyph&#34;&gt;Database&lt;/span&gt; &lt;a href=&#34;#database&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;Starting with a simple &lt;code&gt;database.py&lt;/code&gt; we can create a sqlalchemy session with a base model with about 7 lines of code&amp;hellip;&lt;/p&gt;&#xA;&lt;pre class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kn&#34;&gt;from&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;sqlalchemy&lt;/span&gt; &lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;create_engine&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kn&#34;&gt;from&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;sqlalchemy.ext.declarative&lt;/span&gt; &lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;declarative_base&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kn&#34;&gt;from&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;sqlalchemy.orm&lt;/span&gt; &lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;sessionmaker&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;SQLALCHEMY_DATABASE_URL&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;sqlite:///wishes.sqlite3&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;engine&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;create_engine&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;SQLALCHEMY_DATABASE_URL&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;SessionLocal&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;sessionmaker&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;autocommit&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;kc&#34;&gt;False&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;autoflush&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;kc&#34;&gt;False&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;bind&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;engine&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;Base&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;declarative_base&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;model&#34;&gt;&lt;span class=&#34;heading-wear-glyph&#34;&gt;Model&lt;/span&gt; &lt;a href=&#34;#model&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;For my wish list I needed just a simple table:&lt;/p&gt;&#xA;&lt;table&gt;&#xA;&lt;thead&gt;&#xA;&lt;tr&gt;&#xA;&lt;th style=&#34;text-align:right&#34;&gt;id&lt;/th&gt;&#xA;&lt;th style=&#34;text-align:left&#34;&gt;person&lt;/th&gt;&#xA;&lt;th style=&#34;text-align:left&#34;&gt;item&lt;/th&gt;&#xA;&lt;th style=&#34;text-align:left&#34;&gt;link&lt;/th&gt;&#xA;&lt;th style=&#34;text-align:left&#34;&gt;purchased&lt;/th&gt;&#xA;&lt;th style=&#34;text-align:left&#34;&gt;purchased_by&lt;/th&gt;&#xA;&lt;th style=&#34;text-align:left&#34;&gt;date_added&lt;/th&gt;&#xA;&lt;/tr&gt;&#xA;&lt;/thead&gt;&#xA;&lt;tbody&gt;&#xA;&lt;tr&gt;&#xA;&lt;td style=&#34;text-align:right&#34;&gt;1&lt;/td&gt;&#xA;&lt;td style=&#34;text-align:left&#34;&gt;pypeaday&lt;/td&gt;&#xA;&lt;td style=&#34;text-align:left&#34;&gt;A sweet item&lt;/td&gt;&#xA;&lt;td style=&#34;text-align:left&#34;&gt;&lt;a href=&#34;http://www.mystore.store&#34;&gt;www.mystore.store&lt;/a&gt;&lt;/td&gt;&#xA;&lt;td style=&#34;text-align:left&#34;&gt;False&lt;/td&gt;&#xA;&lt;td style=&#34;text-align:left&#34;&gt;dad&lt;/td&gt;&#xA;&lt;td style=&#34;text-align:left&#34;&gt;2022-05-05 21:55:09&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;tr&gt;&#xA;&lt;td style=&#34;text-align:right&#34;&gt;2&lt;/td&gt;&#xA;&lt;td style=&#34;text-align:left&#34;&gt;pypeaday&lt;/td&gt;&#xA;&lt;td style=&#34;text-align:left&#34;&gt;A bitter item&lt;/td&gt;&#xA;&lt;td style=&#34;text-align:left&#34;&gt;&lt;a href=&#34;http://www.bitterstore.com&#34;&gt;www.bitterstore.com&lt;/a&gt;&lt;/td&gt;&#xA;&lt;td style=&#34;text-align:left&#34;&gt;True&lt;/td&gt;&#xA;&lt;td style=&#34;text-align:left&#34;&gt;Mrs. pypeaday&lt;/td&gt;&#xA;&lt;td style=&#34;text-align:left&#34;&gt;2022-05-06 06:55:54&lt;/td&gt;&#xA;&lt;/tr&gt;&#xA;&lt;/tbody&gt;&#xA;&lt;/table&gt;&#xA;&lt;p&gt;The table is simple enough&amp;hellip; A unique key, the person who the wish belongs to, the item (or wish), a link to the item, whether it&amp;rsquo;s been purchased or not and by whom, and the date it was added.&lt;/p&gt;&#xA;&lt;p&gt;To make this model with sqlalchemy we can make a &lt;code&gt;model.py&lt;/code&gt; like so:&lt;/p&gt;&#xA;&lt;pre class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kn&#34;&gt;from&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;database&lt;/span&gt; &lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Base&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kn&#34;&gt;from&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;sqlalchemy.schema&lt;/span&gt; &lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Column&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kn&#34;&gt;from&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;sqlalchemy.types&lt;/span&gt; &lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Boolean&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Integer&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;String&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Text&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;class&lt;/span&gt; &lt;span class=&#34;nc&#34;&gt;Wishes&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Base&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;):&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;__tablename__&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Wishes&amp;#34;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;nb&#34;&gt;id&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Column&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Integer&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;primary_key&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;kc&#34;&gt;True&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;index&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;kc&#34;&gt;True&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;person&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Column&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;String&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;20&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;))&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;item&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Column&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Text&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;())&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;link&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Column&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Text&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;())&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;purchased&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Column&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Boolean&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;())&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;purchased_by&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Column&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;String&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;90&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;))&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;date_added&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Column&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;String&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;15&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;))&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;schema&#34;&gt;&lt;span class=&#34;heading-wear-glyph&#34;&gt;Schema&lt;/span&gt; &lt;a href=&#34;#schema&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;One of the best things about FastAPI is trivial integration with pydantic.&#xA;We can define a schema to ensure any data posted is not missing anything!&lt;/p&gt;&#xA;&lt;p&gt;Make a &lt;code&gt;schema.py&lt;/code&gt; with the following:&lt;/p&gt;&#xA;&lt;pre class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kn&#34;&gt;from&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;pydantic&lt;/span&gt; &lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;BaseModel&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;time&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kn&#34;&gt;from&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;typing&lt;/span&gt; &lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Optional&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;class&lt;/span&gt; &lt;span class=&#34;nc&#34;&gt;wish_schema&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;BaseModel&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;):&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;person&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;str&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;item&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;str&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;link&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;str&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;purchased&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;bool&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;kc&#34;&gt;False&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;purchased_by&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Optional&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;str&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;kc&#34;&gt;None&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;date_added&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Optional&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;str&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;time&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;strftime&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;%Y-%m-&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;%d&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt; %H:%M:%S&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;time&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;localtime&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;())&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;class&lt;/span&gt; &lt;span class=&#34;nc&#34;&gt;Config&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;n&#34;&gt;orm_mode&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;kc&#34;&gt;True&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;class&lt;/span&gt; &lt;span class=&#34;nc&#34;&gt;patch_schema&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;BaseModel&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;):&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;purchased&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;bool&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;purchased_by&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Optional&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;str&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;kc&#34;&gt;None&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;class&lt;/span&gt; &lt;span class=&#34;nc&#34;&gt;Config&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;n&#34;&gt;orm_mode&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;kc&#34;&gt;True&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;I have 2 schemas - one for a &lt;code&gt;wish&lt;/code&gt; which you&amp;rsquo;ll see down below is used to validate any &lt;code&gt;post&lt;/code&gt; requests.&lt;/p&gt;&#xA;&lt;p&gt;To simplify things for me I made another schema, &lt;code&gt;patch_schema&lt;/code&gt; which I use for the route that updates the table (ie. marking an existing wish as purchased)&lt;/p&gt;&#xA;&lt;h2 id=&#34;session&#34;&gt;&lt;span class=&#34;heading-wear-glyph&#34;&gt;Session&lt;/span&gt; &lt;a href=&#34;#session&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;One of the last things we need is a Session&lt;/p&gt;&#xA;&lt;p&gt;So make a &lt;code&gt;session.py&lt;/code&gt;&amp;hellip;&lt;/p&gt;&#xA;&lt;pre class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kn&#34;&gt;from&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;database&lt;/span&gt; &lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;SessionLocal&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;engine&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;model&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;model&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Base&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;metadata&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;create_all&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;bind&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;engine&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;def&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;create_get_session&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;():&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;try&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;n&#34;&gt;db&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;SessionLocal&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;k&#34;&gt;yield&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;db&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;finally&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;n&#34;&gt;db&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;close&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Our routes will depend on this &lt;code&gt;create_get_session&lt;/code&gt; function that will yield a &lt;code&gt;db&lt;/code&gt; object through which we&amp;rsquo;ll udpate our database&lt;/p&gt;&#xA;&lt;h1 id=&#34;ok-just-do-it-already&#34;&gt;&lt;span class=&#34;heading-wear-glyph&#34;&gt;Ok just do it already!&lt;/span&gt;&lt;/h1&gt;&#xA;&lt;p&gt;So our &lt;code&gt;main.py&lt;/code&gt; will have a few routes in it&amp;hellip;&lt;/p&gt;&#xA;&lt;p&gt;What do we want to support?&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Getting all wishes&lt;/li&gt;&#xA;&lt;li&gt;Getting a specific wish&lt;/li&gt;&#xA;&lt;li&gt;Updating a specific wish&lt;/li&gt;&#xA;&lt;li&gt;Deleting a wish&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;I think the script is fairly self explanatory but here&amp;rsquo;s a few notes&amp;hellip;&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;We decorate each function with &lt;code&gt;@app.&amp;lt;method&amp;gt;&lt;/code&gt; and define &lt;code&gt;response_model&lt;/code&gt; as well as &lt;code&gt;status_code&lt;/code&gt;&lt;/li&gt;&#xA;&lt;li&gt;The functions are defined with &lt;code&gt;async&lt;/code&gt; (this was my first exposure to this so I can&amp;rsquo;t go in depth on it yet)&lt;/li&gt;&#xA;&lt;li&gt;The functions all take a &lt;code&gt;db&lt;/code&gt; which is from &lt;code&gt;session.py&lt;/code&gt; and that &lt;code&gt;db&lt;/code&gt; depends on the &lt;code&gt;create_get_session&lt;/code&gt; function&lt;/li&gt;&#xA;&lt;li&gt;If the db is being updtes then we type the object used for the update with the appropriate schema (either &lt;code&gt;wish_schema&lt;/code&gt; or &lt;code&gt;patch_schema&lt;/code&gt;)&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;From there we&amp;rsquo;re in true python-land where you can basically guess the methods on &lt;code&gt;db&lt;/code&gt; and you&amp;rsquo;d probably be right&amp;hellip; (like &lt;code&gt;query&lt;/code&gt;, &lt;code&gt;upddate&lt;/code&gt;, &lt;code&gt;delete&lt;/code&gt; etc.)&lt;/p&gt;&#xA;&lt;pre class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kn&#34;&gt;from&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;fastapi&lt;/span&gt; &lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;FastAPI&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Depends&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;HTTPException&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kn&#34;&gt;from&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;sqlalchemy.orm&lt;/span&gt; &lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Session&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kn&#34;&gt;from&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;typing&lt;/span&gt; &lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;List&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kn&#34;&gt;from&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;model&lt;/span&gt; &lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Wishes&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kn&#34;&gt;from&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;schema&lt;/span&gt; &lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;wish_schema&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;patch_schema&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;kn&#34;&gt;from&lt;/span&gt; &lt;span class=&#34;nn&#34;&gt;session&lt;/span&gt; &lt;span class=&#34;kn&#34;&gt;import&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;create_get_session&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;app&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;FastAPI&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nd&#34;&gt;@app.get&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;/&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;def&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;read_root&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;():&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;return&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;message&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;server is up!&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nd&#34;&gt;@app.get&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;/wishes&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;response_model&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;List&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;wish_schema&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;],&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;status_code&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;200&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;async&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;def&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;read_wishes&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;db&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Session&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Depends&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;create_get_session&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)):&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;wishes&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;db&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;query&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Wishes&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;all&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;return&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;wishes&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nd&#34;&gt;@app.post&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;/wishes&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;response_model&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;wish_schema&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;status_code&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;201&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;async&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;def&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;add_wish&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;wish&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;wish_schema&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;db&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Session&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Depends&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;create_get_session&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)):&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;new_wish&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Wishes&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;n&#34;&gt;person&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;wish&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;person&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;n&#34;&gt;item&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;wish&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;item&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;n&#34;&gt;link&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;wish&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;link&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;n&#34;&gt;purchased&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;wish&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;purchased&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;n&#34;&gt;purchased_by&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;wish&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;purchased_by&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;n&#34;&gt;date_added&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;wish&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;date_added&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;db&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;add&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;new_wish&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;db&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;commit&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;return&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;new_wish&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nd&#34;&gt;@app.get&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;/wishes/&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;{id}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;response_model&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;wish_schema&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;status_code&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;200&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;async&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;def&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;get_wish&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;id&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;int&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;db&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Session&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Depends&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;create_get_session&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)):&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;wish&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;db&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;query&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Wishes&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;get&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;id&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;return&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;wish&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nd&#34;&gt;@app.patch&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;/wishes/&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;{id}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;response_model&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;wish_schema&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;status_code&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;200&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;async&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;def&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;update_wish&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;nb&#34;&gt;id&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;int&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;patch&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;patch_schema&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;db&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Session&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Depends&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;create_get_session&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;):&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;db_wish&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;db&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;query&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Wishes&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;get&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;id&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;db_wish&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;purchased&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;patch&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;purchased&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;db_wish&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;purchased_by&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;patch&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;purchased_by&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;db&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;commit&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;db&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;refresh&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;db_wish&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;return&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;db_wish&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nd&#34;&gt;@app.delete&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;/wishes/&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;{id}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;status_code&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;mi&#34;&gt;200&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;k&#34;&gt;async&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;def&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;delete_wish&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;id&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;int&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;db&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Session&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Depends&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;create_get_session&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)):&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;db_wish&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;db&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;query&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Wishes&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;get&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;id&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;ow&#34;&gt;not&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;db_wish&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;:&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;k&#34;&gt;raise&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;HTTPException&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;status_code&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;404&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;detail&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;Wish id does not exist&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;db&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;delete&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;db_wish&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;n&#34;&gt;db&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;commit&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;return&lt;/span&gt; &lt;span class=&#34;kc&#34;&gt;None&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;h1 id=&#34;my-code&#34;&gt;&lt;span class=&#34;heading-wear-glyph&#34;&gt;My Code&lt;/span&gt;&lt;/h1&gt;&#xA;&lt;p&gt;You can find my repo &lt;a href=&#34;https://github.com/nicpayne713/wish-lists&#34;&gt;here&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;I&amp;rsquo;ll plan to update and maintain for as long as I use it&lt;/p&gt;&#xA;</content>
    <author>
      <name>Nic Payne</name>
      <uri>https://pype.dev</uri>
    </author>
  </entry>
  <entry>
    <title>Home-Server-Refactor</title>
    <id>https://pype.dev/home-server-refactor/</id>
    <updated>2022-04-10T00:00:00Z</updated>
    <published>2022-04-10T00:00:00Z</published>
    <link href="https://pype.dev/home-server-refactor/" rel="alternate" type="text/html"></link>
    <summary type="text">My current homelab setup is not great but it works...</summary>
    <content type="html">&lt;p&gt;My current homelab setup is not great but it works&amp;hellip;&lt;/p&gt;&#xA;&lt;h1 id=&#34;proxmox-on-poweredge-r610&#34;&gt;&lt;span class=&#34;heading-wear-glyph&#34;&gt;Proxmox on PowerEdge R610&lt;/span&gt;&lt;/h1&gt;&#xA;&lt;p&gt;I boot off an SD card and have 1 SSD and 5 HDDs configured as a JBOD array using a Dell H700 SAS controller.&#xA;I cannot boot from a disk using this controller and I can&amp;rsquo;t get the firmware configured in a way to allow it.&#xA;So I have 1 SSD as a ZFS array that I&amp;rsquo;ve been putting my VM images on, and the 5 HDDs are passed through to a TrueNAS VM where I handle all the ZFS stuff there&amp;hellip; &lt;a href=&#34;/kind/&#34; class=&#34;glossary-term&#34; title=&#34;kind - kubernetes in docker&#34; data-hover-title=&#34;kind&#34;&gt;kind&lt;/a&gt; of meta because I then attached those drives to Proxmox as a CIFS share.&lt;/p&gt;&#xA;&lt;h1 id=&#34;truenas-on-dedicated-box&#34;&gt;&lt;span class=&#34;heading-wear-glyph&#34;&gt;TrueNAS on dedicated box&lt;/span&gt;&lt;/h1&gt;&#xA;&lt;p&gt;I have an on-prem backup that is just an old desktop running TrueNAS&#xA;I regularly backup the 5 disk RAIDZ2 array from my Proxmox host (managed by a TrueNAS VM) to this backup box&lt;/p&gt;&#xA;&lt;p&gt;Currently there is nothing else running on this machine since it&amp;rsquo;s my &amp;ldquo;backup&amp;rdquo;&lt;/p&gt;&#xA;&lt;h1 id=&#34;jellyfin&#34;&gt;&lt;span class=&#34;heading-wear-glyph&#34;&gt;Jellyfin&lt;/span&gt;&lt;/h1&gt;&#xA;&lt;p&gt;I was HWA for Jellyfin, but hardware passthrough on the R610 is finicky or broken so Jellyfin is running on an Ubuntu host.&lt;/p&gt;&#xA;&lt;p&gt;I could put UBuntu on the R610 and give up &amp;ldquo;true virtualization&amp;rdquo;. Then I&amp;rsquo;d manage the SMB share myself.&#xA;If I do that then I would get rid of &amp;ldquo;users&amp;rdquo; I think, ie. basically forgo least-priviledges since I&amp;rsquo;m not sure how hard that is to manage.&lt;/p&gt;&#xA;&lt;p&gt;On the other hand, direct access to the smb config might make it easier?&lt;/p&gt;&#xA;&lt;p&gt;I have the media array on Jellyfin box setup as NFS which was really easy with ZFS&amp;hellip; I think SMB would be just as easy.&lt;/p&gt;&#xA;&lt;h1 id=&#34;plan-of-attack&#34;&gt;&lt;span class=&#34;heading-wear-glyph&#34;&gt;Plan of attack…&lt;/span&gt;&lt;/h1&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;Move all vm disks to individual datasets on the NAS&lt;/li&gt;&#xA;&lt;li&gt;Backup &lt;a href=&#34;/docker/&#34; class=&#34;glossary-term&#34; title=&#34;docker - container runtime&#34; data-hover-title=&#34;docker&#34;&gt;docker&lt;/a&gt; data&amp;hellip; not sure how well this will work, maybe just start over?&lt;/li&gt;&#xA;&lt;li&gt;Clean up Ansible playbooks on the user side of things - stick with neville vs just using my own name?&lt;/li&gt;&#xA;&lt;li&gt;Install Ubuntu 20 or 22 on a 2.5&amp;quot; drive that I&amp;rsquo;ll toss in this SSD enclosure (or a usb thumb stick?)&lt;/li&gt;&#xA;&lt;li&gt;Re-deploy everything with ansible-playbook and configure&amp;hellip;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;h2 id=&#34;configuration&#34;&gt;&lt;span class=&#34;heading-wear-glyph&#34;&gt;Configuration…&lt;/span&gt; &lt;a href=&#34;#configuration&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;ol start=&#34;0&#34;&gt;&#xA;&lt;li&gt;THE FREAKING NAS -&amp;gt; just import zfs array and configure SMB?&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;1.~~ Nextcloud users and connections.. might be able to just copy the data folder? not sure about the database&amp;hellip; try spinning it up in the sandbox vm and see if stuff is there ~~&#xA;2.~~ *arr suite, media profiles and connections to transmission&amp;hellip; nothing major~~&#xA;3. transmission - should be deploy and go&#xA;4. ombi and jackett should also just work after some config again&#xA;5. &lt;del&gt;traefik should just work&lt;/del&gt;&#xA;6. &lt;del&gt;try to bring up pi-hole from the vm that&amp;rsquo;s already running&lt;/del&gt;&#xA;7. &lt;del&gt;heimdall will hopefully just be copying the data folder from the existind docker one&amp;rsquo;&lt;/del&gt;&#xA;8.~~ booksonic can be reconfigured easily~~&#xA;9. &lt;del&gt;portainer&amp;hellip; hopefully just copying data folder over?&lt;/del&gt;&#xA;10. &lt;del&gt;littlelink&lt;/del&gt;, small-group-notes, and blog (at home) will need manually re-deployed once Ubuntu is installed bare-metal&lt;/p&gt;&#xA;&lt;h2 id=&#34;big-big-big-todos&#34;&gt;&lt;span class=&#34;heading-wear-glyph&#34;&gt;BIG BIG BIG TODOS&lt;/span&gt; &lt;a href=&#34;#big-big-big-todos&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Sanoid/syncoid! Get snapshots going and backups configured with on prem TrueNAS&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Wireguard setup on DA.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;network share on printer for paperless&#xA;&lt;del&gt;4. update peperless in ansible-nas&lt;/del&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;&lt;del&gt;Just deploy paperless manually&amp;hellip; monitor/manage with portainer&lt;/del&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;booksonic not seeing audiobooks/podcasts&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;need a smb user to map nas/documents to the printer for paperless&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;wireguard setup now on kps phone, desktop, server (and backup truenas?), and dad&amp;rsquo;s pi&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;&lt;del&gt;verify lan services work&lt;/del&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;&lt;del&gt;Tdar so Jellyfin can work better&lt;/del&gt;&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;Snapshot business might be cause of all the docker containers and docker using&#xA;ZFS backend&amp;hellip; take everything down and try removing&lt;/p&gt;&#xA;&lt;ol&gt;&#xA;&lt;li&gt;file browser - currently I just one-clicked in portainer, I want to make a stack with my own config file which I&amp;rsquo;ll rip from techno tip and then add my traefik lables too&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;Forget filebrowser - going to just use Nextcloud for how it&amp;rsquo;s supposed to be used.&#xA;3. Need to organize those files in nextcloud&lt;/p&gt;&#xA;&lt;h2 id=&#34;check-this-ran-as-cp-utility-in-tmux-window-no-progress-bars-or-anything-it-s-in-ansible-nas-session-window-3&#34;&gt;&lt;span class=&#34;heading-wear-glyph&#34;&gt;CHECK THIS -&amp;gt;  ran as ‘cp’ utility in tmux window, no progress bars or anything. it’s in ansible-nas session -&amp;gt; window 3&lt;/span&gt; &lt;a href=&#34;#check-this-ran-as-cp-utility-in-tmux-window-no-progress-bars-or-anything-it-s-in-ansible-nas-session-window-3&#34; class=&#34;heading-anchor&#34;&gt;#&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;Olivet bible stuff going to /tmp/olivet/ -&amp;gt; will move this to nextcloud, ideally by the app via appimage so that the db updates and I don&amp;rsquo;t have to run that occ script&#xA;I wnat to organize &amp;ldquo;home&amp;rdquo; still in nextcloud&lt;/p&gt;&#xA;&lt;p&gt;setup Sanoid&lt;/p&gt;&#xA;&lt;p&gt;clean up bitwarden&#xA;learn nextcloud sharing -&amp;gt; maybe just give a link to grandma?&#xA;rest of todos -&amp;gt; document db and sanoid + zfs.rent&lt;/p&gt;&#xA;&lt;p&gt;Check on mom&amp;rsquo;s will&#xA;do media thing for church - split vocals on mp3/4&lt;/p&gt;&#xA;&lt;p&gt;permission-data playbook changes everything to ansible-nas:ansible-nas but then samba task will re-permission some stuff to root:users&amp;hellip; this looks fine&#xA;I had to add &lt;code&gt;group&lt;/code&gt; to the samba config in my playbook to get user auth to work with samba&#xA;This isn&amp;rsquo;t fully working&amp;hellip; it works from cli but my python process can&amp;rsquo;t write to a folder in dump after 777&amp;hellip;. need to learn more?&#xA;So I can make a file after adding the ansible-nas group to config, but I still cannot make a directory on the smb mount&amp;hellip;&lt;/p&gt;&#xA;&lt;p&gt;ADDING &lt;code&gt;inherit permission = yes&lt;/code&gt; under &lt;code&gt;[global]&lt;/code&gt; in the smb.conf worked!&lt;/p&gt;&#xA;&lt;p&gt;still not working from printer&amp;hellip;&#xA;I think what I want is to setup 2 scan options - single docs right to paperless, or combined scans to dump, then manually split and send to paperless&lt;/p&gt;&#xA;</content>
    <author>
      <name>Nic Payne</name>
      <uri>https://pype.dev</uri>
    </author>
  </entry>
</feed>