<?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: Yogesh23012001</title>
    <description>The latest articles on DEV Community by Yogesh23012001 (@yogesh23012001).</description>
    <link>https://dev.to/yogesh23012001</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3961123%2Fb4ee5a73-13db-4b7a-a429-40d9410c7496.JPG</url>
      <title>DEV Community: Yogesh23012001</title>
      <link>https://dev.to/yogesh23012001</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/yogesh23012001"/>
    <language>en</language>
    <item>
      <title>What a Go Engineer Learns Building Their First Real Python Service</title>
      <dc:creator>Yogesh23012001</dc:creator>
      <pubDate>Sun, 31 May 2026 16:27:36 +0000</pubDate>
      <link>https://dev.to/yogesh23012001/-1pk8</link>
      <guid>https://dev.to/yogesh23012001/-1pk8</guid>
      <description>&lt;div class="ltag__link--embedded"&gt;
  &lt;div class="crayons-story "&gt;
  &lt;a href="https://dev.to/yogesh23012001/what-a-go-engineer-learns-building-their-first-real-python-service-3b0c" class="crayons-story__hidden-navigation-link"&gt;What a Go Engineer Learns Building Their First Real Python Service&lt;/a&gt;


  &lt;div class="crayons-story__body crayons-story__body-full_post"&gt;
    &lt;div class="crayons-story__top"&gt;
      &lt;div class="crayons-story__meta"&gt;
        &lt;div class="crayons-story__author-pic"&gt;

          &lt;a href="/yogesh23012001" class="crayons-avatar  crayons-avatar--l  "&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%2Fuser%2Fprofile_image%2F3961123%2Fb4ee5a73-13db-4b7a-a429-40d9410c7496.JPG" alt="yogesh23012001 profile" class="crayons-avatar__image" width="800" height="1067"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;div&gt;
          &lt;div&gt;
            &lt;a href="/yogesh23012001" class="crayons-story__secondary fw-medium m:hidden"&gt;
              Yogesh23012001
            &lt;/a&gt;
            &lt;div class="profile-preview-card relative mb-4 s:mb-0 fw-medium hidden m:inline-block"&gt;
              
                Yogesh23012001
                
              
              &lt;div id="story-author-preview-content-3790013" class="profile-preview-card__content crayons-dropdown branded-7 p-4 pt-0"&gt;
                &lt;div class="gap-4 grid"&gt;
                  &lt;div class="-mt-4"&gt;
                    &lt;a href="/yogesh23012001" class="flex"&gt;
                      &lt;span class="crayons-avatar crayons-avatar--xl mr-2 shrink-0"&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%2Fuser%2Fprofile_image%2F3961123%2Fb4ee5a73-13db-4b7a-a429-40d9410c7496.JPG" class="crayons-avatar__image" alt="" width="800" height="1067"&gt;
                      &lt;/span&gt;
                      &lt;span class="crayons-link crayons-subtitle-2 mt-5"&gt;Yogesh23012001&lt;/span&gt;
                    &lt;/a&gt;
                  &lt;/div&gt;
                  &lt;div class="print-hidden"&gt;
                    
                      Follow
                    
                  &lt;/div&gt;
                  &lt;div class="author-preview-metadata-container"&gt;&lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;

          &lt;/div&gt;
          &lt;a href="https://dev.to/yogesh23012001/what-a-go-engineer-learns-building-their-first-real-python-service-3b0c" class="crayons-story__tertiary fs-xs"&gt;&lt;time&gt;May 31&lt;/time&gt;&lt;span class="time-ago-indicator-initial-placeholder"&gt;&lt;/span&gt;&lt;/a&gt;
        &lt;/div&gt;
      &lt;/div&gt;

    &lt;/div&gt;

    &lt;div class="crayons-story__indention"&gt;
      &lt;h2 class="crayons-story__title crayons-story__title-full_post"&gt;
        &lt;a href="https://dev.to/yogesh23012001/what-a-go-engineer-learns-building-their-first-real-python-service-3b0c" id="article-link-3790013"&gt;
          What a Go Engineer Learns Building Their First Real Python Service
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;div class="crayons-story__tags"&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/ai"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;ai&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/webdev"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;webdev&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/python"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;python&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/career"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;career&lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="crayons-story__bottom"&gt;
        &lt;div class="crayons-story__details"&gt;
            &lt;a href="https://dev.to/yogesh23012001/what-a-go-engineer-learns-building-their-first-real-python-service-3b0c#comments" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left flex items-center"&gt;
              Comments


              &lt;span class="hidden s:inline"&gt;Add Comment&lt;/span&gt;
            &lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="crayons-story__save"&gt;
          &lt;small class="crayons-story__tertiary fs-xs mr-2"&gt;
            5 min read
          &lt;/small&gt;
            
              &lt;span class="bm-initial"&gt;
                

              &lt;/span&gt;
              &lt;span class="bm-success"&gt;
                

              &lt;/span&gt;
            
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;/div&gt;


