Skip to content

Feat/betwixt first release - #10

Merged
dusktreader merged 2 commits into
mainfrom
feat/betwixt-first-release
Sep 8, 2026
Merged

dusktreader merged 2 commits into
mainfrom
feat/betwixt-first-release

Conversation

@dusktreader

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI lite review requested due to automatic review settings September 8, 2026 23:09
@dusktreader
dusktreader merged commit c7f3924 into main Sep 8, 2026
2 checks passed

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The new post/journal contains a broken repo link and several confirmed documentation/spelling inaccuracies that should be corrected before publishing.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR adds a new blog post announcing the first full-featured betwixt-data release (with examples and installation guidance), plus an accompanying internal hack-journal entry documenting the change.

Changes:

  • Added a long-form Markdown post introducing Betwixt and its mapping concepts, with code examples and install commands.
  • Added a .artifacts hack-journal entry describing the blog-post addition and verification steps.
File summaries
File Description
docs/source/posts/2026-09-08--introducing-betwixt-a-home-for-boundary-model-mappings.md New announcement post for Betwixt, including motivation, examples, and installation instructions.
.artifacts/20260908--blog/hack-journal.md Internal journal entry describing what was added and how it was verified.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 6
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +11 to +18
The post uses the current public API documented by Betwixt, including `field_refs`, directional mappings, expansions,
runtime context, optional adapters, partial translations, nested mappings, and the guided demo. Added a nested checkout
example and a partial product update example in response to requested coverage beyond the basic field mapping. The
account example now uses actual SQLAlchemy ORM and Pydantic declarations, including storage and wire aliases. Reoriented
the account mapping so Pydantic is consistently the left side and SQLAlchemy is the right side. Documented class-wide
direction-specific controls for disabling implicit same-name mappings, with a plain-language explanation of when to use
the directional controls. Expanded the declaration-order explanation to describe top-to-bottom execution and
last-write-wins behavior.

# Introducing Betwixt: a declarative data transformation layer

[![betwixt-logo](https://dusktreader.github.io/betwixt/static/logo.png)](https://github.com/dusktreader/betixt){target="blank", width=600}
Comment on lines +235 to +240
Mappings can also receive per-call context. This is needed for translations that needs external information that is
only available at runtime. This might include things like currency policies, feature flags, or environment variables.

In such cases, you pass a keyword `ctx` parameter to the `rightward()` or `leftward()` function. The field
translation function that needs the context _must_ receive a keyword-only argument named `ctx`. If such a paramter is
not defined on the translation function, the context will be ignored.

Betwixt intentionally leaves several problems to the libraries and application code that already own them. It does not
validate, serialize, or persist anything. Betwixt recognizes that those problems are best left to the libraries that
already do them very well. Betwixt isn't useful _at all_ on its own. It's entire purpose is to help different app

!!! tip "Sorry for the confusion!"
When I first started planning Betwixt, I thought the name was available on PyPI. I must not have been careful,
though, because another `betwixt` packae is registered there since 2020. I only noticed at publication time once
```

If you want it to work with other data types, creating a custom adapter is
[very straigtforward](https://dusktreader.github.io/betwixt/adapters/).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants