<?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: Daniel Adeboye</title>
    <description>The latest articles on DEV Community by Daniel Adeboye (@adeboyedn).</description>
    <link>https://dev.to/adeboyedn</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F869784%2F4caf3b76-82c7-4820-bd4b-24ba40795d19.jpg</url>
      <title>DEV Community: Daniel Adeboye</title>
      <link>https://dev.to/adeboyedn</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/adeboyedn"/>
    <language>en</language>
    <item>
      <title>How much compute does an AI coding agent need?</title>
      <dc:creator>Daniel Adeboye</dc:creator>
      <pubDate>Wed, 28 Oct 2026 08:52:58 +0000</pubDate>
      <link>https://dev.to/adeboyedn/how-much-compute-does-an-ai-coding-agent-need-58i1</link>
      <guid>https://dev.to/adeboyedn/how-much-compute-does-an-ai-coding-agent-need-58i1</guid>
      <description>&lt;p&gt;Moving a coding agent like Claude Code or Codex from your laptop to a cloud environment raises a practical question: how much compute does it actually need?&lt;/p&gt;

&lt;p&gt;Give it too little, and dependency installs, builds, or tests can run out of memory or take too long. Give it too much, and you end up paying for resources the agent barely uses while waiting for the model to respond.&lt;/p&gt;

&lt;p&gt;When using a remotely hosted model, the model itself runs on the provider's servers. The coding agent runs in your environment, where it reads your code, installs dependencies, runs commands, and executes tests. These tasks have different compute requirements, so the right configuration depends on what you're building and how you run your agents.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where does an AI coding agent use compute?
&lt;/h2&gt;

&lt;p&gt;A coding agent runs a loop. It sends the task and context to a model, receives an action, runs that action in the environment, and sends the result back. The two halves of that loop have very different compute needs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The agent loop is light:&lt;/strong&gt;&amp;nbsp;The agent CLI manages the conversation, reads and edits files, searches the codebase, and waits for model responses. Much of its time may be spent waiting on the network. When using a remotely hosted model, the model itself doesn't run in your environment.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The work the agent runs is heavy:&lt;/strong&gt;&amp;nbsp;Every time the agent runs a command, that command uses your environment's resources:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Dependency installs:&lt;/strong&gt;&amp;nbsp;&lt;code&gt;npm install&lt;/code&gt;,&amp;nbsp;&lt;code&gt;pip install&lt;/code&gt;, or&amp;nbsp;&lt;code&gt;cargo fetch&lt;/code&gt;&amp;nbsp;use CPU, memory, network, and disk.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Builds and compilation:&lt;/strong&gt;&amp;nbsp;Compilers, bundlers, and linkers can be CPU-intensive and use several GB of memory.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Test suites:&lt;/strong&gt;&amp;nbsp;Test runners may run multiple workers in parallel, while integration tests can start databases or browsers.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Language tooling:&lt;/strong&gt;&amp;nbsp;Type checkers, linters, and language servers can hold significant parts of the codebase in memory.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Development servers and services:&lt;/strong&gt;&amp;nbsp;A web server, database, or queue started for testing continues consuming resources while it runs.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;An agent working on a small Python script needs very little compute. The same agent working on a large TypeScript monorepo and running the full test suite after each change needs a lot more. The agent is the same in both cases. The workload is not.&lt;/p&gt;

&lt;h2&gt;
  
  
  What are the minimum requirements to run a coding agent?
&lt;/h2&gt;

&lt;p&gt;The agent vendors publish minimum requirements for the CLI itself.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Agent&lt;/th&gt;
&lt;th&gt;Published minimum&lt;/th&gt;
&lt;th&gt;Source&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Claude Code&lt;/td&gt;
&lt;td&gt;4 GB+ RAM, x64 or ARM64 processor, supported operating systems&lt;/td&gt;
&lt;td&gt;&lt;a href="https://code.claude.com/docs/en/setup" rel="noopener noreferrer"&gt;Claude Code setup docs&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Codex CLI&lt;/td&gt;
&lt;td&gt;4 GB RAM minimum, 8 GB recommended; macOS 12+, Ubuntu 20.04+/Debian 10+, or Windows 11 via WSL2&lt;/td&gt;
&lt;td&gt;&lt;a href="https://github.com/openai/codex/blob/main/docs/install.md" rel="noopener noreferrer"&gt;Codex install docs&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Treat these as the floor for running the agent, not as a recommended size for real development work. An environment that meets the minimum may run the CLI but struggle once the agent installs dependencies, builds an application, or runs memory-intensive tests. Neither vendor specifies a universal CPU minimum for these workloads because the compute required depends heavily on what the agent runs.&lt;/p&gt;

&lt;h2&gt;
  
  
  How much CPU, memory, and disk does a coding agent need by workload?
&lt;/h2&gt;

&lt;p&gt;No vendor publishes universal sizing recommendations by project type, so the table below provides starting points based on typical development workloads. These are estimates, not benchmarked minimums. Use them to choose an initial configuration, then measure a real task and adjust.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Workload&lt;/th&gt;
&lt;th&gt;Starting vCPU&lt;/th&gt;
&lt;th&gt;Starting memory&lt;/th&gt;
&lt;th&gt;Starting disk&lt;/th&gt;
&lt;th&gt;Likely bottleneck&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Scripts, small repositories, documentation&lt;/td&gt;
&lt;td&gt;1 to 2&lt;/td&gt;
&lt;td&gt;2 to 4 GB&lt;/td&gt;
&lt;td&gt;10 GB&lt;/td&gt;
&lt;td&gt;Memory when installing large dependencies&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Typical Node.js or Python web apps with unit tests&lt;/td&gt;
&lt;td&gt;2 to 4&lt;/td&gt;
&lt;td&gt;4 to 8 GB&lt;/td&gt;
&lt;td&gt;20 GB&lt;/td&gt;
&lt;td&gt;Memory during installs and tests; disk from dependencies and caches&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Compiled languages such as Go, Rust, Java, or Kotlin&lt;/td&gt;
&lt;td&gt;4 to 8&lt;/td&gt;
&lt;td&gt;8 to 16 GB&lt;/td&gt;
&lt;td&gt;20 to 50 GB&lt;/td&gt;
&lt;td&gt;CPU during compilation; memory for linkers and build tools&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Monorepos and large test suites&lt;/td&gt;
&lt;td&gt;4 to 8+&lt;/td&gt;
&lt;td&gt;16 to 32 GB&lt;/td&gt;
&lt;td&gt;50 to 100 GB&lt;/td&gt;
&lt;td&gt;Memory from parallel test workers and type checking; disk from build caches&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Agents running databases and services alongside the code&lt;/td&gt;
&lt;td&gt;Add resources based on measured service usage&lt;/td&gt;
&lt;td&gt;Add resources based on measured service usage&lt;/td&gt;
&lt;td&gt;Allow for database files and other persistent data&lt;/td&gt;
&lt;td&gt;Memory and CPU contention between services and development tasks&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Two rules of thumb apply across most workloads. First, monitor memory closely because running out can cause processes to be killed or tasks to fail. Second, account for disk growth over time as dependency caches, build artifacts, and container images accumulate.&lt;/p&gt;