</description>
      <category>ai</category>
      <category>webdev</category>
      <category>python</category>
      <category>career</category>
    </item>
    <item>
      <title>What a Go Engineer Learns Building Their First Real Python Service</title>
      <dc:creator>Yogesh23012001</dc:creator>
      <pubDate>Sun, 31 May 2026 16:18:04 +0000</pubDate>
      <link>https://dev.to/yogesh23012001/what-a-go-engineer-learns-building-their-first-real-python-service-3b0c</link>
      <guid>https://dev.to/yogesh23012001/what-a-go-engineer-learns-building-their-first-real-python-service-3b0c</guid>
      <description>&lt;p&gt;I spent the last three years writing Go. At NPCI I built payment systems where the wrong defaults cost real money. At ShopUp I work on backend services that have to be right, fast, and observable in that order.&lt;/p&gt;

&lt;p&gt;This weekend I built my first real Python service: an idempotent task queue with a Postgres-backed worker, retries, dead-letter queue, full Prometheus observability, and a 16-test suite. From mkdir to GitHub release in eight hours.&lt;/p&gt;

&lt;p&gt;I want to write about what surprised me. Some of it was the language. Most of it wasn't.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What I built&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The repo is &lt;a href="https://github.com/Yogesh23012001/idempotent-task-queue/tree/main" rel="noopener noreferrer"&gt;here&lt;/a&gt;. The short version: an HTTP API that accepts tasks with an Idempotency-Key header (Stripe style), persists them to Postgres, and a separate async worker process that picks them up using SELECT ... FOR UPDATE SKIP LOCKED, runs them, and writes the outcome back.&lt;/p&gt;

&lt;p&gt;Same key + same body returns the cached response. Same key + different body returns 422. Failed tasks retry up to max_attempts; tasks that exhaust the budget go to a DEAD_LETTER state for operator review.&lt;/p&gt;

&lt;p&gt;This is the pattern most payment systems are built on. I've consumed it through Go libraries at NPCI; I'd never implemented it from scratch.&lt;/p&gt;

&lt;p&gt;Benchmark on my MacBook Air M2: 590 req/s on GET /tasks at concurrency 50, p50 67ms, p99 228ms. The latency tail is dominated by Postgres connection-pool contention — pool size 10 versus 50 concurrent requests means 40 of them are waiting. That's not a Python problem; that's the same problem I'd have in any language with the same pool configuration. Production fix is PgBouncer or a larger pool.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What transferred from Go&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;More than I expected.&lt;br&gt;
The mental model for state machines transferred cleanly. A task is PENDING, becomes PROCESSING when a worker claims it, ends as SUCCEEDED, FAILED, or DEAD_LETTER. The state guards are enforced in code the same way I'd enforce them in Go — return a 409 if someone tries an illegal transition. SQLAlchemy's enum type even maps to a Postgres task_status enum, so the database rejects invalid states too. That's the same belt-and-braces I'd build in Go.&lt;/p&gt;

&lt;p&gt;Hexagonal architecture maps one-to-one. Models in one package, persistence in another, handlers in a third, transport (HTTP) at the edge. Pydantic models play the role of Go structs with validation tags; SQLAlchemy ORM models play the role of sqlx row types. The boundaries are identical; only the syntax differs.&lt;/p&gt;

&lt;p&gt;Async-first thinking transferred without much friction. I expected this to be the hard part — goroutines feel native; Python's event loop is a thing you have to think about. In practice, asyncio with httpx and SQLAlchemy 2.0's async support gave me code that reads almost identically to Go. The big difference is await everywhere instead of implicit goroutine scheduling.&lt;/p&gt;

