Skip to content

Commit f43344b

Browse files
refactor(package): rename distribution and module to openapi-sdk
Rename the PyPI distribution from `openapi-python-sdk` to `openapi-sdk` and the importable module from `openapi_python_sdk` to `openapi_sdk`. - pyproject.toml: project name and packages include - move openapi_python_sdk/ -> openapi_sdk/ (history preserved) - update imports in examples/ and tests/ - update README.md and docs/readme-pypi.md (PyPI badges, install commands) GitHub repository URLs and the Makefile `Project:` header are intentionally left as `openapi-python-sdk` (the canonical repo name). Publishing is currently blocked by PyPI's name-similarity filter; tracked in pypi/support#9815. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 6af48d5 commit f43344b

13 files changed

Lines changed: 38 additions & 38 deletions

README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
<h4>The perfect starting point to integrate <a href="https://openapi.com/">Openapi®</a> within your Python project</h4>
88

99
[![Build](https://github.com/openapi/openapi-python-sdk/actions/workflows/python.yml/badge.svg)](https://github.com/openapi/openapi-python-sdk/actions/workflows/python.yml)
10-
[![PyPI Version](https://img.shields.io/pypi/v/openapi-python-sdk)](https://pypi.org/project/openapi-python-sdk/)
11-
[![Python Versions](https://img.shields.io/badge/python-%3E%3D3.10-blue)](https://pypi.org/project/openapi-python-sdk/)
10+
[![PyPI Version](https://img.shields.io/pypi/v/openapi-sdk)](https://pypi.org/project/openapi-sdk/)
11+
[![Python Versions](https://img.shields.io/badge/python-%3E%3D3.10-blue)](https://pypi.org/project/openapi-sdk/)
1212
[![License](https://img.shields.io/github/license/openapi/openapi-python-sdk)](LICENSE)
13-
[![Downloads](https://img.shields.io/pypi/dm/openapi-python-sdk)](https://pypi.org/project/openapi-python-sdk/)
13+
[![Downloads](https://img.shields.io/pypi/dm/openapi-sdk)](https://pypi.org/project/openapi-sdk/)
1414
<br>
1515
[![Linux Foundation Member](https://img.shields.io/badge/Linux%20Foundation-Silver%20Member-003778?logo=linux-foundation&logoColor=white)](https://www.linuxfoundation.org/about/members)
1616
</div>
@@ -47,17 +47,17 @@ For a complete list of all available services, check out the [Openapi Marketplac
4747

4848
## Installation
4949

50-
The package is available on [PyPI](https://pypi.org/project/openapi-python-sdk/) and supports Python 3.10 and above.
50+
The package is available on [PyPI](https://pypi.org/project/openapi-sdk/) and supports Python 3.10 and above.
5151
Install it with pip:
5252

5353
```bash
54-
pip install openapi-python-sdk
54+
pip install openapi-sdk
5555
```
5656

5757
If you are using Poetry:
5858

5959
```bash
60-
poetry add openapi-python-sdk
60+
poetry add openapi-sdk
6161
```
6262

6363
No additional configuration is needed. The only runtime dependency is [`httpx`](https://www.python-httpx.org/).
@@ -71,7 +71,7 @@ Interaction with the Openapi platform happens in two distinct steps.
7171
Authenticate with your credentials and obtain a short-lived bearer token scoped to the endpoints you need.
7272

7373
```python
74-
from openapi_python_sdk import OauthClient
74+
from openapi_sdk import OauthClient
7575

7676
oauth = OauthClient(username="<your_username>", apikey="<your_apikey>", test=True)
7777

@@ -93,7 +93,7 @@ oauth.delete_token(id=token)
9393
Use the token to make authenticated requests to any Openapi service.
9494

9595
```python
96-
from openapi_python_sdk import Client
96+
from openapi_sdk import Client
9797

9898
client = Client(token=token)
9999

@@ -119,7 +119,7 @@ If you need to configure custom retry logic, proxies, or use a different HTTP cl
119119
```python
120120
from requests.adapters import HTTPAdapter
121121
from urllib3.util.retry import Retry
122-
from openapi_python_sdk import Client
122+
from openapi_sdk import Client
123123
import requests
124124

125125
retry = Retry(total=3)
@@ -139,7 +139,7 @@ By default, the SDK uses a 30-second timeout for all network requests to avoid h
139139
You can easily override it passing a `timeout` explicitly during initialization to all client variants:
140140

141141
```python
142-
from openapi_python_sdk import Client
142+
from openapi_sdk import Client
143143

144144
client = Client(token="token", timeout=60.0) # 60 seconds
145145
```
@@ -151,7 +151,7 @@ The SDK provides `AsyncClient` and `AsyncOauthClient` for use with asynchronous
151151
### Async Authentication
152152

153153
```python
154-
from openapi_python_sdk import AsyncOauthClient
154+
from openapi_sdk import AsyncOauthClient
155155

156156
async with AsyncOauthClient(username="<your_username>", apikey="<your_apikey>", test=True) as oauth:
157157
resp = await oauth.create_token(
@@ -164,7 +164,7 @@ async with AsyncOauthClient(username="<your_username>", apikey="<your_apikey>",
164164
### Async Requests
165165

166166
```python
167-
from openapi_python_sdk import AsyncClient
167+
from openapi_sdk import AsyncClient
168168

169169
async with AsyncClient(token=token) as client:
170170
resp = await client.request(

docs/readme-pypi.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# openapi-python-sdk
1+
# openapi-sdk
22

33
A minimal Python SDK for [Openapi®](https://openapi.it) — the largest certified API marketplace in Italy.
44
Provides the core HTTP primitives to authenticate and interact with any Openapi service, without API-specific coupling.
@@ -11,7 +11,7 @@ Provides the core HTTP primitives to authenticate and interact with any Openapi
1111
## Installation
1212

1313
```bash
14-
pip install openapi-python-sdk
14+
pip install openapi-sdk
1515
```
1616

1717
## Usage
@@ -21,7 +21,7 @@ Interaction with the Openapi platform happens in two distinct steps.
2121
### Step 1 — Generate a token
2222

2323
```python
24-
from openapi_python_sdk.client import OauthClient
24+
from openapi_sdk.client import OauthClient
2525

2626
oauth = OauthClient(username="<your_username>", apikey="<your_apikey>", test=True)
2727

@@ -41,7 +41,7 @@ oauth.delete_token(id=token)
4141
### Step 2 — Call an API endpoint
4242

4343
```python
44-
from openapi_python_sdk.client import Client
44+
from openapi_sdk.client import Client
4545

4646
client = Client(token=token)
4747

@@ -65,7 +65,7 @@ resp = client.request(
6565
By default, the SDK uses a 30-second timeout for all network requests. You can easily override it passing a `timeout` explicitly during initialization:
6666

6767
```python
68-
from openapi_python_sdk.client import Client
68+
from openapi_sdk.client import Client
6969

7070
client = Client(token="token", timeout=60.0) # 60 seconds
7171
```

examples/api_calls.py

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

1111
import os
1212

13-
from openapi_python_sdk.client import Client
13+
from openapi_sdk.client import Client
1414

1515
token = os.environ.get("OPENAPI_TOKEN", "<your_token>")
1616

examples/token_generation.py

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

1111
import os
1212

13-
from openapi_python_sdk.client import OauthClient
13+
from openapi_sdk.client import OauthClient
1414

1515
username = os.environ.get("OPENAPI_USERNAME", "<your_username>")
1616
apikey = os.environ.get("OPENAPI_APIKEY", "<your_apikey>")

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
[tool.poetry]
2-
name = "openapi-python-sdk"
2+
name = "openapi-sdk"
33
version = "0.3.0"
44
description = "A minimal Python SDK for the Openapi® API marketplace"
55
authors = ["Michael Cuffaro <michael@cuffaro.com>"]
66
readme = "docs/readme-pypi.md"
7-
packages = [{include = "openapi_python_sdk"}]
7+
packages = [{include = "openapi_sdk"}]
88

99
[tool.poetry.dependencies]
1010
python = "^3.10"

0 commit comments

Comments
 (0)