&lt;p&gt;CPU matters just as much when workloads are compute-intensive. If compilation or tests are CPU-bound, additional memory alone won't make them finish faster. Measure the bottleneck before scaling.&lt;/p&gt;

&lt;h2&gt;
  
  
  Which resource runs out first?
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Resource&lt;/th&gt;
&lt;th&gt;Symptoms&lt;/th&gt;
&lt;th&gt;Common causes&lt;/th&gt;
&lt;th&gt;Fix&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Memory&lt;/td&gt;
&lt;td&gt;A process exits with code 137, reports&amp;nbsp;&lt;code&gt;Killed&lt;/code&gt;, or produces an out-of-memory error during an install or test run&lt;/td&gt;
&lt;td&gt;Parallel test workers, type checkers on large codebases, JVM heap usage, or several services running at once&lt;/td&gt;
&lt;td&gt;Add memory or reduce parallelism with options such as Jest's&amp;nbsp;&lt;code&gt;--maxWorkers&lt;/code&gt;&amp;nbsp;or Gradle's&amp;nbsp;&lt;code&gt;--max-workers&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;CPU&lt;/td&gt;
&lt;td&gt;Builds and tests run slowly, extending the time each agent task takes&lt;/td&gt;
&lt;td&gt;Compilation, bundling, and large test suites&lt;/td&gt;
&lt;td&gt;Add vCPUs for build-heavy projects and configure build parallelism to match the available resources&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Disk&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;No space left on device&lt;/code&gt;&amp;nbsp;during installs, builds, or Git operations&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;node_modules&lt;/code&gt;, package caches, build artifacts, container images, or large Git histories&lt;/td&gt;
&lt;td&gt;Increase disk capacity, clear unnecessary caches, or use shallow clones where appropriate&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Network&lt;/td&gt;
&lt;td&gt;Dependency installs and image pulls are slow or time out&lt;/td&gt;
&lt;td&gt;Large dependency trees, registry issues, or downloads from distant registries&lt;/td&gt;
&lt;td&gt;Use a region closer to your registries, or configure a package cache or mirror&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Memory failures can be particularly disruptive for unattended agents. A developer may notice an out-of-memory error immediately, but an agent might retry the same failing command or stop making progress before anyone notices. Monitoring resource usage and capturing failed commands helps identify these problems sooner.&lt;/p&gt;

&lt;p&gt;Build tools can also detect the host's CPU count rather than the resources available to the environment. This can lead to more parallel workers than the environment can handle efficiently. If a build is slow despite having enough vCPUs, check the worker count and set it explicitly.&lt;/p&gt;

&lt;h2&gt;
  
  
  How does running agents in parallel change compute needs?
&lt;/h2&gt;

&lt;p&gt;Running several agents at once changes the total compute you need, and how you allocate it depends on where they run.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Several agents in one environment:&lt;/strong&gt;&amp;nbsp;Share its CPU, memory, and disk, so their resource usage can add up quickly. If two agents each run memory-intensive tests at the same time, their combined peak memory usage, plus the agent processes and other services, may exceed the available RAM. They also share ports and caches, which can save disk space but cause conflicts if two agents start the same development server.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;One environment per agent:&lt;/strong&gt;&amp;nbsp;Gives each agent its own resources, sized for its task. The total resource allocation is the sum of all environments, but one agent running out of memory is less likely to affect the others, and a lightweight task doesn't need the same configuration as a heavy one.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For a few small, related tasks, sharing a larger environment can work well. For long-running or resource-intensive tasks, separate environments make it easier to allocate resources independently and prevent agents from competing with each other.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;If you're looking to run multiple agents in parallel, see this guide on&amp;nbsp;&lt;a href="https://northflank.com/blog/how-to-run-multiple-coding-agents-in-parallel" rel="noopener noreferrer"&gt;how to run multiple coding agents in parallel&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Does an AI coding agent need a GPU?
&lt;/h2&gt;

&lt;p&gt;No, in most cases. Coding agents such as Claude Code and Codex use remotely hosted models, so the environment generally needs CPU and memory for the agent and the work it runs.&lt;/p&gt;

&lt;p&gt;A GPU is useful in two situations. The first is when you host your own model, for example, an open-weight coding model served with vLLM. The GPU runs the model, usually in a separate environment from the agent. The second is when the code the agent works on needs a GPU, such as machine learning training or inference code with tests that run on CUDA.&lt;/p&gt;

&lt;h2&gt;
  
  
  How do you choose the right compute configuration?
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Start with the workload, not the agent:&lt;/strong&gt;&amp;nbsp;Pick a starting size from the workload table above, based on the project's language, build process, and test suite.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Measure a real task:&lt;/strong&gt;&amp;nbsp;Run the agent on a representative task and monitor resource usage while it works.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Size for peak usage, not the average:&lt;/strong&gt;&amp;nbsp;An agent may spend much of its time waiting for model responses, keeping average CPU usage low. Builds, dependency installs, and test runs can create short-lived resource spikes. If peak memory approaches the environment's limit, add memory or reduce parallelism before running the agent unattended.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Size per task, not per developer:&lt;/strong&gt;&amp;nbsp;A documentation fix and a full refactor with a test suite have different resource requirements. If your platform lets you choose resources for each environment, use smaller configurations for lightweight tasks and larger ones for demanding workloads.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pause or delete idle environments:&lt;/strong&gt;&amp;nbsp;Resources that remain allocated while an environment is idle can add unnecessary costs. Where supported, pause environments when tasks finish and resume them when needed. This lets you allocate enough compute for demanding tasks without paying for idle compute indefinitely.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  How do you size coding agent environments on Northflank?
&lt;/h2&gt;