&lt;p&gt;Database transactions as the contract. This is where I felt most at home. The race condition that hits every idempotent endpoint — two requests with the same key racing past the existence check — is handled with the same primitive in both languages: a unique constraint on the database, an IntegrityError on conflict, a re-read to find the winner. Postgres's correctness guarantees don't care what language is calling it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What surprised me about Python&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is the section I'd been warned about. Most of the warnings were wrong.&lt;br&gt;
Dependency injection feels heavier than Go's interfaces — but only at first. In Go I write a constructor, take an interface, done. In FastAPI I write a Depends() function, wrap it in Annotated, type-alias for readability, then reference it in every handler signature. It's more verbose. But after writing it a dozen times, I noticed something: the test ergonomics are actually better.&lt;/p&gt;

&lt;p&gt;mypy --strict is a compiler — if you run it. This is the part Go engineers underestimate. Modern Python with mypy --strict plus Pydantic plus ruff catches almost everything the Go compiler would catch. The catch is "if you run it." Go enforces this on every build; Python relies on you to set up pre-commit hooks and CI. I built the hooks on day one and they paid for themselves within hours.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What I had to learn from scratch&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A short list, but each item was real work:&lt;/p&gt;

&lt;p&gt;Python's async model isn't Go's. Goroutines are preemptive, scheduled by the runtime, cheap. Python's coroutines are cooperative — they only yield at await points. If you write a CPU-bound function inside an async handler, the entire event loop blocks. This is the kind of thing the Go runtime saves you from. In Python you have to know it.&lt;br&gt;
Connection pool sizing matters from minute one. When I ran my first load test (hey -n 1000 -c 50) I saw a long latency tail. I almost wrote it off as "Python being slow." Then I looked at my SQLAlchemy pool configuration: pool_size=10. With concurrency 50, 40 requests were waiting for connections. The same exact issue exists in Go; I just had production frameworks at NPCI that pre-tuned it for me. Building from scratch in Python forced me to learn what the framework was doing.&lt;/p&gt;

&lt;p&gt;Alembic is genuinely better than go-migrate. Autogenerating migrations by diffing your ORM models against the live schema is a workflow Go doesn't really have. I was skeptical (autogen feels like magic) but reading the generated SQL before applying it is the right safety valve. I'll miss this when I'm back in Go.&lt;br&gt;
Pydantic-settings makes config a non-issue. Type-safe, env-file-aware, validated at startup. Go has Viper or hand-rolled struct unmarshaling; both feel ad-hoc by comparison.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What I'd tell another Go engineer&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Four things I wish I'd internalized on day one:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Don't try to make Python feel like Go. Lean into the idioms — Depends(), Annotated, Pydantic models, async context managers. Fighting the idioms wastes a week and produces unidiomatic code that other Python engineers will hate.&lt;/li&gt;
&lt;li&gt;Set up mypy --strict and pre-commit hooks before writing a single business-logic line. This is the closest you'll get to Go's compile-time guarantees. Without it, you're writing JavaScript with type comments.&lt;/li&gt;
&lt;li&gt;Build observability before features. I put structlog, OpenTelemetry, and Prometheus. Go engineers know this instinctively; Python tutorials skip it.&lt;/li&gt;
&lt;li&gt;Python is faster to write than you think; slower to run than you'd hope. My benchmark hit 590 req/s. A Go equivalent would do 3-5x that on the same hardware. For most services this doesn't matter — you'll be bottlenecked on the database or the LLM API anyway. For some services it absolutely matters. Know which you're building.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The repo is &lt;a href="https://github.com/Yogesh23012001/idempotent-task-queue/tree/main" rel="noopener noreferrer"&gt;here&lt;/a&gt;. The other repo with the FastAPI + observability + LLM gateway prototype is &lt;a href="https://github.com/Yogesh23012001/python-learning" rel="noopener noreferrer"&gt;here&lt;/a&gt;. Both are pinned on my &lt;a href="https://github.com/Yogesh23012001" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If you found this useful, follow me here or on GitHub — I'll be writing weekly through the rest of this transition.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>python</category>
      <category>career</category>
    </item>
  </channel>
</rss>
