Skip to content

feat(api): OpenAPI spec update via Stainless API #207

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 21, 2024
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
19 changes: 19 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,24 @@ jobs:

- name: Run lints
run: ./scripts/lint
test:
name: test
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Install Rye
run: |
curl -sSf https://rye-up.com/get | bash
echo "$HOME/.rye/shims" >> $GITHUB_PATH
env:
RYE_VERSION: 0.24.0
RYE_INSTALL_OPTION: '--yes'

- name: Bootstrap
run: ./scripts/bootstrap

- name: Run tests
run: ./scripts/test

1 change: 1 addition & 0 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
configured_endpoints: 6
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openlayer%2Fopenlayer-7a4eecce275c87fdeff6194c1e6b1ccc1e703127193b0e6a381f73e358ea0bfb.yml
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Openlayer Python API library

[![PyPI version](https://img.shields.io/pypi/v/openlayer-test.svg)](https://pypi.org/project/openlayer-test/)
[![PyPI version](https://img.shields.io/pypi/v/openlayer.svg)](https://pypi.org/project/openlayer/)

The Openlayer Python library provides convenient access to the Openlayer REST API from any Python 3.7+
application. The library includes type definitions for all request params and response fields,
Expand All @@ -10,13 +10,13 @@ It is generated with [Stainless](https://www.stainlessapi.com/).

## Documentation

The REST API documentation can be found [on openlayer.com](https://openlayer.com/docs/api-reference/rest). The full API of this library can be found in [api.md](api.md).
The REST API documentation can be found [on openlayer.com](https://openlayer.com/docs/api-reference/rest/overview). The full API of this library can be found in [api.md](api.md).

## Installation

```sh
# install from PyPI
pip install --pre openlayer-test
pip install --pre openlayer
```

## Usage
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[project]
name = "openlayer-test"
name = "openlayer"
version = "0.1.0-alpha.2"
description = "The official Python library for the openlayer API"
dynamic = ["readme"]
Expand Down
12 changes: 6 additions & 6 deletions requirements-dev.lock
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ annotated-types==0.6.0
# via pydantic
anyio==4.1.0
# via httpx
# via openlayer-test
# via openlayer
argcomplete==3.1.2
# via nox
attrs==23.1.0
Expand All @@ -26,7 +26,7 @@ dirty-equals==0.6.0
distlib==0.3.7
# via virtualenv
distro==1.8.0
# via openlayer-test
# via openlayer
exceptiongroup==1.1.3
# via anyio
filelock==3.12.4
Expand All @@ -36,7 +36,7 @@ h11==0.14.0
httpcore==1.0.2
# via httpx
httpx==0.25.2
# via openlayer-test
# via openlayer
# via respx
idna==3.4
# via anyio
Expand All @@ -60,7 +60,7 @@ pluggy==1.3.0
py==1.11.0
# via pytest
pydantic==2.7.1
# via openlayer-test
# via openlayer
pydantic-core==2.18.2
# via pydantic
pyright==1.1.359
Expand All @@ -80,14 +80,14 @@ six==1.16.0
sniffio==1.3.0
# via anyio
# via httpx
# via openlayer-test
# via openlayer
time-machine==2.9.0
tomli==2.0.1
# via mypy
# via pytest
typing-extensions==4.8.0
# via mypy
# via openlayer-test
# via openlayer
# via pydantic
# via pydantic-core
virtualenv==20.24.5
Expand Down
12 changes: 6 additions & 6 deletions requirements.lock
Original file line number Diff line number Diff line change
Expand Up @@ -12,32 +12,32 @@ annotated-types==0.6.0
# via pydantic
anyio==4.1.0
# via httpx
# via openlayer-test
# via openlayer
certifi==2023.7.22
# via httpcore
# via httpx
distro==1.8.0
# via openlayer-test
# via openlayer
exceptiongroup==1.1.3
# via anyio
h11==0.14.0
# via httpcore
httpcore==1.0.2
# via httpx
httpx==0.25.2
# via openlayer-test
# via openlayer
idna==3.4
# via anyio
# via httpx
pydantic==2.7.1
# via openlayer-test
# via openlayer
pydantic-core==2.18.2
# via pydantic
sniffio==1.3.0
# via anyio
# via httpx
# via openlayer-test
# via openlayer
typing-extensions==4.8.0
# via openlayer-test
# via openlayer
# via pydantic
# via pydantic-core
2 changes: 1 addition & 1 deletion src/openlayer/_base_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ def __init__(

if max_retries is None: # pyright: ignore[reportUnnecessaryComparison]
raise TypeError(
"max_retries cannot be None. If you want to disable retries, pass `0`; if you want unlimited retries, pass `math.inf` or a very high number; if you want the default behavior, pass `openlayer-test.DEFAULT_MAX_RETRIES`"
"max_retries cannot be None. If you want to disable retries, pass `0`; if you want unlimited retries, pass `math.inf` or a very high number; if you want the default behavior, pass `openlayer.DEFAULT_MAX_RETRIES`"
)

def _enforce_trailing_slash(self, url: URL) -> URL:
Expand Down