&lt;p&gt;The compute requirements above are starting points, not fixed rules. The best configuration depends on your repository, build process, test suite, and the number of agents running at once.&amp;nbsp;&lt;a href="https://northflank.com/product/cloud-agents" rel="noopener noreferrer"&gt;Northflank Cloud Harnesses&lt;/a&gt;&amp;nbsp;let you apply this workload-based approach in the cloud, with configurable compute, persistent workspaces, and resource usage metrics.&lt;/p&gt;

&lt;p&gt;Each Harness runs in its own Kata microVM and supports tools such as Claude Code, Codex, OpenCode, Pi, Cursor, or your own agent.&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fepvpzydtwqzhmx68sfbo.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fepvpzydtwqzhmx68sfbo.png" alt="Northflank cloud agent page" width="799" height="406"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can start with Northflank's free Sandbox tier, where a Harness can use up to 1 vCPU and 1 GB of RAM. This is a starting point for lightweight coding tasks and trying out cloud-based agents. For larger repositories, dependency-heavy projects, or demanding test suites, you can move to a larger compute plan.&lt;/p&gt;

&lt;p&gt;For example, you could start with these managed-cloud plans:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Example workload&lt;/th&gt;
&lt;th&gt;Plan&lt;/th&gt;
&lt;th&gt;vCPU&lt;/th&gt;
&lt;th&gt;Memory&lt;/th&gt;
&lt;th&gt;Cost per hour&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Lightweight tasks and experimentation&lt;/td&gt;
&lt;td&gt;Free Sandbox&lt;/td&gt;
&lt;td&gt;Up to 1&lt;/td&gt;
&lt;td&gt;Up to 1 GB&lt;/td&gt;
&lt;td&gt;Free&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Small scripts or documentation tasks&lt;/td&gt;
&lt;td&gt;nf-compute-100-2&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;2 GB&lt;/td&gt;
&lt;td&gt;$0.03333&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Typical application development&lt;/td&gt;
&lt;td&gt;nf-compute-200&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;4 GB&lt;/td&gt;
&lt;td&gt;$0.06667&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Larger builds and test suites&lt;/td&gt;
&lt;td&gt;nf-compute-400&lt;/td&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;8 GB&lt;/td&gt;
&lt;td&gt;$0.1333&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;More demanding development workloads&lt;/td&gt;
&lt;td&gt;nf-compute-800-16&lt;/td&gt;
&lt;td&gt;8&lt;/td&gt;
&lt;td&gt;16 GB&lt;/td&gt;
&lt;td&gt;$0.2667&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;These are illustrative starting configurations, not guaranteed requirements. Monitor CPU and memory usage during a representative task and resize when you identify a bottleneck. You can find additional plans and current rates on the&amp;nbsp;&lt;a href="https://northflank.com/pricing" rel="noopener noreferrer"&gt;Northflank pricing page&lt;/a&gt;.&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fuvido4pp9dgu4mofr8em.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fuvido4pp9dgu4mofr8em.png" alt="Northflank pricing" width="799" height="497"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Compute is billed by the second. When an agent finishes its work, you can pause its Harness to stop compute billing while preserving its workspace, then resume it when you need it again. Each Harness has a persistent home directory configurable from 5 GB to 100 GB, with the option to expand storage as the project grows.&lt;/p&gt;

&lt;p&gt;For teams that need more control over their infrastructure, Northflank also supports &lt;a href="https://northflank.com/features/bring-your-own-cloud" rel="noopener noreferrer"&gt;bring-your-own-cloud (BYOC)&lt;/a&gt; deployments on AWS, Google Cloud, Azure, Oracle, and CoreWeave.&lt;/p&gt;

&lt;p&gt;The advantage is that you don't have to choose one oversized environment for every coding task. You can start with the resources a workload needs, measure actual usage, and adjust the configuration as your projects grow.&lt;/p&gt;

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

&lt;p&gt;An AI coding agent needs relatively little compute for the agent process itself. The vendors' minimum requirements cover running the agent, but the right size depends on the work it runs: dependency installs, builds, test suites, and services. Start with a configuration that fits the workload, measure peak resource usage during a real task, and scale the resource that's actually limiting performance.&lt;/p&gt;

&lt;p&gt;If you run agents in the cloud, a platform that bills by the second and lets you pause environments can help control costs while giving agents the resources they need. &lt;a href="https://northflank.com/product/cloud-agents" rel="noopener noreferrer"&gt;Northflank Cloud Harnesses&lt;/a&gt; offer a free Sandbox tier for getting started, with larger compute plans available when your workload needs more resources.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>cloud</category>
      <category>claude</category>
    </item>
    <item>
      <title>How to Build a Python API from Scratch with FastAPI</title>
      <dc:creator>Daniel Adeboye</dc:creator>
      <pubDate>Thu, 05 Sep 2024 07:10:07 +0000</pubDate>
      <link>https://dev.to/adeboyedn/how-to-build-a-python-api-from-scratch-with-fastapi-2p92</link>
      <guid>https://dev.to/adeboyedn/how-to-build-a-python-api-from-scratch-with-fastapi-2p92</guid>
      <description>&lt;p&gt;Python has always been my go-to when building APIs for any of my projects, and in this tutorial, we’re going to build a simple blog application API using FastAPI. We’ll start with structuring our FastAPI project, installing the necessary dependencies, creating our application model structure, writing the functionalities for our application, and finally testing out our API.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;💡 If you are interested in building something similar using Python Flask, you can check out my 1-hour-long video tutorial on &lt;a href="https://youtu.be/VLkE5XjPx3Y?si=NkfV2cnr4qA1Fpzm" rel="noopener noreferrer"&gt;Youtube&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;p&gt;To follow this tutorial, you should have:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Basic knowledge of &lt;a href="https://www.python.org/" rel="noopener noreferrer"&gt;Python&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;Basic knowledge of &lt;a href="https://www.postman.com/what-is-an-api/" rel="noopener noreferrer"&gt;API and how it works&lt;/a&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  These are the steps that we will cover:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Step 1 - Project Setup&lt;/li&gt;
