Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.9.0"
".": "0.10.0"
}
6 changes: 3 additions & 3 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/fragment-foundries-inc-dash%2Ffragment-0b499e34e128eee284c8b3d28d431f0521e747a9d573571b57b59c2dca2aac6e.yml
openapi_spec_hash: c50d64859d14067d66dc02c0da86184c
config_hash: 452389671401acf58c5429a09ae573db
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/fragment-foundries-inc-dash%2Ffragment-8472a9bd15eaa5b8aa9c12513d02b06ae385d06dd48e94a23f121678981de98a.yml
openapi_spec_hash: 4c42faa5ab6443bab546568adc330b7a
config_hash: 8e4b2d3ac55a0b2cdecfba99a1925e6f
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,28 @@
# Changelog

## 0.10.0 (2026-04-13)

Full Changelog: [v0.9.0...v0.10.0](https://github.com/fragment-dev/fragment-py/compare/v0.9.0...v0.10.0)

### Features

* **api:** update SDK from prod (511af1bcd4001be60c589fed1d05a5814e416679) ([e2ce984](https://github.com/fragment-dev/fragment-py/commit/e2ce984d3cadaf39400d35ae5d35d464027dca54))
* **api:** update SDK from prod (523b1fdd6cc6b5732ccdad5095c21f69fe1f7489) ([ea85617](https://github.com/fragment-dev/fragment-py/commit/ea85617c004e54e4a27abf4c8a5e585d17256d7c))
* **api:** update SDK from prod (5cede0854eb141955854b7a9d3eb0e07a9588e3c) ([67481e4](https://github.com/fragment-dev/fragment-py/commit/67481e45971c9e704986c425b42b4a9938b45746))
* **api:** update SDK from prod (729db28098a20ebc22e879a2cd1c6ad860f9ce4c) ([1d1b5d0](https://github.com/fragment-dev/fragment-py/commit/1d1b5d0b74975f2505475ca8167176680eff0655))
* **api:** update SDK from prod (8051461980fb65468797d0b82dfa42dee9014004) ([25512da](https://github.com/fragment-dev/fragment-py/commit/25512da8089db4f3be50174a77373390fa29c52c))
* **api:** update SDK from prod (a5eb093078fe5947a299bccafd30a0c7f2e90790) ([fc27b30](https://github.com/fragment-dev/fragment-py/commit/fc27b304c5dae27cb485853ad80c55b3c1392df0))
* **api:** update SDK from prod (b3080493fb6bb118abdd03644b9ef6f59d417a3c) ([cd9337f](https://github.com/fragment-dev/fragment-py/commit/cd9337fbe43c0c5e6ed9ec1ef4c6db5bbf270403))
* **api:** update SDK from prod (b8f6f1940acd3d10fc17aaeb59cd75281f3c6436) ([dca29fc](https://github.com/fragment-dev/fragment-py/commit/dca29fcd235fe6c110efcdf9042fe012d06ce17e))
* **api:** update SDK from prod (d8f41b559592a1a8c68c0c40fdb773aa6e53795e) ([9bd565e](https://github.com/fragment-dev/fragment-py/commit/9bd565e3cee12d961291d7b4641195045097f7c9))
* **api:** update SDK from prod (e1ebb9e4d62034855202a8ff99690880c072d953) ([4de3417](https://github.com/fragment-dev/fragment-py/commit/4de3417d2e14d337dc6bbd9f809c4bc6f624015b))


### Bug Fixes

* **client:** preserve hardcoded query params when merging with user params ([dd8e3f1](https://github.com/fragment-dev/fragment-py/commit/dd8e3f1966650b7cb4043f377c4fcf9b30e188ba))
* ensure file data are only sent as 1 parameter ([b244d50](https://github.com/fragment-dev/fragment-py/commit/b244d5004f5f7fb0ba13745581e47e4bb84a67e4))

## 0.9.0 (2026-03-27)

Full Changelog: [v0.8.0...v0.9.0](https://github.com/fragment-dev/fragment-py/compare/v0.8.0...v0.9.0)
Expand Down
4 changes: 2 additions & 2 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ from fragment.types import (
Transaction,
TransactionCreateResponse,
TransactionRetrieveResponse,
TransactionUpdateResponse,
TransactionListResponse,
TransactionCreateAllocationsResponse,
TransactionListHistoryResponse,
TransactionSearchResponse,
TransactionSearchAllocationsResponse,
Expand All @@ -93,8 +93,8 @@ Methods:

- <code title="post /transactions">client.transactions.<a href="./src/fragment/resources/transactions.py">create</a>(\*\*<a href="src/fragment/types/transaction_create_params.py">params</a>) -> <a href="./src/fragment/types/transaction_create_response.py">TransactionCreateResponse</a></code>
- <code title="get /transactions/{transaction_ref}">client.transactions.<a href="./src/fragment/resources/transactions.py">retrieve</a>(transaction_ref) -> <a href="./src/fragment/types/transaction_retrieve_response.py">TransactionRetrieveResponse</a></code>
- <code title="patch /transactions/{transaction_ref}">client.transactions.<a href="./src/fragment/resources/transactions.py">update</a>(transaction_ref, \*\*<a href="src/fragment/types/transaction_update_params.py">params</a>) -> <a href="./src/fragment/types/transaction_update_response.py">TransactionUpdateResponse</a></code>
- <code title="get /transactions">client.transactions.<a href="./src/fragment/resources/transactions.py">list</a>(\*\*<a href="src/fragment/types/transaction_list_params.py">params</a>) -> <a href="./src/fragment/types/transaction_list_response.py">TransactionListResponse</a></code>
- <code title="post /transactions/{transaction_ref}/allocations">client.transactions.<a href="./src/fragment/resources/transactions.py">create_allocations</a>(transaction_ref, \*\*<a href="src/fragment/types/transaction_create_allocations_params.py">params</a>) -> <a href="./src/fragment/types/transaction_create_allocations_response.py">TransactionCreateAllocationsResponse</a></code>
- <code title="get /transactions/{transaction_ref}/history">client.transactions.<a href="./src/fragment/resources/transactions.py">list_history</a>(transaction_ref) -> <a href="./src/fragment/types/transaction_list_history_response.py">TransactionListHistoryResponse</a></code>
- <code title="post /transactions/search">client.transactions.<a href="./src/fragment/resources/transactions.py">search</a>(\*\*<a href="src/fragment/types/transaction_search_params.py">params</a>) -> <a href="./src/fragment/types/transaction_search_response.py">TransactionSearchResponse</a></code>
- <code title="post /transactions/allocations/search">client.transactions.<a href="./src/fragment/resources/transactions.py">search_allocations</a>(\*\*<a href="src/fragment/types/transaction_search_allocations_params.py">params</a>) -> <a href="./src/fragment/types/transaction_search_allocations_response.py">TransactionSearchAllocationsResponse</a></code>
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "fragment-py"
version = "0.9.0"
version = "0.10.0"
description = "The official Python library for the fragment API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
4 changes: 4 additions & 0 deletions src/fragment/_base_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,10 @@ def _build_request(
files = cast(HttpxRequestFiles, ForceMultipartDict())

prepared_url = self._prepare_url(options.url)
# preserve hard-coded query params from the url
if params and prepared_url.query:
params = {**dict(prepared_url.params.items()), **params}
prepared_url = prepared_url.copy_with(raw_path=prepared_url.raw_path.split(b"?", 1)[0])
if "_" in prepared_url.host:
# work around https://github.com/encode/httpx/discussions/2880
kwargs["extensions"] = {"sni_hostname": prepared_url.host.replace("_", "-")}
Expand Down
12 changes: 12 additions & 0 deletions src/fragment/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ def __init__(

@cached_property
def external_accounts(self) -> ExternalAccountsResource:
"""External account management operations"""
from .resources.external_accounts import ExternalAccountsResource

return ExternalAccountsResource(self)
Expand Down Expand Up @@ -147,6 +148,7 @@ def transactions(self) -> TransactionsResource:

@cached_property
def users(self) -> UsersResource:
"""User management operations"""
from .resources.users import UsersResource

return UsersResource(self)
Expand Down Expand Up @@ -342,6 +344,7 @@ def __init__(

@cached_property
def external_accounts(self) -> AsyncExternalAccountsResource:
"""External account management operations"""
from .resources.external_accounts import AsyncExternalAccountsResource

return AsyncExternalAccountsResource(self)
Expand Down Expand Up @@ -376,6 +379,7 @@ def transactions(self) -> AsyncTransactionsResource:

@cached_property
def users(self) -> AsyncUsersResource:
"""User management operations"""
from .resources.users import AsyncUsersResource

return AsyncUsersResource(self)
Expand Down Expand Up @@ -518,6 +522,7 @@ def __init__(self, client: Fragment) -> None:

@cached_property
def external_accounts(self) -> external_accounts.ExternalAccountsResourceWithRawResponse:
"""External account management operations"""
from .resources.external_accounts import ExternalAccountsResourceWithRawResponse

return ExternalAccountsResourceWithRawResponse(self._client.external_accounts)
Expand Down Expand Up @@ -552,6 +557,7 @@ def transactions(self) -> transactions.TransactionsResourceWithRawResponse:

@cached_property
def users(self) -> users.UsersResourceWithRawResponse:
"""User management operations"""
from .resources.users import UsersResourceWithRawResponse

return UsersResourceWithRawResponse(self._client.users)
Expand All @@ -565,6 +571,7 @@ def __init__(self, client: AsyncFragment) -> None:

@cached_property
def external_accounts(self) -> external_accounts.AsyncExternalAccountsResourceWithRawResponse:
"""External account management operations"""
from .resources.external_accounts import AsyncExternalAccountsResourceWithRawResponse

return AsyncExternalAccountsResourceWithRawResponse(self._client.external_accounts)
Expand Down Expand Up @@ -599,6 +606,7 @@ def transactions(self) -> transactions.AsyncTransactionsResourceWithRawResponse:

@cached_property
def users(self) -> users.AsyncUsersResourceWithRawResponse:
"""User management operations"""
from .resources.users import AsyncUsersResourceWithRawResponse

return AsyncUsersResourceWithRawResponse(self._client.users)
Expand All @@ -612,6 +620,7 @@ def __init__(self, client: Fragment) -> None:

@cached_property
def external_accounts(self) -> external_accounts.ExternalAccountsResourceWithStreamingResponse:
"""External account management operations"""
from .resources.external_accounts import ExternalAccountsResourceWithStreamingResponse

return ExternalAccountsResourceWithStreamingResponse(self._client.external_accounts)
Expand Down Expand Up @@ -646,6 +655,7 @@ def transactions(self) -> transactions.TransactionsResourceWithStreamingResponse

@cached_property
def users(self) -> users.UsersResourceWithStreamingResponse:
"""User management operations"""
from .resources.users import UsersResourceWithStreamingResponse

return UsersResourceWithStreamingResponse(self._client.users)
Expand All @@ -659,6 +669,7 @@ def __init__(self, client: AsyncFragment) -> None:

@cached_property
def external_accounts(self) -> external_accounts.AsyncExternalAccountsResourceWithStreamingResponse:
"""External account management operations"""
from .resources.external_accounts import AsyncExternalAccountsResourceWithStreamingResponse

return AsyncExternalAccountsResourceWithStreamingResponse(self._client.external_accounts)
Expand Down Expand Up @@ -693,6 +704,7 @@ def transactions(self) -> transactions.AsyncTransactionsResourceWithStreamingRes

@cached_property
def users(self) -> users.AsyncUsersResourceWithStreamingResponse:
"""User management operations"""
from .resources.users import AsyncUsersResourceWithStreamingResponse

return AsyncUsersResourceWithStreamingResponse(self._client.users)
Expand Down
5 changes: 3 additions & 2 deletions src/fragment/_utils/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,9 @@ def _extract_items(
index += 1
if is_dict(obj):
try:
# We are at the last entry in the path so we must remove the field
if (len(path)) == index:
# Remove the field if there are no more dict keys in the path,
# only "<array>" traversal markers or end.
if all(p == "<array>" for p in path[index:]):
item = obj.pop(key)
else:
item = obj[key]
Expand Down
2 changes: 1 addition & 1 deletion src/fragment/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "fragment"
__version__ = "0.9.0" # x-release-please-version
__version__ = "0.10.0" # x-release-please-version
20 changes: 12 additions & 8 deletions src/fragment/resources/external_accounts.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@


class ExternalAccountsResource(SyncAPIResource):
"""External account management operations"""

@cached_property
def with_raw_response(self) -> ExternalAccountsResourceWithRawResponse:
"""
Expand Down Expand Up @@ -55,12 +57,12 @@ def create(
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> ExternalAccountCreateResponse:
"""
Creates a new external account
Creates an external account.

Args:
external_id: External ID for the account (user-provided, unique, mutable)
external_id: User-provided unique ID.

name: Human-readable name for the external account (mutable)
name: Name of the account.

extra_headers: Send extra headers

Expand Down Expand Up @@ -95,7 +97,7 @@ def list(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> ExternalAccountListResponse:
"""Lists all external accounts for the workspace"""
"""Lists all external accounts."""
return self._get(
"/external-accounts",
options=make_request_options(
Expand All @@ -106,6 +108,8 @@ def list(


class AsyncExternalAccountsResource(AsyncAPIResource):
"""External account management operations"""

@cached_property
def with_raw_response(self) -> AsyncExternalAccountsResourceWithRawResponse:
"""
Expand Down Expand Up @@ -138,12 +142,12 @@ async def create(
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> ExternalAccountCreateResponse:
"""
Creates a new external account
Creates an external account.

Args:
external_id: External ID for the account (user-provided, unique, mutable)
external_id: User-provided unique ID.

name: Human-readable name for the external account (mutable)
name: Name of the account.

extra_headers: Send extra headers

Expand Down Expand Up @@ -178,7 +182,7 @@ async def list(
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> ExternalAccountListResponse:
"""Lists all external accounts for the workspace"""
"""Lists all external accounts."""
return await self._get(
"/external-accounts",
options=make_request_options(
Expand Down
Loading
Loading