Skip to content

Commit a3c34c9

Browse files
authored
Merge pull request #1 from runloopai/release-please--branches--main--changes--next
release: 0.1.0-alpha.1
2 parents 17991ec + a38e3e3 commit a3c34c9

93 files changed

Lines changed: 336 additions & 145 deletions

File tree

Some content is hidden

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

.github/workflows/publish-pypi.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# This workflow is triggered when a GitHub release is created.
2+
# It can also be run manually to re-publish to PyPI in case it failed for some reason.
3+
# You can run this workflow by navigating to https://www.github.com/runloopai/api-client-python/actions/workflows/publish-pypi.yml
4+
name: Publish PyPI
5+
on:
6+
workflow_dispatch:
7+
8+
release:
9+
types: [published]
10+
11+
jobs:
12+
publish:
13+
name: publish
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
19+
- name: Install Rye
20+
run: |
21+
curl -sSf https://rye.astral.sh/get | bash
22+
echo "$HOME/.rye/shims" >> $GITHUB_PATH
23+
env:
24+
RYE_VERSION: 0.24.0
25+
RYE_INSTALL_OPTION: "--yes"
26+
27+
- name: Publish to PyPI
28+
run: |
29+
bash ./bin/publish-pypi
30+
env:
31+
PYPI_TOKEN: ${{ secrets.RUNLOOP_PYPI_TOKEN || secrets.PYPI_TOKEN }}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Release Doctor
2+
on:
3+
pull_request:
4+
workflow_dispatch:
5+
6+
jobs:
7+
release_doctor:
8+
name: release doctor
9+
runs-on: ubuntu-latest
10+
if: github.repository == 'runloopai/api-client-python' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next')
11+
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- name: Check release environment
16+
run: |
17+
bash ./bin/check-release-environment
18+
env:
19+
PYPI_TOKEN: ${{ secrets.RUNLOOP_PYPI_TOKEN || secrets.PYPI_TOKEN }}

.release-please-manifest.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
".": "0.1.0-alpha.1"
3+
}