&lt;li&gt;Step 2 - Running our first basic application&lt;/li&gt;
&lt;li&gt;Step 3 - Creating our Application Model Structure&lt;/li&gt;
&lt;li&gt;Step 4 - Writing our Application CRUD functionalities&lt;/li&gt;
&lt;li&gt;Step 5 - Testing our API endpoints&lt;/li&gt;
&lt;li&gt;Step 6 - Exercise&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Step 1 - Project Setup
&lt;/h2&gt;

&lt;p&gt;In this section we will focus on setting up our project, starting with folder creation, environment setup, and installing necessary dependencies.&lt;/p&gt;

&lt;h3&gt;
  
  
  Folder Creation
&lt;/h3&gt;

&lt;p&gt;On your terminal create a project directory with any name of your choice. In my case I will call my project “anvil-blog”. You can also do this using your computer’s file explorer user interface.&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="err"&gt;$&lt;/span&gt; &lt;span class="n"&gt;mkdir&lt;/span&gt; &lt;span class="n"&gt;anvil&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;blog&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After creating your application folder, you will need to change your directory into “anvil-blog”.&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="err"&gt;$&lt;/span&gt; &lt;span class="n"&gt;cd&lt;/span&gt; &lt;span class="n"&gt;anvil&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;blog&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Environment Setup
&lt;/h3&gt;

&lt;p&gt;Inside your project directory, we will create and activate a virtual environment, which will house all of our application dependencies. In this case, I called it “env”.&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;python &lt;span class="nt"&gt;-m&lt;/span&gt; venv &lt;span class="nb"&gt;env&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;env&lt;/span&gt;/bin/activate
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Installing Dependencies
&lt;/h3&gt;

&lt;p&gt;To build our API using FastAPI, we need to install necessary dependencies that will help our application run smoothly, and below are what we need:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://fastapi.tiangolo.com/" rel="noopener noreferrer"&gt;FastAPI&lt;/a&gt; - A web framework for building APIs with Python.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.uvicorn.org/" rel="noopener noreferrer"&gt;Uvicorn&lt;/a&gt; - An&amp;nbsp;ASGI web server implementation for Python&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://pydantic.dev/" rel="noopener noreferrer"&gt;Pydantic&lt;/a&gt; - A data validation library for Python.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Run the command below to install these packages:&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="o"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;env&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;pip &lt;span class="nb"&gt;install &lt;/span&gt;fastapi uvicorn pydantic
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 2 - Running our first basic application
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Application Setup
&lt;/h3&gt;

&lt;p&gt;Now that we have our project environment setup, it’s time to write some FastAPI code. Create a new file in your project folder and name it “main.py”, this is where we’ll write all of our application code. &lt;/p&gt;

&lt;p&gt;Let’s add this code to our “main.py” file.&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="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;uvicorn&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;fastapi&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;FastAPI&lt;/span&gt;

&lt;span class="n"&gt;app&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;FastAPI&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="nd"&gt;@app.get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;/&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;anvil&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
    &lt;span class="k"&gt;return&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&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;world&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="n"&gt;uvicorn&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;app&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;host&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.0.0.0&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;port&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;8000&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let’s break down the above code:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;@app.get("/")&lt;/code&gt;&lt;/strong&gt; defines a route for our FastAPI application. When someone accesses the root URL (&lt;code&gt;/&lt;/code&gt;), the &lt;code&gt;anvil&lt;/code&gt; function is called. This function simply returns a JSON response with the message &lt;code&gt;"hello": "world"&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;if __name__ == "__main__":&lt;/code&gt;&lt;/strong&gt; ensures that our code runs only when the script is executed directly. Inside this block, &lt;code&gt;uvicorn.run&lt;/code&gt; is called to start the Uvicorn server, which serves our FastAPI app at the specified host (&lt;code&gt;0.0.0.0&lt;/code&gt;) and port (&lt;code&gt;8000&lt;/code&gt;).&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Running our Application Server
&lt;/h3&gt;

&lt;p&gt;To run our application server run the command below in your terminal:&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;env&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="err"&gt;$&lt;/span&gt; &lt;span class="n"&gt;python&lt;/span&gt; &lt;span class="n"&gt;main&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;py&lt;/span&gt; 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You should get similar result as the image below:&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%2Fitllsbj8qba83yqqur2u.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%2Fitllsbj8qba83yqqur2u.png" alt="Image Server" width="617" height="168"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can now access your application at &lt;code&gt;http://localhost:8000/&lt;/code&gt;.&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%2Fy8d213x4o62shxv6uilg.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%2Fy8d213x4o62shxv6uilg.png" alt="Image Application" width="800" height="409"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;🎉 Congratulations, we have successfully run our first FastAPI application.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Step 3 -&lt;/strong&gt; Creating our Application Model Structure ****
&lt;/h2&gt;

&lt;p&gt;Earlier we installed &lt;a href="https://www.notion.so/How-to-Build-a-Python-API-from-Scratch-with-FastAPI-281fc3d2f43f4e6fb1eab23535231562?pvs=21" rel="noopener noreferrer"&gt;Pydantic&lt;/a&gt;, a library that helps us validate and serialize data schemas, we’ll use this library to create our application model structure.&lt;/p&gt;

&lt;p&gt;Let’s add this code to our “main.py” file:&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="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;pydantic&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;BaseModel&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;typing&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;List&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;Optional&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;uuid&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;UUID&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;uuid4&lt;/span&gt;

&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Blog&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;BaseModel&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="nb"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Optional&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;UUID&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="bp"&gt;None&lt;/span&gt;
    &lt;span class="n"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;
    &lt;span class="n"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, let's break down the code:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;We've used &lt;code&gt;UUID&lt;/code&gt;  also known as universally unique identifier, to ensure that each &lt;code&gt;Blog&lt;/code&gt; instance has a unique identifier. This helps us guarantee that the &lt;code&gt;id&lt;/code&gt; for each blog post is always unique.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;Optional&lt;/code&gt; type indicates that the &lt;code&gt;id&lt;/code&gt; field is not required when a new blog post is created. If the &lt;code&gt;id&lt;/code&gt; is not provided, it defaults to &lt;code&gt;None&lt;/code&gt;, allowing the system to generate it automatically.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Creating a Temporary Database for our Model
