Skip to content

Commit 3613780

Browse files
mikeraclaude
andcommitted
Rename package to convex-sdk (PyPI distribution + import package)
- PyPI distribution: convex-api-py -> convex-sdk - Import package: convex_api -> convex_sdk (pip install convex-sdk; import convex_sdk) - GitHub repository stays convex-api-py; predecessor PyPI package frozen at 0.3.1 - Repoint publish workflow, docs and README at the new name - Exclude tests from the built wheel (find_packages exclude) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 9d8f6d9 commit 3613780

56 files changed

Lines changed: 162 additions & 160 deletions

Some content is hidden

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

.bumpversion.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ tag = True
77
search = version='{current_version}'
88
replace = version='{new_version}'
99

10-
[bumpversion:file:convex_api/__init__.py]
10+
[bumpversion:file:convex_sdk/__init__.py]
1111
search = __version__ = '{current_version}'
1212
replace = __version__ = '{new_version}'
1313

.github/PUBLISHING.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,24 @@
1-
# Publishing `convex-api-py` to PyPI
1+
# Publishing `convex-sdk` to PyPI
22

33
Releases publish via **PyPI Trusted Publishing** (OIDC) — no API token or secret is
44
stored in GitHub. The workflow (`.github/workflows/publish.yml`) is ready but **inert**
55
until a trusted publisher is configured on PyPI (one-time setup below).
66

77
## One-time setup on PyPI
88

