Skip to content

Commit 0221025

Browse files
docs: editorial follow-ups after the content review (#21)
- Retitle the EN libraries article "Why extract Python service infrastructure into libraries" - Remove em dashes from the Russian lab READMEs - Drop links to articles published later under the new dates - Call the partition archive target "archive storage" explicitly
1 parent fb3897f commit 0221025

53 files changed

Lines changed: 76 additions & 76 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎docs/blog/archive/index.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Every post in the Bedrock Python blog, grouped by year.
55
## 2026
66

77
- **2026-10-29** — [Why AI review findings need verification](../posts/2026-10-29-ai-code-review-should-not-be-fully-autonomous.md)
8-
- **2026-10-27** — [Why I extract Python service infrastructure into libraries](../posts/2026-10-27-why-bedrock-python-libraries.md)
8+
- **2026-10-27** — [Why extract Python service infrastructure into libraries](../posts/2026-10-27-why-bedrock-python-libraries.md)
99
- **2026-10-26** — [Documentation that lets an AI coding agent write checkable code](../posts/2026-10-26-documentation-for-ai-coding-agents.md)
1010
- **2026-10-22** — [A Python library from template to release](../posts/2026-10-22-python-library-from-template-to-release.md)
1111
- **2026-10-21** — [A core without dependencies: install the integrations your service needs](../posts/2026-10-21-zero-dependency-cores.md)

‎docs/blog/catalog.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
},
2626
{
2727
"id": "2026-10-27-why-bedrock-python-libraries",
28-
"title": "Why I extract Python service infrastructure into libraries",
28+
"title": "Why extract Python service infrastructure into libraries",
2929
"description": "Once there is more than one service, they start sharing plumbing: connection pools, retries, request deadlines, shutdown order.",
3030
"url": "posts/2026-10-27-why-bedrock-python-libraries/",
3131
"date": "2026-10-27",
@@ -41,7 +41,7 @@
4141
"engineering"
4242
],
4343
"minutes": 7,
44-
"search": "Why I extract Python service infrastructure into libraries Once there is more than one service, they start sharing plumbing: connection pools, retries, request deadlines, shutdown order. bedrock-python architecture servicewright Meta Python & tooling Start with the decision the service owns Connect PostgreSQL and the warehouse Give the whole operation one time limit Create shared resources once and close them last Check the behavior, not just the imports When a separate library earns its cost What the libraries take and what stays Examples and labs"
44+
"search": "Why extract Python service infrastructure into libraries Once there is more than one service, they start sharing plumbing: connection pools, retries, request deadlines, shutdown order. bedrock-python architecture servicewright Meta Python & tooling Start with the decision the service owns Connect PostgreSQL and the warehouse Give the whole operation one time limit Create shared resources once and close them last Check the behavior, not just the imports When a separate library earns its cost What the libraries take and what stays Examples and labs"
4545
},
4646
{
4747
"id": "2026-10-26-documentation-for-ai-coding-agents",

‎docs/blog/category/meta.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22

33
Announcements about the blog and ecosystem.
44

5-
- **2026-10-27** — [Why I extract Python service infrastructure into libraries](../posts/2026-10-27-why-bedrock-python-libraries.md)
5+
- **2026-10-27** — [Why extract Python service infrastructure into libraries](../posts/2026-10-27-why-bedrock-python-libraries.md)
66
- **2026-10-26** — [Documentation that lets an AI coding agent write checkable code](../posts/2026-10-26-documentation-for-ai-coding-agents.md)

‎docs/blog/index.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ hide:
101101
<a class="bdr-entry__link bdr-card" href="posts/2026-10-27-why-bedrock-python-libraries/">
102102
<div class="bdr-entry__body">
103103
<div class="bdr-entry__eyebrow">Python &amp; tooling <span>·</span> Meta</div>
104-
<h3 class="bdr-entry__title">Why I extract Python service infrastructure into libraries</h3>
104+
<h3 class="bdr-entry__title">Why extract Python service infrastructure into libraries</h3>
105105
<p class="bdr-entry__description">Once there is more than one service, they start sharing plumbing: connection pools, retries, request deadlines, shutdown order.</p>
106106
<div class="bdr-entry__meta"><time datetime="2026-10-27">Oct 27, 2026</time><span>·</span><span>7 min read</span></div>
107107
</div>

‎docs/blog/lab/2026-09-07-what-every-microservice-reimplements/README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Lab: an orders API on four libraries {#lab-what-every-production-python-microservice-reimplements}
22

3-
An orders API reads PostgreSQL and asks a local warehouse for stock. It combines servicewright, sqlalchemy-foundation-kit, clientwright and deadline-budget. Companion to [Why I extract Python service infrastructure into libraries](../../posts/2026-10-27-why-bedrock-python-libraries.md).
3+
An orders API reads PostgreSQL and asks a local warehouse for stock. It combines servicewright, sqlalchemy-foundation-kit, clientwright and deadline-budget. Companion to [Why extract Python service infrastructure into libraries](../../posts/2026-10-27-why-bedrock-python-libraries.md).
44

55
## Run {#run}
66

‎docs/blog/posts/2026-05-30-welcome/index.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@
1010
<script>location.replace(new URL("../2026-10-27-why-bedrock-python-libraries/" + location.search + location.hash, location.href).href);</script>
1111
</head>
1212
<body>
13-
<p>This article has been consolidated: <a href="../2026-10-27-why-bedrock-python-libraries/">Why I extract Python service infrastructure into libraries</a>.</p>
13+
<p>This article has been consolidated: <a href="../2026-10-27-why-bedrock-python-libraries/">Why extract Python service infrastructure into libraries</a>.</p>
1414
</body>
1515
</html>

‎docs/blog/posts/2026-09-07-what-every-microservice-reimplements/index.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@
1010
<script>location.replace(new URL("../2026-10-27-why-bedrock-python-libraries/" + location.search + location.hash, location.href).href);</script>
1111
</head>
1212
<body>
13-
<p>This article has been consolidated: <a href="../2026-10-27-why-bedrock-python-libraries/">Why I extract Python service infrastructure into libraries</a>.</p>
13+
<p>This article has been consolidated: <a href="../2026-10-27-why-bedrock-python-libraries/">Why extract Python service infrastructure into libraries</a>.</p>
1414
</body>
1515
</html>

‎docs/blog/posts/2026-09-08-why-grpc-interceptors-break-on-streaming-rpcs.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,4 +283,4 @@ Both scripts assert outcomes and exit with an error on a mismatch; durations are
283283

284284
## What to take into your service {#conclusion}
285285

286-
Register one interceptor object per RPC shape. Measure until the call completes, not until `continuation` returns. Let the caller own the reading loop and cancel the call when it stops early. [grpc-client-kit](https://github.com/bedrock-python/grpc-client-kit) packages the second rule as `around_call`, and also ships ready-made interceptors such as `AsyncLoggingInterceptor` and `AsyncClientContextInterceptor`. Test whatever you build with a partial read and a failure mid-stream. Channel ownership, deadlines and retries are covered in [production HTTP and gRPC clients](2026-09-13-production-http-grpc-clients.md).
286+
Register one interceptor object per RPC shape. Measure until the call completes, not until `continuation` returns. Let the caller own the reading loop and cancel the call when it stops early. [grpc-client-kit](https://github.com/bedrock-python/grpc-client-kit) packages the second rule as `around_call`, and also ships ready-made interceptors such as `AsyncLoggingInterceptor` and `AsyncClientContextInterceptor`. Test whatever you build with a partial read and a failure mid-stream.

‎docs/blog/posts/2026-09-13-production-http-grpc-clients.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ async def outbound_clients(inventory_url, payments_url):
7373
yield inventory, payments
7474
```
7575

76-
Opening them per request would throw away connection reuse, the retry budget and breaker state. The [service lifecycle article](2026-09-20-python-service-lifecycle.md) shows where the application scope belongs.
76+
Opening them per request would throw away connection reuse, the retry budget and breaker state.
7777

7878
<div id="reliability-is-not-retry3" data-search-exclude></div>
7979
<div id="why-retries-look-free" data-search-exclude></div>
@@ -141,7 +141,7 @@ async def charge(client, order_id, amount_minor):
141141
| POST marked idempotent, no server key | 2 | 2 |
142142
| POST with the stable key and client flag | 2 | 1; caller receives the saved payment ID |
143143

144-
A second `charge()` for the same order returns the same payment ID. The lab deduplicates in memory and sequentially; a real API needs durable storage and atomic handling of concurrent duplicates; see [idempotency in APIs and jobs](2026-09-14-idempotency-in-apis-and-background-jobs.md).
144+
A second `charge()` for the same order returns the same payment ID. The lab deduplicates in memory and sequentially; a real API needs durable storage and atomic handling of concurrent duplicates.
145145

146146
### Respect the requested delay and limit extra traffic {#retry-budget}
147147

‎docs/blog/posts/2026-09-14-idempotency-in-apis-and-background-jobs.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ That is why `charge_once` gives the provider a key built from the tenant, the ac
202202

203203
## Redis is unavailable, or the key has expired {#failure-policy}
204204

205-
When Redis fails, idempotency-kit 0.4.1 runs the action without protection (fail open). In the lab, two calls with one key during a Redis outage charge twice at a provider without its own deduplication. So payment protection must hold at the provider, and changes to your own database belong in one transaction with the processing record, as in [the inbox example](2026-10-03-reliable-events-outbox-inbox-kafka.md).
205+
When Redis fails, idempotency-kit 0.4.1 runs the action without protection (fail open). In the lab, two calls with one key during a Redis outage charge twice at a provider without its own deduplication. So payment protection must hold at the provider, and changes to your own database belong in one transaction with the processing record.
206206

207207
Records expire too. The lease covers a running action, payment results live for an hour and invoice results for a day; once a record is gone, the original key runs the action again, so cover your longest retry or redelivery window. The coordinator keeps TTLs in whole minutes, rounding down, with a one-minute minimum. A crashed process leaves its reservation until the lease runs out, and expiry does not stop a slow first action: the lab shows a second one starting beside it.
208208

0 commit comments

Comments
 (0)