&lt;/h3&gt;

&lt;p&gt;Because we are not using a real database in this tutorial, we are going to use a list instead. Let’s add the code below under our &lt;code&gt;Blog&lt;/code&gt; model:&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="n"&gt;blogs&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;Here is what your “main.py” file should look like:&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="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;uvicorn&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;fastapi&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;FastAPI&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;pydantic&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;BaseModel&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;typing&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;List&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;Optional&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;uuid&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;UUID&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;uuid4&lt;/span&gt;

&lt;span class="n"&gt;app&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;FastAPI&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Blog&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;BaseModel&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="nb"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Optional&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;UUID&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="bp"&gt;None&lt;/span&gt;
    &lt;span class="n"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;
    &lt;span class="n"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;

&lt;span class="n"&gt;blogs&lt;/span&gt; &lt;span class="o"&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="n"&gt;uvicorn&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;app&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;host&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.0.0.0&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;port&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;8000&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step - 4 Writing our Application CRUD functionalities
&lt;/h2&gt;

&lt;p&gt;You might be curious about what CRUD stands for. It represents the four main operations commonly performed in most applications: Create, Read, Update, and Delete.&lt;/p&gt;

&lt;h3&gt;
  
  
  Create Blog Post API
&lt;/h3&gt;

&lt;p&gt;In the Create Blog Post API, we're going to allow users to create blog posts. Here's how it works:&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="nd"&gt;@app.post&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;/blogs/&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;response_model&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;Blog&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;create_blog&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;blog&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Blog&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;blog&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nb"&gt;id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;uuid4&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="n"&gt;blogs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;blog&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;blog&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, let's break down the code:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;response_model=Blog&lt;/code&gt;&lt;/strong&gt; tells FastAPI to use the &lt;code&gt;Blog&lt;/code&gt; model to structure the JSON response returned from the &lt;code&gt;/blogs/&lt;/code&gt; route.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;(blog: Blog)&lt;/code&gt;&lt;/strong&gt; specifies that we want to accept a new blog post using our &lt;code&gt;Blog&lt;/code&gt; model.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;blogs.append(blog)&lt;/code&gt;&lt;/strong&gt; as you might already know adds the new blog post to our temporary &lt;a href="https://www.notion.so/How-to-Build-a-Python-API-from-Scratch-with-FastAPI-281fc3d2f43f4e6fb1eab23535231562?pvs=21" rel="noopener noreferrer"&gt;database&lt;/a&gt;, which is represented by the &lt;code&gt;blogs[]&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Get Blog List API
&lt;/h3&gt;

&lt;p&gt;In the Get Blog List API, we're going to allow users to retrieve all the blog posts they have created. Here's how it works:&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="nd"&gt;@app.get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;/blogs/&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;response_model&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nb"&gt;list&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Blog&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;list_blogs&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;blogs&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, let's break down the code:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;response_model=list[Blog]&lt;/code&gt;&lt;/strong&gt; as you might already know tells FastAPI that the response will be a list of &lt;code&gt;Blog&lt;/code&gt; objects.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;return blogs&lt;/code&gt;&lt;/strong&gt;: This line returns the entire list of blog posts stored in our temporary database, which is the &lt;code&gt;blogs[]&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Update Blog Post API
&lt;/h3&gt;

&lt;p&gt;In the Update Blog Post API, we allow users to modify an existing blog post by providing its unique identifier (UUID) and the new data they wish to update. Here’s how it works:&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="nd"&gt;@app.put&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;/blog/{blog_id}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;response_model&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;Blog&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;update_blog&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;blog_id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;UUID&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;blog_update&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Blog&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;idx&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;blog&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nf"&gt;enumerate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;blogs&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;blog&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nb"&gt;id&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="n"&gt;blog_id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="n"&gt;updated_blog&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;blog&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;copy&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;update&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;blog_update&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;dict&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;exclude_unset&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
            &lt;span class="n"&gt;blogs&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;idx&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;updated_blog&lt;/span&gt;
            &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;updated_blog&lt;/span&gt;

    &lt;span class="k"&gt;raise&lt;/span&gt; &lt;span class="nc"&gt;HTTPException&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;status_code&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;404&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;detail&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Blog not found&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The above code looks a bit more complex than the previous ones we've written, so let’s break it down:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;@app.put("/blogs/{blog_id}")&lt;/code&gt;&lt;/strong&gt; route makes the update function accessible. The &lt;code&gt;{blog_id}&lt;/code&gt; part is a path parameter that takes the unique identifier of the blog post you want to update.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;blog_update: Blog&lt;/code&gt;&lt;/strong&gt;: This parameter indicates that the request body should contain a &lt;code&gt;Blog&lt;/code&gt; model with the new data to be applied.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;update_blog&lt;/code&gt; function iterates through the &lt;code&gt;blogs&lt;/code&gt; list and checks for a blog post with a matching &lt;code&gt;blog_id&lt;/code&gt;. When it finds a match, it updates that entry using the &lt;code&gt;copy(update=blog_update.dict(exclude_unset=True))&lt;/code&gt; method. This method updates only the fields provided in the request, leaving the others unchanged.&lt;/li&gt;
&lt;li&gt;If the blog post is found and updated, the function returns the updated blog. If not, it raises an &lt;code&gt;HTTPException&lt;/code&gt; with a 404 status code, indicating that the blog post was not found.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Delete Blog Post API
&lt;/h3&gt;

&lt;p&gt;For this functionality, we want to allow users to remove a blog post by providing its unique identifier (UUID).&lt;/p&gt;

