Skip to content

Commit f619b40

Browse files
ElliotFriendclaude
andauthored
chore(sdk-examples): update examples and description for python SDK v14.1.0 (#2499)
* chore(sdk-examples): fix broken Python SDK imports Two stellar_sdk (py-stellar-base, current 14.1.0) imports reference names that do not exist and raise ImportError at runtime: - working-with-contract-specs.mdx: `from stellar_sdk import ... stellar_xdr` — there is no top-level `stellar_xdr` export. The code uses `stellar_xdr.SCVal.from_xdr(...)`, so import the `xdr` submodule under that alias (`xdr as stellar_xdr`), matching the pattern used in the sibling invoke-contract-tx-sdk guide. - data-format/xdr.mdx: `import xdr from stellar_sdk;` is JS-style syntax; corrected to `from stellar_sdk import xdr`. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * chore(sdk-examples): correct py-stellar-base minimum Python version py-stellar-base now requires Python >=3.10,<4.0 (pyproject.toml `requires-python`), but the client-sdks page still stated "Python 3.7+ as well as PyPy 3.7+". Update to 3.10+ to match the current release. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent bb2f393 commit f619b40

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

docs/build/guides/dapps/working-with-contract-specs.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1240,7 +1240,7 @@ env.events()
12401240
```
12411241

12421242
```python
1243-
from stellar_sdk import SorobanServer, scval, stellar_xdr
1243+
from stellar_sdk import SorobanServer, scval, xdr as stellar_xdr
12441244
from stellar_sdk.exceptions import NotFoundError, BadResponseError
12451245
from stellar_sdk.soroban_server import EventFilter, EventFilterType
12461246

docs/learn/fundamentals/data-format/xdr.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ You can see the full set of options to construct a `Uint64` in the definition fo
6363
Other languages, such as Python (see `stellar-sdk`'s [uint64.html](https://stellar-sdk.readthedocs.io/en/stable/_modules/stellar_sdk/xdr/uint64.html) documentation), support arbitrarily-sized integers by default, so there are no such variations:
6464

6565
```python
66-
import xdr from stellar_sdk;
66+
from stellar_sdk import xdr
6767

6868
u64 = xdr.Uint64(1_000_000_000_000_000)
6969
```

docs/tools/sdks/client-sdks.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ It provides:
3838

3939
**The Python SDK is maintained by dedicated community developers.**
4040

41-
`py-stellar-base` is a Python library for communicating with a Stellar Horizon server. It is used for building Stellar apps on Python. It supports Python 3.7+ as well as PyPy 3.7+.
41+
`py-stellar-base` is a Python library for communicating with a Stellar Horizon server. It is used for building Stellar apps on Python. It supports Python 3.10+ as well as PyPy 3.10+.
4242

4343
This SDK is maintained by a dedicated community developer.
4444

0 commit comments

Comments
 (0)