From 6bc98d369efea52f51fea535fa1f1fe87a5ad1ff Mon Sep 17 00:00:00 2001 From: vigneshwerv Date: Wed, 12 Aug 2026 15:12:40 +0000 Subject: [PATCH 1/6] Update Python SDK queries --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 8c2547a..1b10f23 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ target_package_name = "fragment_graphql_client" [tool.poetry] name = "fragment-python" -version = "1.0.0" +version = "1.1.0" description = "Python SDK for https://fragment.dev/" authors = ["Fragment Foundries Inc"] license = "Apache 2.0" From e87da141f861b4a29d475af7974e689a2db8e8ec Mon Sep 17 00:00:00 2001 From: Vigneshwer Vaidyanathan Date: Wed, 12 Aug 2026 11:14:53 -0400 Subject: [PATCH 2/6] Document batch Ledger Entry posting and finalize 1.1.0 changelog --- CHANGELOG.md | 2 +- README.md | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3c07a3a..8433d60 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/). Releases prior to `1.0.0` were published before this changelog was added and are not documented here. -## [Unreleased] +## [1.1.0] ### Added diff --git a/README.md b/README.md index 130c621..6b0a856 100644 --- a/README.md +++ b/README.md @@ -83,6 +83,33 @@ await graphql_client.add_ledger_entry( ) ``` +### Post a batch of Ledger Entries + +To [post](https://fragment.dev/docs#post-ledger-entries-post-to-the-api) a batch of Ledger Entries in one atomic, strongly-consistent transaction: + +```python +from fragment.sdk.typed_entries import UserFundsAccountV1 + +await graphql_client.add_ledger_entries( + entries=[ + UserFundsAccountV1( + ik="some-ik-1", + ledger_ik="your-ledger-ik", + posted="1968-01-01T16:45:00Z", + user_id="user-1", + funding_amount="20000", + ), + UserFundsAccountV1( + ik="some-ik-2", + ledger_ik="your-ledger-ik", + posted="1968-01-01T16:45:00Z", + user_id="user-2", + funding_amount="20000", + ), + ] +) +``` + ### Read a Ledger Account's Balance To read a Ledger Account's [balance](https://fragment.dev/docs#read-balances-latest): From 021b99a22a8d025ffb8fd416cd51309536f74b41 Mon Sep 17 00:00:00 2001 From: Vigneshwer Vaidyanathan Date: Wed, 12 Aug 2026 11:19:31 -0400 Subject: [PATCH 3/6] Simplify batch posting language to 'atomically' --- CHANGELOG.md | 3 +-- README.md | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8433d60..46d7b0d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,8 +12,7 @@ are not documented here. ### Added -- `AddLedgerEntries` commits a batch of Ledger Entries in one atomic, - strongly-consistent transaction. +- `AddLedgerEntries` posts a batch of Ledger Entries atomically. - Strongly-typed batch payloads. Codegen now emits a `typed_entries` module with one model per Ledger Entry type, derived from the per-entry-type `addLedgerEntry` operations in the codegen input directory. Because a batch diff --git a/README.md b/README.md index 6b0a856..92c36b1 100644 --- a/README.md +++ b/README.md @@ -85,7 +85,7 @@ await graphql_client.add_ledger_entry( ### Post a batch of Ledger Entries -To [post](https://fragment.dev/docs#post-ledger-entries-post-to-the-api) a batch of Ledger Entries in one atomic, strongly-consistent transaction: +To [post](https://fragment.dev/guides/post-ledger-entries#batch-ledger-entries) a batch of Ledger Entries atomically: ```python from fragment.sdk.typed_entries import UserFundsAccountV1 From 40e75a3dc18f6a46057f4e893ae6905443a4439c Mon Sep 17 00:00:00 2001 From: Vigneshwer Vaidyanathan Date: Wed, 12 Aug 2026 11:27:51 -0400 Subject: [PATCH 4/6] Point batch example at the generated typed_entries models --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 92c36b1..adb7c66 100644 --- a/README.md +++ b/README.md @@ -85,7 +85,7 @@ await graphql_client.add_ledger_entry( ### Post a batch of Ledger Entries -To [post](https://fragment.dev/guides/post-ledger-entries#batch-ledger-entries) a batch of Ledger Entries atomically: +To [post](https://fragment.dev/guides/post-ledger-entries#batch-ledger-entries) a batch of Ledger Entries atomically, construct them using the strongly-typed models generated for your Schema in `fragment.sdk.typed_entries`: ```python from fragment.sdk.typed_entries import UserFundsAccountV1 From cd9b929be5b89380cfb60bb6e11de5dc3c1902a9 Mon Sep 17 00:00:00 2001 From: Vigneshwer Vaidyanathan Date: Wed, 12 Aug 2026 11:29:51 -0400 Subject: [PATCH 5/6] Move typed_entries note below the batch example --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index adb7c66..1d94de2 100644 --- a/README.md +++ b/README.md @@ -85,7 +85,7 @@ await graphql_client.add_ledger_entry( ### Post a batch of Ledger Entries -To [post](https://fragment.dev/guides/post-ledger-entries#batch-ledger-entries) a batch of Ledger Entries atomically, construct them using the strongly-typed models generated for your Schema in `fragment.sdk.typed_entries`: +To [post](https://fragment.dev/guides/post-ledger-entries#batch-ledger-entries) a batch of Ledger Entries atomically: ```python from fragment.sdk.typed_entries import UserFundsAccountV1 @@ -110,6 +110,8 @@ await graphql_client.add_ledger_entries( ) ``` +Construct the entries in the batch using the strongly-typed models for your Schema in the `typed_entries` module of your generated client. + ### Read a Ledger Account's Balance To read a Ledger Account's [balance](https://fragment.dev/docs#read-balances-latest): From 5258829b32c88c8396587140aaa600271c930755 Mon Sep 17 00:00:00 2001 From: Vigneshwer Vaidyanathan Date: Wed, 12 Aug 2026 11:38:18 -0400 Subject: [PATCH 6/6] Update docs links to the new guides URL format --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1d94de2..c9abd71 100644 --- a/README.md +++ b/README.md @@ -68,7 +68,7 @@ print(get_schema_result.schema_.json()) ### Post a Ledger Entry -To [post](https://fragment.dev/docs#post-ledger-entries-post-to-the-api) a Ledger Entry defined in your Schema: +To [post](https://fragment.dev/guides/post-ledger-entries#post-to-the-api) a Ledger Entry defined in your Schema: ```python await graphql_client.add_ledger_entry( @@ -114,7 +114,7 @@ Construct the entries in the batch using the strongly-typed models for your Sche ### Read a Ledger Account's Balance -To read a Ledger Account's [balance](https://fragment.dev/docs#read-balances-latest): +To read a Ledger Account's [balance](https://fragment.dev/guides/read-balances#latest): ```python from fragment.sdk.enums import CurrencyCode