&lt;p&gt;Let’s add this code to our "main.py" file:&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="nd"&gt;@app.delete&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;/blogs/{blog_id}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;response_model&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;Blog&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;delete_blog&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;blog_id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;UUID&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;idx&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;blog&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nf"&gt;enumerate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;blogs&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;blog&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nb"&gt;id&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="n"&gt;blog_id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;blogs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;pop&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;idx&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="k"&gt;raise&lt;/span&gt; &lt;span class="nc"&gt;HTTPException&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;status_code&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;404&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;detail&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Blog not found&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let’s break down the above code: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;@app.delete("/blogs/{blog_id}")&lt;/code&gt;&lt;/strong&gt; as you might already know, this route provides access to the delete function. Similar to the update route, &lt;code&gt;{blog_id}&lt;/code&gt; is a path parameter that takes the unique identifier of the blog post you want to delete.&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;delete_blog&lt;/code&gt; function iterates through the &lt;code&gt;blogs&lt;/code&gt; list, and if it finds a blog post with a matching &lt;code&gt;blog_id&lt;/code&gt;, it removes that post from the list using &lt;code&gt;pop(idx)&lt;/code&gt; and returns the deleted blog.&lt;/li&gt;
&lt;li&gt;If the blog post is not found, the function raises an &lt;code&gt;HTTPException&lt;/code&gt; with a 404 status code, indicating that the blog post was not found.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;💡 You can access the entire code for this tutorial on &lt;a href="https://github.com/AdeboyeDN/anvil-blog" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 5 - Testing our APIs
&lt;/h2&gt;

&lt;p&gt;To test our application APIs, start your FastAPI project server using the command below in your terminal:&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="o"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;env&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;python main.py 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;FastAPI, by default, automatically generates API documentation without any extra setup. To access your project’s API documentation, head over to &lt;code&gt;http://localhost:8000/docs#/&lt;/code&gt; .&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%2F9iapc295v1w46ugqj3jk.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%2F9iapc295v1w46ugqj3jk.png" alt="Image API" width="800" height="373"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can also test your API endpoints using the API documentation.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 6 - Exercise
&lt;/h2&gt;

&lt;p&gt;Write an API that gets individual blogs via their &lt;code&gt;id&lt;/code&gt;. Submit your answer as a pull request on this &lt;a href="https://github.com/AdeboyeDN/anvil-blog" rel="noopener noreferrer"&gt;repository&lt;/a&gt;. I will give you feedback in 1-2 weeks. If you want a faster review, you can tag me on X with the URL to your pull request.&lt;/p&gt;

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

&lt;p&gt;In this article, we learned how to build a Python API using FastAPI. We covered setting up a FastAPI project, defining the project model structure with Pydantic, implementing CRUD functionalities for our blog, and testing our APIs.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Comparing PaaS and Traditional DevOps: Choosing the Right Approach for Your Software Development Process</title>
      <dc:creator>Daniel Adeboye</dc:creator>
      <pubDate>Fri, 16 Jun 2023 08:28:56 +0000</pubDate>
      <link>https://dev.to/adeboyedn/comparing-paas-and-traditional-devops-choosing-the-right-approach-for-your-software-development-process-2bh6</link>
      <guid>https://dev.to/adeboyedn/comparing-paas-and-traditional-devops-choosing-the-right-approach-for-your-software-development-process-2bh6</guid>
      <description>&lt;p&gt;In the world of software development, there are different approaches to managing infrastructure and deploying applications. Two popular options are Platform as a Service (PaaS) and traditional DevOps processes. While both have their merits, understanding the key differences between them is crucial for making informed decisions about which approach best suits your development needs. &lt;/p&gt;

&lt;p&gt;At &lt;strong&gt;PipeOps&lt;/strong&gt;, one of our goals is to simplify the cloud deployment and infrastructure management process, and in this article, we will compare PaaS and traditional DevOps across various aspects, helping you make an informed choice.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;What is Traditional DevOps?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Traditional DevOps involves the collaborative efforts of development and operations teams to streamline the software development lifecycle. It focuses on breaking down silos between teams, emphasizing collaboration, automation, and continuous integration and delivery. With traditional DevOps, developers assume responsibility for managing infrastructure, configuring servers, operating systems, and networking components to support application deployment and scaling.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;What is PaaS?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Platform as a Service (PaaS) is a cloud computing model that abstracts away infrastructure management. PaaS providers like &lt;strong&gt;PipeOps&lt;/strong&gt; offer a platform where developers can build, deploy, and manage applications without the need to worry about the underlying infrastructure. PaaS handles provisioning, scaling, and maintenance of the infrastructure, allowing developers to focus more on application development and deployment.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;What are their differences?&lt;/strong&gt;
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Infrastructure Management:&lt;/strong&gt; In traditional DevOps, developers take on the responsibility of managing infrastructure, configuring servers, operating systems, and networking components. On the other hand, PaaS abstracts away infrastructure management. PaaS providers handle the provisioning and maintenance of the underlying infrastructure, enabling developers to focus more on application development and deployment.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Scalability:&lt;/strong&gt; Scaling applications in a traditional DevOps setup often requires manual intervention. Developers must provision additional servers, configure load balancers, and manage traffic distribution to accommodate increasing demand. PaaS platforms, on the other hand, offer automatic scalability. They can dynamically allocate resources based on demand, allowing applications to scale up or down seamlessly without requiring manual intervention from developers.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Deployment Process:&lt;/strong&gt; Deploying applications in a traditional DevOps process involves configuring and managing deployment pipelines, setting up build servers, and handling deployment scripts or tools. This can be a time-consuming and complex process. PaaS platforms provide built-in deployment capabilities, simplifying the deployment process. Developers can deploy applications using a simple interface or command-line tool, abstracting away many of the deployment complexities associated with traditional DevOps.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Configuration Management:&lt;/strong&gt; In traditional DevOps, configuration management often involves using tools like Chef, Puppet, or Ansible to manage server configurations, environment variables, and dependencies. PaaS platforms typically include configuration management capabilities as part of their offering. Developers can define application configurations and environment variables directly within the platform, simplifying the configuration management process.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Flexibility and Customization:&lt;/strong&gt; Traditional DevOps processes provide greater flexibility and customization options. Developers have more control over infrastructure, software versions, and configurations, enabling tailored setups. PaaS platforms, while offering convenience and ease of use, may have some limitations on customization. Developers might encounter constraints when it comes to specific infrastructure configurations or software versions.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Responsibility and Maintenance:&lt;/strong&gt; In traditional DevOps setups, developers are responsible for managing and maintaining the entire infrastructure stack. This includes security updates, patches, backups, and overall system maintenance. PaaS providers handle much of the underlying infrastructure maintenance, including security updates and backups. However, developers are still responsible for ensuring the security and maintenance of their application code.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Use PipeOps For&amp;nbsp;Infrastructure Management&lt;/strong&gt;
&lt;/h2&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%2Fkenmpmdco84acviozpmp.jpg" 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%2Fkenmpmdco84acviozpmp.jpg" alt="PipeOps" width="800" height="449"&gt;&lt;/a&gt;&lt;br&gt;
In this article, we have explored the concepts of PaaS and traditional DevOps, highlighting the key distinctions between them. The decision between adopting PaaS or sticking with traditional DevOps depends on several factors, such as project requirements, the level of control desired, and the trade-offs between convenience and flexibility.&lt;/p&gt;

