Skip to content

Commit 2370d7b

Browse files
authored
Merge pull request #10 from brapi-dev/release-please--branches--main--changes--next
release: 1.3.0
2 parents 265f51d + 32f1918 commit 2370d7b

79 files changed

Lines changed: 2340 additions & 4230 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/ci.yml‎

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
name: CI
22
on:
33
push:
4-
branches-ignore:
5-
- 'generated'
6-
- 'codegen/**'
7-
- 'integrated/**'
8-
- 'stl-preview-head/**'
9-
- 'stl-preview-base/**'
4+
branches:
5+
- '**'
6+
- '!integrated/**'
7+
- '!stl-preview-head/**'
8+
- '!stl-preview-base/**'
9+
- '!generated'
10+
- '!codegen/**'
11+
- 'codegen/stl/**'
1012
pull_request:
1113
branches-ignore:
1214
- 'stl-preview-head/**'
@@ -17,9 +19,9 @@ jobs:
1719
timeout-minutes: 10
1820
name: lint
1921
runs-on: ${{ github.repository == 'stainless-sdks/brapi-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
20-
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
22+
if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata')
2123
steps:
22-
- uses: actions/checkout@v6
24+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2325

2426
- name: Install Rye
2527
run: |
@@ -36,15 +38,15 @@ jobs:
3638
run: ./scripts/lint
3739

3840
build:
39-
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
41+
if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata')
4042
timeout-minutes: 10
4143
name: build
4244
permissions:
4345
contents: read
4446
id-token: write
4547
runs-on: ${{ github.repository == 'stainless-sdks/brapi-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
4648
steps:
47-
- uses: actions/checkout@v6
49+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
4850

4951
- name: Install Rye
5052
run: |
@@ -61,14 +63,18 @@ jobs:
6163
run: rye build
6264

6365
- name: Get GitHub OIDC Token
64-
if: github.repository == 'stainless-sdks/brapi-python'
66+
if: |-
67+
github.repository == 'stainless-sdks/brapi-python' &&
68+
!startsWith(github.ref, 'refs/heads/stl/')
6569
id: github-oidc
66-
uses: actions/github-script@v8
70+
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
6771
with:
6872
script: core.setOutput('github_token', await core.getIDToken());
6973

7074
- name: Upload tarball
71-
if: github.repository == 'stainless-sdks/brapi-python'
75+
if: |-
76+
github.repository == 'stainless-sdks/brapi-python' &&
77+
!startsWith(github.ref, 'refs/heads/stl/')
7278
env:
7379
URL: https://pkg.stainless.com/s
7480
AUTH: ${{ steps.github-oidc.outputs.github_token }}
@@ -81,7 +87,7 @@ jobs:
8187
runs-on: ${{ github.repository == 'stainless-sdks/brapi-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
8288
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
8389
steps:
84-
- uses: actions/checkout@v6
90+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
8591

8692
- name: Install Rye
8793
run: |

‎.github/workflows/publish-pypi.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
runs-on: ubuntu-latest
1515

1616
steps:
17-
- uses: actions/checkout@v6
17+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
1818

1919
- name: Install Rye
2020
run: |

‎.github/workflows/release-doctor.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
if: github.repository == 'brapi-dev/brapi-python' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next')
1313

1414
steps:
15-
- uses: actions/checkout@v6
15+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
1616

1717
- name: Check release environment
1818
run: |

‎.gitignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.prism.log
2+
.stdy.log
23
_dev
34

45
__pycache__

‎.release-please-manifest.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "1.2.0"
2+
".": "1.3.0"
33
}

‎.stats.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 11
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/alisson%2Fbrapi-76a60a630b8eaac37bdec27ffec5cbdf6640fb884186adb08211f1b81832c075.yml
3-
openapi_spec_hash: 51fab4b9fd59ce7421f3fdf03644c987
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/alisson/brapi-de3d30399876b2fbeef7ab49e0795a0284ce30db2429b708645f4f38c7c4340c.yml
3+
openapi_spec_hash: 36b4e6d8aab0be7695d66d369b3cee94
44
config_hash: 6f10a67950f65bf850612b59838ad03b

‎CHANGELOG.md‎

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,36 @@
11
# Changelog
22

3+
## 1.3.0 (2026-05-14)
4+
5+
Full Changelog: [v1.2.0...v1.3.0](https://github.com/brapi-dev/brapi-python/compare/v1.2.0...v1.3.0)
6+
7+
### Features
8+
9+
* **api:** api update ([d14ac86](https://github.com/brapi-dev/brapi-python/commit/d14ac86534b391d76741c66288b6de13587b04c8))
10+
* **api:** api update ([e5b6f83](https://github.com/brapi-dev/brapi-python/commit/e5b6f83dfaa8e56f3ee5f8d3cbb63f20ef134d75))
11+
* **api:** api update ([3cd15f0](https://github.com/brapi-dev/brapi-python/commit/3cd15f03d4ef87c43d54a307b5de78cb1668d5fd))
12+
13+
14+
### Chores
15+
16+
* format all `api.md` files ([691c9c6](https://github.com/brapi-dev/brapi-python/commit/691c9c699beb5779f2593de827024d861963eb73))
17+
* **internal:** add request options to SSE classes ([c83d52b](https://github.com/brapi-dev/brapi-python/commit/c83d52b1acbd6d9f062aa08aea4633d2ff465ab3))
18+
* **internal:** bump dependencies ([2afb698](https://github.com/brapi-dev/brapi-python/commit/2afb69816a7f44ee93344c61f94eb86f4c340e9f))
19+
* **internal:** codegen related update ([9d762c1](https://github.com/brapi-dev/brapi-python/commit/9d762c157eedd219a2b2b3759071ac25b8d369a2))
20+
* **internal:** codegen related update ([12bc0a4](https://github.com/brapi-dev/brapi-python/commit/12bc0a45ac8548a0088485b390d2b62b5c5d4067))
21+
* **internal:** codegen related update ([9e205f4](https://github.com/brapi-dev/brapi-python/commit/9e205f4d519846a0df06ff9692614ddb8db7cd68))
22+
* **internal:** codegen related update ([1cd1130](https://github.com/brapi-dev/brapi-python/commit/1cd11301a9c48f7e87080f3c0fed1b7ffe65d24e))
23+
* **internal:** codegen related update ([ca33256](https://github.com/brapi-dev/brapi-python/commit/ca33256ebbce63bc4d1704fed00dfec12fcaee3e))
24+
* **internal:** codegen related update ([c544f50](https://github.com/brapi-dev/brapi-python/commit/c544f50c8fd0ffe00e9736da46380290f355ead6))
25+
* **internal:** codegen related update ([6692c9b](https://github.com/brapi-dev/brapi-python/commit/6692c9b20d96d03d072e1db6b56bbcdfe1d852a5))
26+
* **internal:** codegen related update ([b344fe8](https://github.com/brapi-dev/brapi-python/commit/b344fe8ef180aa53bcba7cae0ab1736031f79941))
27+
* **internal:** codegen related update ([c48bfd7](https://github.com/brapi-dev/brapi-python/commit/c48bfd77ef22184d9befd319f68a4653e68f03b2))
28+
* **internal:** fix lint error on Python 3.14 ([8f891ca](https://github.com/brapi-dev/brapi-python/commit/8f891ca4cd532ff0b5bc2ea4748868189d1ac5bf))
29+
* **internal:** make `test_proxy_environment_variables` more resilient ([a298056](https://github.com/brapi-dev/brapi-python/commit/a298056128baf138f8493c80d34ecc8d67af02fa))
30+
* **internal:** make `test_proxy_environment_variables` more resilient to env ([a2e60c5](https://github.com/brapi-dev/brapi-python/commit/a2e60c5bb3762cf3de9e7bb7d54a3e6b91a77fb4))
31+
* **internal:** remove mock server code ([02c10f5](https://github.com/brapi-dev/brapi-python/commit/02c10f56762ea1456bc03934ebddd6c6f78fef81))
32+
* update mock server docs ([4b7594f](https://github.com/brapi-dev/brapi-python/commit/4b7594fc083f530ddddeaa052a641efaccaf8d6b))
33+
334
## 1.2.0 (2026-01-30)
435

536
Full Changelog: [v1.1.0...v1.2.0](https://github.com/brapi-dev/brapi-python/compare/v1.1.0...v1.2.0)

‎CONTRIBUTING.md‎

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,6 @@ $ pip install ./path-to-wheel-file.whl
8585

8686
## Running tests
8787

88-
Most tests require you to [set up a mock server](https://github.com/stoplightio/prism) against the OpenAPI spec to run the tests.
89-
90-
```sh
91-
# you will need npm installed
92-
$ npx prism mock path/to/your/openapi.yml
93-
```
94-
9588
```sh
9689
$ ./scripts/test
9790
```

‎README.md‎

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,10 @@ pip install brapi
2525
The full API of this library can be found in [api.md](api.md).
2626

2727
```python
28-
import os
2928
from brapi import Brapi
3029

3130
client = Brapi(
32-
api_key=os.environ.get("BRAPI_API_KEY"), # This is the default and can be omitted
31+
api_key="My API Key",
3332
# defaults to "production".
3433
environment="environment_1",
3534
)
@@ -40,22 +39,16 @@ quote = client.quote.retrieve(
4039
print(quote.requested_at)
4140
```
4241

43-
While you can provide an `api_key` keyword argument,
44-
we recommend using [python-dotenv](https://pypi.org/project/python-dotenv/)
45-
to add `BRAPI_API_KEY="My API Key"` to your `.env` file
46-
so that your API Key is not stored in source control.
47-
4842
## Async usage
4943

5044
Simply import `AsyncBrapi` instead of `Brapi` and use `await` with each API call:
5145

5246
```python
53-
import os
5447
import asyncio
5548
from brapi import AsyncBrapi
5649

5750
client = AsyncBrapi(
58-
api_key=os.environ.get("BRAPI_API_KEY"), # This is the default and can be omitted
51+
api_key="My API Key",
5952
# defaults to "production".
6053
environment="environment_1",
6154
)
@@ -87,15 +80,14 @@ pip install brapi[aiohttp]
8780
Then you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`:
8881

8982
```python
90-
import os
9183
import asyncio
9284
from brapi import DefaultAioHttpClient
9385
from brapi import AsyncBrapi
9486

9587

9688
async def main() -> None:
9789
async with AsyncBrapi(
98-
api_key=os.environ.get("BRAPI_API_KEY"), # This is the default and can be omitted
90+
api_key="My API Key",
9991
http_client=DefaultAioHttpClient(),
10092
) as client:
10193
quote = await client.quote.retrieve(
@@ -129,7 +121,9 @@ All errors inherit from `brapi.APIError`.
129121
import brapi
130122
from brapi import Brapi
131123

132-
client = Brapi()
124+
client = Brapi(
125+
api_key="My API Key",
126+
)
133127

134128
try:
135129
client.quote.retrieve(
@@ -172,6 +166,7 @@ from brapi import Brapi
172166

173167
# Configure the default for all requests:
174168
client = Brapi(
169+
api_key="My API Key",
175170
# default is 2
176171
max_retries=0,
177172
)
@@ -192,12 +187,14 @@ from brapi import Brapi
192187

193188
# Configure the default for all requests:
194189
client = Brapi(
190+
api_key="My API Key",
195191
# 20 seconds (default is 1 minute)
196192
timeout=20.0,
197193
)
198194

199195
# More granular control:
200196
client = Brapi(
197+
api_key="My API Key",
201198
timeout=httpx.Timeout(60.0, read=5.0, write=10.0, connect=2.0),
202199
)
203200

@@ -244,7 +241,9 @@ The "raw" Response object can be accessed by prefixing `.with_raw_response.` to
244241
```py
245242
from brapi import Brapi
246243

247-
client = Brapi()
244+
client = Brapi(
245+
api_key="My API Key",
246+
)
248247
response = client.quote.with_raw_response.retrieve(
249248
tickers="REPLACE_ME",
250249
)
@@ -323,6 +322,7 @@ import httpx
323322
from brapi import Brapi, DefaultHttpxClient
324323

325324
client = Brapi(
325+
api_key="My API Key",
326326
# Or use the `BRAPI_BASE_URL` env var
327327
base_url="http://my.test.server.example.com:8083",
328328
http_client=DefaultHttpxClient(
@@ -345,7 +345,9 @@ By default the library closes underlying HTTP connections whenever the client is
345345
```py
346346
from brapi import Brapi
347347

348-
with Brapi() as client:
348+
with Brapi(
349+
api_key="My API Key",
350+
) as client:
349351
# make requests here
350352
...
351353

‎api.md‎

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,7 @@ Types:
55
```python
66
from brapi.types import (
77
BalanceSheetEntry,
8-
CashflowEntry,
9-
DefaultKeyStatisticsEntry,
108
FinancialDataEntry,
11-
IncomeStatementEntry,
12-
ValueAddedEntry,
139
QuoteRetrieveResponse,
1410
QuoteListResponse,
1511
)
@@ -71,7 +67,7 @@ from brapi.types.v2 import InflationRetrieveResponse, InflationListAvailableResp
7167
Methods:
7268

7369
- <code title="get /api/v2/inflation">client.v2.inflation.<a href="./src/brapi/resources/v2/inflation.py">retrieve</a>(\*\*<a href="src/brapi/types/v2/inflation_retrieve_params.py">params</a>) -> <a href="./src/brapi/types/v2/inflation_retrieve_response.py">InflationRetrieveResponse</a></code>
74-
- <code title="get /api/v2/inflation/available">client.v2.inflation.<a href="./src/brapi/resources/v2/inflation.py">list_available</a>(\*\*<a href="src/brapi/types/v2/inflation_list_available_params.py">params</a>) -> <a href="./src/brapi/types/v2/inflation_list_available_response.py">InflationListAvailableResponse</a></code>
70+
- <code title="get /api/v2/inflation/available">client.v2.inflation.<a href="./src/brapi/resources/v2/inflation.py">list_available</a>() -> <a href="./src/brapi/types/v2/inflation_list_available_response.py">InflationListAvailableResponse</a></code>
7571

7672
## PrimeRate
7773

@@ -84,4 +80,4 @@ from brapi.types.v2 import PrimeRateRetrieveResponse, PrimeRateListAvailableResp
8480
Methods:
8581

8682
- <code title="get /api/v2/prime-rate">client.v2.prime_rate.<a href="./src/brapi/resources/v2/prime_rate.py">retrieve</a>(\*\*<a href="src/brapi/types/v2/prime_rate_retrieve_params.py">params</a>) -> <a href="./src/brapi/types/v2/prime_rate_retrieve_response.py">PrimeRateRetrieveResponse</a></code>
87-
- <code title="get /api/v2/prime-rate/available">client.v2.prime_rate.<a href="./src/brapi/resources/v2/prime_rate.py">list_available</a>(\*\*<a href="src/brapi/types/v2/prime_rate_list_available_params.py">params</a>) -> <a href="./src/brapi/types/v2/prime_rate_list_available_response.py">PrimeRateListAvailableResponse</a></code>
83+
- <code title="get /api/v2/prime-rate/available">client.v2.prime_rate.<a href="./src/brapi/resources/v2/prime_rate.py">list_available</a>() -> <a href="./src/brapi/types/v2/prime_rate_list_available_response.py">PrimeRateListAvailableResponse</a></code>

0 commit comments

Comments
 (0)