CHANGELOG.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Changelog
2+
3+
## 0.1.0-alpha.1 (2024-06-25)
4+
5+
Full Changelog: [v0.0.1-alpha.0...v0.1.0-alpha.1](https://github.com/runloopai/api-client-python/compare/v0.0.1-alpha.0...v0.1.0-alpha.1)
6+
7+
### Features
8+
9+
* **api:** OpenAPI spec update via Stainless API ([17991ec](https://github.com/runloopai/api-client-python/commit/17991ec2bd449f7ffef39a9da4b274f82c61c364))
10+
* **api:** OpenAPI spec update via Stainless API ([a624924](https://github.com/runloopai/api-client-python/commit/a62492427ea762b1fa8e6e438ba489ff08b798e5))
11+
* **api:** OpenAPI spec update via Stainless API ([#4](https://github.com/runloopai/api-client-python/issues/4)) ([134f28f](https://github.com/runloopai/api-client-python/commit/134f28ff63f25f18d3a4b7e2300b768ffa4c7590))
12+
* **api:** update via SDK Studio ([88939b3](https://github.com/runloopai/api-client-python/commit/88939b3e46af521bc43a7b25e66ddb5a553a2af6))
13+
* **api:** update via SDK Studio ([e2cca37](https://github.com/runloopai/api-client-python/commit/e2cca3796d1a2b128abb6f93b8e444f0dd4da501))
14+
15+
16+
### Chores
17+
18+
* go live ([#2](https://github.com/runloopai/api-client-python/issues/2)) ([3ae4996](https://github.com/runloopai/api-client-python/commit/3ae4996b2474aabb19a98cf38b834ca3e91d7c2b))
19+
* go live ([#5](https://github.com/runloopai/api-client-python/issues/5)) ([626be20](https://github.com/runloopai/api-client-python/commit/626be201c2ed40ac34f2b5869f6c17c431ee543b))
20+
* update SDK settings ([ac8358a](https://github.com/runloopai/api-client-python/commit/ac8358ae8d3ac7ba5bab2082384ae5029c50fcc8))
21+
* update SDK settings ([#3](https://github.com/runloopai/api-client-python/issues/3)) ([ef88178](https://github.com/runloopai/api-client-python/commit/ef88178299ae3988bc3d1e813c462d609312f69a))
22+
* update SDK settings ([#6](https://github.com/runloopai/api-client-python/issues/6)) ([82a6f56](https://github.com/runloopai/api-client-python/commit/82a6f56061cd0ebfa88ed3ec71d044a0fb131f0a))
23+
* update SDK settings ([#7](https://github.com/runloopai/api-client-python/issues/7)) ([aa9d69b](https://github.com/runloopai/api-client-python/commit/aa9d69b15a011dfa8381ec08327c88e5c2a1ab8d))

CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ $ pip install -r requirements-dev.lock
3232
## Modifying/Adding code
3333

3434
Most of the SDK is generated code, and any modified code will be overridden on the next generation. The
35-
`src/runloop/lib/` and `examples/` directories are exceptions and will never be overridden.
35+
`src/runloop_minus_api_minus_client/lib/` and `examples/` directories are exceptions and will never be overridden.
3636

3737
## Adding and running examples
3838

@@ -59,7 +59,7 @@ If you’d like to use the repository from source, you can either install from g
5959
To install via git:
6060

6161
```bash
62-
pip install git+ssh://git@github.com/stainless-sdks/runloop-python.git
62+
pip install git+ssh://git@github.com/runloopai/api-client-python.git
6363
```
6464

6565
Alternatively, you can build from source and install the wheel file:
@@ -117,7 +117,7 @@ the changes aren't made through the automated pipeline, you may want to make rel
117117

118118
### Publish with a GitHub workflow
119119

120-
You can release to package managers by using [the `Publish PyPI` GitHub action](https://www.github.com/stainless-sdks/runloop-python/actions/workflows/publish-pypi.yml). This requires a setup organization or repository secret to be set up.
120+
You can release to package managers by using [the `Publish PyPI` GitHub action](https://www.github.com/runloopai/api-client-python/actions/workflows/publish-pypi.yml). This requires a setup organization or repository secret to be set up.
121121

122122
### Publish manually
123123

README.md

Lines changed: 20 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Runloop Python API library
22

3-
[![PyPI version](https://img.shields.io/pypi/v/runloop.svg)](https://pypi.org/project/runloop/)
3+
[![PyPI version](https://img.shields.io/pypi/v/runloop-api-client.svg)](https://pypi.org/project/runloop-api-client/)
44

55
The Runloop Python library provides convenient access to the Runloop REST API from any Python 3.7+
66
application. The library includes type definitions for all request params and response fields,
@@ -15,20 +15,17 @@ The REST API documentation can be found [on runloop.ai](https://runloop.ai). The
1515
## Installation
1616

1717
```sh
18-
# install from this staging repo
19-
pip install git+ssh://git@github.com/stainless-sdks/runloop-python.git
18+
# install from PyPI
19+
pip install --pre runloop-api-client
2020
```
2121

22-
> [!NOTE]
23-
> Once this package is [published to PyPI](https://app.stainlessapi.com/docs/guides/publish), this will become: `pip install --pre runloop`
24-
2522
## Usage
2623

2724
The full API of this library can be found in [api.md](api.md).
2825

2926
```python
3027
import os
31-
from runloop import Runloop
28+
from runloop_minus_api_minus_client import Runloop
3229

3330
client = Runloop(
3431
# This is the default and can be omitted
@@ -51,7 +48,7 @@ Simply import `AsyncRunloop` instead of `Runloop` and use `await` with each API
5148
```python
5249
import os
5350
import asyncio
54-
from runloop import AsyncRunloop
51+
from runloop_minus_api_minus_client import AsyncRunloop
5552

5653
client = AsyncRunloop(
5754
# This is the default and can be omitted
@@ -80,27 +77,27 @@ Typed requests and responses provide autocomplete and documentation within your
8077

8178
## Handling errors
8279

83-
When the library is unable to connect to the API (for example, due to network connection problems or a timeout), a subclass of `runloop.APIConnectionError` is raised.
80+
When the library is unable to connect to the API (for example, due to network connection problems or a timeout), a subclass of `runloop_minus_api_minus_client.APIConnectionError` is raised.
8481

8582
When the API returns a non-success status code (that is, 4xx or 5xx
86-
response), a subclass of `runloop.APIStatusError` is raised, containing `status_code` and `response` properties.
83+
response), a subclass of `runloop_minus_api_minus_client.APIStatusError` is raised, containing `status_code` and `response` properties.
8784

88-
All errors inherit from `runloop.APIError`.
85+
All errors inherit from `runloop_minus_api_minus_client.APIError`.
8986

9087
```python
91-
import runloop
92-
from runloop import Runloop
88+
import runloop_minus_api_minus_client
89+
from runloop_minus_api_minus_client import Runloop
9390

9491
client = Runloop()
9592

9693
try:
9794
client.devboxes.create()
98-
except runloop.APIConnectionError as e:
95+
except runloop_minus_api_minus_client.APIConnectionError as e:
9996
print("The server could not be reached")
10097
print(e.__cause__) # an underlying Exception, likely raised within httpx.
101-
except runloop.RateLimitError as e:
98+
except runloop_minus_api_minus_client.RateLimitError as e:
10299
print("A 429 status code was received; we should back off a bit.")
103-
except runloop.APIStatusError as e:
100+
except runloop_minus_api_minus_client.APIStatusError as e:
104101
print("Another non-200-range status code was received")
105102
print(e.status_code)
106103
print(e.response)
@@ -128,7 +125,7 @@ Connection errors (for example, due to a network connectivity problem), 408 Requ
128125
You can use the `max_retries` option to configure or disable retry settings:
129126

130127
```python
131-
from runloop import Runloop
128+
from runloop_minus_api_minus_client import Runloop
132129

133130
# Configure the default for all requests:
134131
client = Runloop(
@@ -146,7 +143,7 @@ By default requests time out after 1 minute. You can configure this with a `time
146143
which accepts a float or an [`httpx.Timeout`](https://www.python-httpx.org/advanced/#fine-tuning-the-configuration) object:
147144

148145
```python
149-
from runloop import Runloop
146+
from runloop_minus_api_minus_client import Runloop
150147

151148
# Configure the default for all requests:
152149
client = Runloop(
@@ -196,7 +193,7 @@ if response.my_field is None:
196193
The "raw" Response object can be accessed by prefixing `.with_raw_response.` to any HTTP method call, e.g.,
197194

198195
```py
199-
from runloop import Runloop
196+
from runloop_minus_api_minus_client import Runloop
200197

201198
client = Runloop()
202199
response = client.devboxes.with_raw_response.create()
@@ -206,9 +203,9 @@ devbox = response.parse() # get the object that `devboxes.create()` would have
206203
print(devbox.id)
207204
```
208205

209-
These methods return an [`APIResponse`](https://github.com/stainless-sdks/runloop-python/tree/main/src/runloop/_response.py) object.
206+
These methods return an [`APIResponse`](https://github.com/runloopai/api-client-python/tree/main/src/runloop_minus_api_minus_client/_response.py) object.
210207

211-
The async client returns an [`AsyncAPIResponse`](https://github.com/stainless-sdks/runloop-python/tree/main/src/runloop/_response.py) with the same structure, the only difference being `await`able methods for reading the response content.
208+
The async client returns an [`AsyncAPIResponse`](https://github.com/runloopai/api-client-python/tree/main/src/runloop_minus_api_minus_client/_response.py) with the same structure, the only difference being `await`able methods for reading the response content.
212209

213210
#### `.with_streaming_response`
214211

@@ -270,7 +267,7 @@ You can directly override the [httpx client](https://www.python-httpx.org/api/#c
270267
- Additional [advanced](https://www.python-httpx.org/advanced/clients/) functionality
271268

272269
```python
273-
from runloop import Runloop, DefaultHttpxClient
270+
from runloop_minus_api_minus_client import Runloop, DefaultHttpxClient
274271

275272
client = Runloop(
276273
# Or use the `RUNLOOP_BASE_URL` env var
@@ -296,7 +293,7 @@ This package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) con
296293

297294
We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.
298295

299-
We are keen for your feedback; please open an [issue](https://www.github.com/stainless-sdks/runloop-python/issues) with questions, bugs, or suggestions.
296+
We are keen for your feedback; please open an [issue](https://www.github.com/runloopai/api-client-python/issues) with questions, bugs, or suggestions.
300297

301298
## Requirements
302299

0 commit comments

Comments
 (0)