&lt;p&gt;PipeOps makes it easier for developer and dev-teams to deploy and manage their applications without worrying about the underlying infrastructure and with just few clicks you have everything up and ruining:&amp;nbsp;&lt;strong&gt;&lt;a href="https://pipeops.io/" rel="noopener noreferrer"&gt;try PipeOps for free now&lt;/a&gt;&lt;/strong&gt;&amp;nbsp;and forget worrying about the cost and risk of managing your cloud infrastructure. It only takes a minute to get started.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>10 Best Deployment Platforms</title>
      <dc:creator>Daniel Adeboye</dc:creator>
      <pubDate>Thu, 09 Mar 2023 13:36:53 +0000</pubDate>
      <link>https://dev.to/adeboyedn/10-best-deployment-platforms-fh7</link>
      <guid>https://dev.to/adeboyedn/10-best-deployment-platforms-fh7</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;As businesses increasingly rely on digital platforms, the need for efficient and effective deployment solutions has become critical. With so many options available, choosing the right deployment tool can be overwhelming for developers and businesses alike. In this article, we'll explore some of the best deployment options available for businesses of all sizes, from small startups to enterprise-level companies.&lt;/p&gt;

&lt;p&gt;In addition, we'll introduce you to PipeOps, a no-code tool for cloud deployments and infrastructure management. With PipeOps, developers can easily set up and manage their cloud infrastructure, so they can focus on building their product and serving their customers. With PipeOps, deploying your applications has never been easier.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Is A Deployment Platform?
&lt;/h2&gt;

&lt;p&gt;A deployment platform is a software tool or set of tools that automates the process of deploying software applications and services to production environments. It provides developers with a range of tools and services to quickly and efficiently deploy their applications and services to production environments. By automating the deployment process, deployment platforms help to reduce errors and speed up the time it takes to get applications up and running. This ultimately leads to faster delivery of high-quality software products to customers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Are Deployment Platforms Important?
&lt;/h2&gt;

&lt;p&gt;Deployment platforms are essential for modern software development, and here are four reasons why they are important:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Automation&lt;/strong&gt;: Deployment platforms automate the deployment process, eliminating manual errors that can occur during deployment. Automation also reduces the time and effort required to deploy applications, enabling developers to focus on creating and improving software.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Consistency&lt;/strong&gt;: Deployment platforms help to ensure consistency in the deployment process. By using standard processes and templates, deployment platforms make it easier to maintain consistency across different environments, such as development, testing, and production.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Scalability&lt;/strong&gt;: Deployment platforms are designed to handle large-scale deployments, making them essential for businesses that need to deploy applications across multiple environments or regions. With deployment platforms, businesses can easily scale up their infrastructure to meet increasing demands, without sacrificing efficiency or reliability.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Collaboration&lt;/strong&gt;: Deployment platforms enable teams to collaborate more effectively by providing a centralized location for managing deployment workflows, configuration files, and version control. This makes it easier for teams to work together, track changes, and ensure that everyone is working from the same codebase and deployment process.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Types Of Deployment Platforms.
&lt;/h2&gt;

&lt;p&gt;As the demand for streamlined deployment processes continues to grow, there are now many different types of deployment platforms available, each with its unique features and benefits. Here are some of the most popular types of deployment platforms in use today:&lt;/p&gt;

&lt;h3&gt;
  
  
  Northflank
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://northflank.com" rel="noopener noreferrer"&gt;Northflank&lt;/a&gt; is a modern, cloud-native deployment platform designed to make deploying, managing, and scaling applications effortless. It offers developers an intuitive interface and powerful tools for building microservices, databases, and static sites. Northflank supports a wide range of programming languages and integrates seamlessly with popular version control systems like GitHub and GitLab.&lt;/p&gt;

&lt;p&gt;With features like automatic SSL, built-in CI/CD pipelines, real-time logs, and metrics, Northflank simplifies infrastructure management while giving teams full control over their deployments. Whether you're a startup or an enterprise, Northflank helps you ship faster and manage your applications with ease.&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%2Fmazvypa1cpobd6mtyqqk.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%2Fmazvypa1cpobd6mtyqqk.png" alt=" " width="800" height="297"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  PipeOps
&lt;/h3&gt;

&lt;p&gt;PipeOps is a no-code cloud deployment and infrastructure management tool designed to simplify the setup and management of your cloud infrastructure. With PipeOps, you can easily deploy your applications and manage your infrastructure without worrying about the underlying complexities. This allows you to focus on what really matters - building your product and serving your customers. &lt;/p&gt;

&lt;p&gt;Whether you're a seasoned developer or just starting out, PipeOps offers free plans and affordable pricing to help you get started quickly. With PipeOps, you can streamline your cloud operations and keep costs under control, so you can concentrate on delivering value to your users.&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%2Foumxjnvj9717qwtek188.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%2Foumxjnvj9717qwtek188.png" alt=" " width="800" height="403"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Heroku
&lt;/h3&gt;

&lt;p&gt;Heroku is a cloud-based platform that helps businesses deploy and manage their applications quickly and easily. Heroku supports multiple programming languages, including Java, Ruby, Python, and Node.js.&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%2F8c5ajmxyfkepdzr8krgv.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%2F8c5ajmxyfkepdzr8krgv.png" alt=" " width="800" height="403"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Microsoft Azure
&lt;/h3&gt;

&lt;p&gt;Microsoft Azure is a cloud-based platform that provides businesses with a wide range of services, including compute, storage, networking, and analytics. Azure supports multiple programming languages, including Java, Python, and .NET.&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%2Fnaujajn02n429fx3benf.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%2Fnaujajn02n429fx3benf.png" alt=" " width="800" height="384"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  DigitalOcean
&lt;/h3&gt;