9-
1. Sign in at <https://pypi.org> as a maintainer of the `convex-api-py` project.
9+
1. Sign in at <https://pypi.org> as a maintainer of the `convex-sdk` project.
1010
2. Go to the project → **Settings → Publishing** (or
11-
<https://pypi.org/manage/project/convex-api-py/settings/publishing/>).
11+
<https://pypi.org/manage/project/convex-sdk/settings/publishing/>).
1212
3. Under **Add a new trusted publisher → GitHub**, fill in:
1313
- **Owner:** `Convex-Dev`
1414
- **Repository:** `convex-api-py`
1515
- **Workflow name:** `publish.yml`
1616
- **Environment:** `pypi`
1717
4. Save.
1818

19-
> The package already exists on PyPI (`convex-api-py` 0.3.1), so no manual bootstrap
20-
> publish is needed — just configure the publisher above.
19+
> `convex-sdk` is a fresh PyPI project; the trusted publisher above authorises the first
20+
> tagged release to create and populate it — no manual bootstrap publish is needed. (The
21+
> predecessor package `convex-api-py` remains frozen at 0.3.1.)
2122
2223
Optionally protect the `pypi` GitHub environment
2324
(repo **Settings → Environments → pypi**) with required reviewers so a human approves
@@ -30,7 +31,7 @@ each release.
3031
```bash
3132
bumpversion patch # or: minor / major
3233
```
33-
`bumpversion` updates `setup.py` + `convex_api/__init__.py`, commits, and creates a
34+
`bumpversion` updates `setup.py` + `convex_sdk/__init__.py`, commits, and creates a
3435
`v{version}` tag (see `.bumpversion.cfg`).
3536
3. Push the tag:
3637
```bash

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
runs-on: ubuntu-latest
4040
environment:
4141
name: pypi
42-
url: https://pypi.org/project/convex-api-py/
42+
url: https://pypi.org/project/convex-sdk/
4343
permissions:
4444
id-token: write # Required for PyPI trusted publishing (OIDC)
4545
steps:

CHANGELOG.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
## Change log
22

33
### 0.3.2
4-
+ Fix malformed `__version__` string in `convex_api/__init__.py` (also restores `bumpversion` matching)
4+
+ **Renamed package to `convex-sdk`** — PyPI distribution `convex-api-py``convex-sdk` and import package `convex_api``convex_sdk` (`pip install convex-sdk`; `import convex_sdk`). The GitHub repository stays `convex-api-py`; the predecessor `convex-api-py` PyPI package remains frozen at 0.3.1.
5+
+ Fix malformed `__version__` string in `convex_sdk/__init__.py` (also restores `bumpversion` matching)
56
+ Fix `KeyPair.remove_0x_prefix` to pass `re.IGNORECASE` as `flags` (it was silently passed as `count`, so `0X` prefixes were not stripped)
67
+ Surface CVM errors returned from `transaction/prepare` as `ConvexAPIError`, consistent with submit and query
7-
+ Correct README examples (`KeyPair()` not `KeyPair.create()`, `convex` variable name, `convex_api` import path, `Account(...)` constructor, real account-info fields) and the `pip install convex-api-py` package name
8+
+ Correct README examples (`KeyPair()` not `KeyPair.create()`, `convex` variable name, `Account(...)` constructor, real account-info fields)
89
+ Add PyPI trusted-publishing release workflow (`.github/workflows/publish.yml`, fires on `v*` tags) and remove the stale commented-out publish block from the docs deploy workflow; see `.github/PUBLISHING.md`
910
+ Bump development status classifier from Pre-Alpha to Beta and declare Python 3.11–3.13 support
1011

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
IGNORE_VENV ?= FALSE
99

10-
PACKAGE_FOLDERS = convex_api tools tests
10+
PACKAGE_FOLDERS = convex_sdk tools tests
1111

1212
FLAKE8_PARAMETERS = --max-line-length=132 --statistics $(PACKAGE_FOLDERS)
1313

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
![](https://github.com/Convex-Dev/convex-api-py/workflows/testing/badge.svg)
44
[![Checked with pyright](https://microsoft.github.io/pyright/img/pyright_badge.svg)](https://microsoft.github.io/pyright/)
5-
[![PyPI version](https://badge.fury.io/py/convex-api-py.svg)](https://badge.fury.io/py/convex-api-py)
5+
[![PyPI version](https://badge.fury.io/py/convex-sdk.svg)](https://badge.fury.io/py/convex-sdk)
66

77
The official Python client library for interacting with the [Convex](https://convex.world) decentralised lattice network.
88

@@ -18,13 +18,13 @@ The official Python client library for interacting with the [Convex](https://con
1818
## Installation
1919

2020
```bash
21-
pip install convex-api-py
21+
pip install convex-sdk
2222
```
2323

2424
## Quick Example
2525

2626
```python
27-
from convex_api import Convex, KeyPair
27+
from convex_sdk import Convex, KeyPair
2828

2929
# Connect to the network
3030
convex = Convex('https://peer.convex.live')
@@ -44,7 +44,7 @@ print(f'Balance: {balance / 1_000_000_000} Convex Coins')
4444
## Resources
4545

4646
- **[Official Documentation](https://docs.convex.world/docs/tutorial/client-sdks/python)** - Complete SDK guide
47-
- **[PyPI Package](https://pypi.org/project/convex-api-py/)** - Python Package Index
47+
- **[PyPI Package](https://pypi.org/project/convex-sdk/)** - Python Package Index
4848
- **[Convex Network](https://convex.world)** - Main website
4949
- **[Discord Community](https://discord.com/invite/xfYGq4CT7v)** - Get help and share ideas
5050

@@ -119,13 +119,13 @@ deactivate
119119
120120
### Quick Start
121121
122-
First you need to download the Convex-API-py package from the python package index PyPi.
122+
First you need to download the convex-sdk package from the python package index PyPi.
123123
124-
pip install convex-api-py
124+
pip install convex-sdk
125125
126126
You can now access the convex network, and get a balance from an existing account on the network by doing the following:
127127
128-
>>> from convex_api import Convex, KeyPair
128+
>>> from convex_sdk import Convex, KeyPair
129129
>>> convex = Convex('https://peer.convex.live')
130130
>>> convex.get_balance(9)
131131
99396961137042
@@ -155,7 +155,7 @@ You can export the accounts private key encoded as PKCS8 encrypt the key with a
155155
156156
To re-use your account again you need to import the encrypted private key and set the correct account address
157157
158-
>>> from convex_api import Account, KeyPair
158+
>>> from convex_sdk import Account, KeyPair
159159
>>> key_pair = KeyPair.import_from_file('my_key.dat', 'secret')
160160
>>> account = Account(key_pair, 809)
161161

convex_api/__init__.py

Lines changed: 0 additions & 12 deletions
This file was deleted.

convex_sdk/__init__.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
"""
2+
3+
Convex API Python Library
4+
5+
"""
6+
7+
from convex_sdk.account import Account # type: ignore # noqa: F401
8+
from convex_sdk.convex import Convex # type: ignore # noqa: F401
9+
from convex_sdk.contract import Contract # type: ignore # noqa: F401
10+
from convex_sdk.key_pair import KeyPair # type: ignore # noqa: F401
11+
12+
__version__ = '0.3.2'
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from __future__ import annotations
88

99
import re
10-
from convex_api.key_pair import KeyPair
10+
from convex_sdk.key_pair import KeyPair
1111

1212

1313
class Account:
@@ -61,7 +61,7 @@ def __init__(self, key_pair: KeyPair, address: Account | int | str, name: str |
6161
.. code-block:: python
6262
6363
>>> # import convex-api
64-
>>> from convex_api import Convex, KeyPair, Account
64+
>>> from convex_sdk import Convex, KeyPair, Account
6565
6666
>>> # setup the network connection
6767
>>> convex = Convex('https://convex.world')
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
from typing import TYPE_CHECKING
1010

1111
if TYPE_CHECKING:
12-
from convex_api.convex import Convex
12+
from convex_sdk.convex import Convex
1313

1414
import re
1515

16-
from convex_api.account import Account
16+
from convex_sdk.account import Account
1717

1818

1919
class Contract:

0 commit comments

Comments
 (0)