&lt;p&gt;DigitalOcean is a cloud-based platform that provides businesses with a simple, easy-to-use platform for deploying and managing their applications. DigitalOcean supports multiple programming languages, including Java, Python, and Ruby.&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%2Ftlnm52ydemghbdcuqyh6.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%2Ftlnm52ydemghbdcuqyh6.png" alt=" " width="800" height="403"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Vercel
&lt;/h3&gt;

&lt;p&gt;Vercel is a cloud-based platform that enables developers to deploy and manage web projects, including static and dynamic websites, APIs, and serverless functions. It supports a wide range of programming languages and frameworks, including React, Next.js, Angular, and Vue.js.&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%2Fhx6gemcd5f8hboq370vc.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%2Fhx6gemcd5f8hboq370vc.png" alt=" " width="800" height="403"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Render
&lt;/h3&gt;

&lt;p&gt;Render is a cloud-based platform that provides developers with a modern, easy-to-use infrastructure for deploying web applications and APIs. Render supports a wide range of programming languages and frameworks, including Node.js, Python, Ruby, and Go.&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%2Foaza3heucrrrlsskpc5v.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%2Foaza3heucrrrlsskpc5v.png" alt=" " width="800" height="403"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Fly.io
&lt;/h3&gt;

&lt;p&gt;Fly.io is a cloud-based platform that enables developers to deploy and manage web applications, including static websites, APIs, and serverless functions. Fly.io supports a wide range of programming languages and frameworks, including Node.js, Ruby, and Go.&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%2F1z6616n7me9qfverqo9a.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%2F1z6616n7me9qfverqo9a.png" alt=" " width="800" height="403"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  AWS (Amazon Web Services)
&lt;/h3&gt;

&lt;p&gt;AWS is a cloud-based platform that provides businesses with a wide range of services, including compute, storage, networking, and analytics. AWS supports multiple programming languages, including Java, Python, and .NET.&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%2Fvwltlrqyslk4q4450cad.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%2Fvwltlrqyslk4q4450cad.png" alt=" " width="800" height="403"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  GCP (Google Cloud Platform)
&lt;/h3&gt;

&lt;p&gt;GCP is a cloud-based platform that provides businesses with a wide range of services, including compute, storage, networking, and analytics. GCP supports multiple programming languages, including Java, Python, and .NET.&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%2F9fgmd3r2ulo68hjhysct.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%2F9fgmd3r2ulo68hjhysct.png" alt=" " width="800" height="403"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Netlify
&lt;/h3&gt;

&lt;p&gt;Netlify is a cloud-based platform that enables developers to deploy and manage web projects, including static and dynamic websites, APIs, and serverless functions. It supports a wide range of programming languages and frameworks, including React, Next.js, Angular, and Vue.js.&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%2Fhmmmkw1shtjse69hmksx.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%2Fhmmmkw1shtjse69hmksx.png" alt=" " width="800" height="403"&gt;&lt;/a&gt;&lt;/p&gt;

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

&lt;p&gt;In conclusion, deployment platforms play a vital role in modern software development. They offer automation, consistency, scalability, and collaboration, making them an essential tool for businesses looking to streamline their deployment processes. With a wide range of deployment platforms available, businesses can choose the one that best suits their needs and ensure they stay competitive by delivering high-quality products and services quickly and efficiently.&lt;/p&gt;

</description>
      <category>cloud</category>
      <category>devops</category>
      <category>webdev</category>
      <category>pipeops</category>
    </item>
    <item>
      <title>Building a Security-First Culture As A Developer or Team</title>
      <dc:creator>Daniel Adeboye</dc:creator>
      <pubDate>Tue, 07 Jun 2022 11:48:19 +0000</pubDate>
      <link>https://dev.to/adeboyedn/building-a-security-first-culture-as-a-developer-or-team-4dkc</link>
      <guid>https://dev.to/adeboyedn/building-a-security-first-culture-as-a-developer-or-team-4dkc</guid>
      <description>&lt;p&gt;Developing a security-first culture is crucial in today's digital age where cyber attacks and data breaches have become increasingly prevalent. As a developer or team, it may seem daunting to develop a security-first culture, but it's not that complex when put into practice. In this article, we'll list some activities that can help build a security-first culture.&lt;/p&gt;

&lt;h2&gt;
  
  
  Managing Secret Credentials
&lt;/h2&gt;

&lt;p&gt;Using a .env file to hide secrets during development is a common practice, but it doesn't scale and doesn't improve codebase security. Using an enhanced tool like Onboardbase, a secure online vault for developers and teams to store and share app secrets, is a better and more improved option. Managing secret credentials the right way can help developers and teams reduce the rate of vulnerability in their codebase or project and create a good security culture.&lt;/p&gt;

&lt;h2&gt;
  
  
  Bug Hunt Session
&lt;/h2&gt;

&lt;p&gt;Organizing a bug hunt session in a company can help the team discover issues fast and fix them before pushing to the general public. There are tools available to test codebase for bugs, leaked secret keys, and more. Gitguardian, for example, can scan codebase for leaked secret keys and reduce the stress of checking every single line of code in the codebase. Having regular bug hunt sessions and utilizing available tools can help foster a security-first culture.&lt;/p&gt;

&lt;h2&gt;
  
  
  Automate Security Initiatives
&lt;/h2&gt;

&lt;p&gt;Security automation is a machine-based execution of security actions that can detect, investigate, and remediate cyber threats with or without human intervention. Security automation can identify incoming threats, triage and prioritize alerts as they emerge, and perform automated incident response. Automating security initiatives can help create a more secure and efficient work environment.&lt;/p&gt;

&lt;h2&gt;
  
  
  Security Awareness Training
&lt;/h2&gt;

&lt;p&gt;Taking security courses and implementing security awareness training can help enlighten development teams and give them more insights on how to prioritize security when building products for themselves or the company. It is essential to put in place time and budget for taking security courses to ensure that developers are equipped with the necessary knowledge to develop a security-first culture.&lt;/p&gt;

&lt;p&gt;In conclusion, building a security-first culture is vital to protect against cyber threats and data breaches. By following the activities listed above, developers and teams can develop a security-first culture and make it an integral part of their work environment.&lt;/p&gt;

</description>
      <category>discuss</category>
      <category>devops</category>
      <category>security</category>
    </item>
  </channel>
</rss>
