Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
ac5ea7c
chore(internal): codegen related update
stainless-app[bot] Jan 6, 2026
274c2d8
docs: prominently feature MCP server setup in root SDK readmes
stainless-app[bot] Jan 6, 2026
dedc776
feat(client): add support for binary request streaming
stainless-app[bot] Jan 14, 2026
2c0cb07
chore(internal): update `actions/checkout` version
stainless-app[bot] Jan 17, 2026
9ac3a1a
chore(ci): upgrade `actions/github-script`
stainless-app[bot] Jan 24, 2026
fbe8bce
fix(docs): fix mcp installation instructions for remote servers
stainless-app[bot] Jan 29, 2026
6308171
feat(client): add custom JSON encoder for extended type support
stainless-app[bot] Jan 30, 2026
18a346b
chore(internal): bump dependencies
stainless-app[bot] Feb 25, 2026
04b3ad1
chore(internal): fix lint error on Python 3.14
stainless-app[bot] Feb 12, 2026
d1f94d0
chore: format all `api.md` files
stainless-app[bot] Feb 13, 2026
e8e3b58
chore: update mock server docs
stainless-app[bot] Feb 20, 2026
4f455ba
chore(internal): add request options to SSE classes
stainless-app[bot] Feb 24, 2026
e438dc1
chore(internal): make `test_proxy_environment_variables` more resilient
stainless-app[bot] Feb 24, 2026
9624b3c
chore(internal): make `test_proxy_environment_variables` more resilie…
stainless-app[bot] Feb 25, 2026
08b509f
chore(test): do not count install time for mock server timeout
stainless-app[bot] Mar 6, 2026
8807bde
feat(api): api update
stainless-app[bot] Mar 6, 2026
1529947
chore(ci): skip uploading artifacts on stainless-internal branches
stainless-app[bot] Mar 7, 2026
dd51f84
release: 3.7.0
stainless-app[bot] Mar 10, 2026
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
16 changes: 10 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
runs-on: ${{ github.repository == 'stainless-sdks/scorecard-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Install Rye
run: |
Expand All @@ -44,7 +44,7 @@ jobs:
id-token: write
runs-on: ${{ github.repository == 'stainless-sdks/scorecard-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Install Rye
run: |
Expand All @@ -61,14 +61,18 @@ jobs:
run: rye build

- name: Get GitHub OIDC Token
if: github.repository == 'stainless-sdks/scorecard-python'
if: |-
github.repository == 'stainless-sdks/scorecard-python' &&
!startsWith(github.ref, 'refs/heads/stl/')
id: github-oidc
uses: actions/github-script@v6
uses: actions/github-script@v8
with:
script: core.setOutput('github_token', await core.getIDToken());

- name: Upload tarball
if: github.repository == 'stainless-sdks/scorecard-python'
if: |-
github.repository == 'stainless-sdks/scorecard-python' &&
!startsWith(github.ref, 'refs/heads/stl/')
env:
URL: https://pkg.stainless.com/s
AUTH: ${{ steps.github-oidc.outputs.github_token }}
Expand All @@ -81,7 +85,7 @@ jobs:
runs-on: ${{ github.repository == 'stainless-sdks/scorecard-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Install Rye
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Install Rye
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-doctor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
if: github.repository == 'scorecard-ai/scorecard-python' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next')

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Check release environment
run: |
Expand Down
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "3.6.0"
".": "3.7.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 31
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/scorecard%2Fscorecard-c6f53e7ee442b58c1923f5ec5859f789ec599e7b9004092f82e049110789399b.yml
openapi_spec_hash: 66bc4c6374fb5ba14d660655e73ac8e7
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/scorecard%2Fscorecard-01e01e74f4fc1b108f0446c197c6d187bb79560234a33671ea2b3f33eb52954a.yml
openapi_spec_hash: f34c136d551da1fcce69b811557c48a2
config_hash: 0b3b3dc41414f1a27e10168e44aeccd9
45 changes: 45 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,50 @@
# Changelog

## 3.7.0 (2026-03-10)

Full Changelog: [v3.6.0...v3.7.0](https://github.com/scorecard-ai/scorecard-python/compare/v3.6.0...v3.7.0)

### ⚠ BREAKING CHANGES

* system function signature now includes a SystemOptions parameter as the third argument containing { otel_link_id: str }.

### Features

* add otel_link_id for SDK/trace record deduplication ([#28](https://github.com/scorecard-ai/scorecard-python/issues/28)) ([f511399](https://github.com/scorecard-ai/scorecard-python/commit/f511399c26478f34eb2dcc69f6610b619ae3d9f9))
* add otel_link_id support for SDK/trace record deduplication ([50150ca](https://github.com/scorecard-ai/scorecard-python/commit/50150ca5714be18b591b03bb548e03fdcb563250))
* **api:** api update ([8807bde](https://github.com/scorecard-ai/scorecard-python/commit/8807bde543118b9da2c39db6fff24d4e3c5c16dc))
* **client:** add custom JSON encoder for extended type support ([6308171](https://github.com/scorecard-ai/scorecard-python/commit/6308171c800729a237389958bfe43dd1da991d4a))
* **client:** add support for binary request streaming ([dedc776](https://github.com/scorecard-ai/scorecard-python/commit/dedc77644cc4ce2a623500b59650a5038822eb13))


### Bug Fixes

* **docs:** fix mcp installation instructions for remote servers ([fbe8bce](https://github.com/scorecard-ai/scorecard-python/commit/fbe8bce2abdaa8bf86152952ea88df00816fdc85))
* make SystemOptions a non-breaking optional parameter ([7ce95ac](https://github.com/scorecard-ai/scorecard-python/commit/7ce95ac229fa7bc096a464f6ec3890bb0896a00a))
* resolve import sorting lint errors ([75cebe4](https://github.com/scorecard-ai/scorecard-python/commit/75cebe4e1bd449956ed9673f9360e91a99e1404f))
* use length-sorted imports per ruff config ([85214df](https://github.com/scorecard-ai/scorecard-python/commit/85214df2eb37d75727b4c8aacc2cd5c493d8858f))


### Chores

* **ci:** skip uploading artifacts on stainless-internal branches ([1529947](https://github.com/scorecard-ai/scorecard-python/commit/1529947c11c6482c3dab3b2dea821261e9249f40))
* **ci:** upgrade `actions/github-script` ([9ac3a1a](https://github.com/scorecard-ai/scorecard-python/commit/9ac3a1ac8a676311ae17da030a6f034bff4b7bb0))
* format all `api.md` files ([d1f94d0](https://github.com/scorecard-ai/scorecard-python/commit/d1f94d0b8e7a56c5af0f35a00e7d96d5165f22f4))
* **internal:** add request options to SSE classes ([4f455ba](https://github.com/scorecard-ai/scorecard-python/commit/4f455ba412d4f8334f2c216dd57016761d1bfaf7))
* **internal:** bump dependencies ([18a346b](https://github.com/scorecard-ai/scorecard-python/commit/18a346b2a29fe45183e39135325767000ffd8606))
* **internal:** codegen related update ([ac5ea7c](https://github.com/scorecard-ai/scorecard-python/commit/ac5ea7ca21d911f658ceb313bb7d79c8f61e4af5))
* **internal:** fix lint error on Python 3.14 ([04b3ad1](https://github.com/scorecard-ai/scorecard-python/commit/04b3ad148a599989518735c681c22b8fc4ac0f36))
* **internal:** make `test_proxy_environment_variables` more resilient ([e438dc1](https://github.com/scorecard-ai/scorecard-python/commit/e438dc1c46340e76df6d7143fc57531104d4dc44))
* **internal:** make `test_proxy_environment_variables` more resilient to env ([9624b3c](https://github.com/scorecard-ai/scorecard-python/commit/9624b3c2e20e5258263ce26b1b70b04d2220c711))
* **internal:** update `actions/checkout` version ([2c0cb07](https://github.com/scorecard-ai/scorecard-python/commit/2c0cb077047e7ddb567a197ecd54b22933937c38))
* **test:** do not count install time for mock server timeout ([08b509f](https://github.com/scorecard-ai/scorecard-python/commit/08b509f5f4338b929ad1375de30442c46c264b56))
* update mock server docs ([e8e3b58](https://github.com/scorecard-ai/scorecard-python/commit/e8e3b58624fa35ac16d40568ff73947c9f4fe4c9))


### Documentation

* prominently feature MCP server setup in root SDK readmes ([274c2d8](https://github.com/scorecard-ai/scorecard-python/commit/274c2d8cf582187a55129671ba50b89360399f59))

## 3.6.0 (2025-12-21)

Full Changelog: [v3.5.0...v3.6.0](https://github.com/scorecard-ai/scorecard-python/compare/v3.5.0...v3.6.0)
Expand Down
3 changes: 1 addition & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,7 @@ $ pip install ./path-to-wheel-file.whl
Most tests require you to [set up a mock server](https://github.com/stoplightio/prism) against the OpenAPI spec to run the tests.

```sh
# you will need npm installed
$ npx prism mock path/to/your/openapi.yml
$ ./scripts/mock
```

```sh
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2025 Scorecard
Copyright 2026 Scorecard

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@ and offers both synchronous and asynchronous clients powered by [httpx](https://

It is generated with [Stainless](https://www.stainless.com/).

## MCP Server

Use the Scorecard MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.

[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=scorecard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4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22scorecard-ai-mcp%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22scorecard-ai-mcp%22%5D%2C%22env%22%3A%7B%22SCORECARD_API_KEY%22%3A%22My%20API%20Key%22%7D%7D)

> Note: You may need to set environment variables in your MCP client.

## Documentation

The REST API documentation can be found on [docs.scorecard.io](https://docs.scorecard.io/api-reference/overview). The full API of this library can be found in [api.md](api.md).
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "scorecard-ai"
version = "3.6.0"
version = "3.7.0"
description = "The official Python library for the Scorecard API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down Expand Up @@ -74,7 +74,7 @@ format = { chain = [
# run formatting again to fix any inconsistencies when imports are stripped
"format:ruff",
]}
"format:docs" = "python scripts/utils/ruffen-docs.py README.md api.md"
"format:docs" = "bash -c 'python scripts/utils/ruffen-docs.py README.md $(find . -type f -name api.md)'"
"format:ruff" = "ruff format"

"lint" = { chain = [
Expand Down
32 changes: 16 additions & 16 deletions requirements-dev.lock
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
-e file:.
aiohappyeyeballs==2.6.1
# via aiohttp
aiohttp==3.13.2
aiohttp==3.13.3
# via httpx-aiohttp
# via scorecard-ai
aiosignal==1.4.0
# via aiohttp
annotated-types==0.7.0
# via pydantic
anyio==4.12.0
anyio==4.12.1
# via httpx
# via scorecard-ai
argcomplete==3.6.3
Expand All @@ -31,7 +31,7 @@ attrs==25.4.0
# via nox
backports-asyncio-runner==1.2.0
# via pytest-asyncio
certifi==2025.11.12
certifi==2026.2.25
# via httpcore
# via httpx
# via requests
Expand Down Expand Up @@ -66,7 +66,7 @@ httpx==0.28.1
# via httpx-aiohttp
# via respx
# via scorecard-ai
httpx-aiohttp==0.1.9
httpx-aiohttp==0.1.12
# via scorecard-ai
humanize==4.13.0
# via nox
Expand All @@ -75,23 +75,23 @@ idna==3.11
# via httpx
# via requests
# via yarl
importlib-metadata==8.7.0
importlib-metadata==8.7.1
# via opentelemetry-api
iniconfig==2.1.0
# via pytest
markdown-it-py==3.0.0
# via rich
mdurl==0.1.2
# via markdown-it-py
multidict==6.7.0
multidict==6.7.1
# via aiohttp
# via yarl
mypy==1.17.0
mypy-extensions==1.1.0
# via mypy
nodeenv==1.9.1
nodeenv==1.10.0
# via pyright
nox==2025.11.12
nox==2026.2.9
opentelemetry-api==1.39.1
# via opentelemetry-exporter-otlp-proto-http
# via opentelemetry-sdk
Expand All @@ -109,11 +109,11 @@ opentelemetry-sdk==1.39.1
# via scorecard-ai
opentelemetry-semantic-conventions==0.60b1
# via opentelemetry-sdk
packaging==25.0
packaging==26.0
# via dependency-groups
# via nox
# via pytest
pathspec==0.12.1
pathspec==1.0.4
# via mypy
platformdirs==4.4.0
# via virtualenv
Expand All @@ -122,7 +122,7 @@ pluggy==1.6.0
propcache==0.4.1
# via aiohttp
# via yarl
protobuf==6.33.2
protobuf==6.33.5
# via googleapis-common-protos
# via opentelemetry-proto
pydantic==2.12.5
Expand All @@ -143,14 +143,14 @@ python-dateutil==2.9.0.post0
requests==2.32.5
# via opentelemetry-exporter-otlp-proto-http
respx==0.22.0
rich==14.2.0
ruff==0.14.7
rich==14.3.3
ruff==0.15.2
six==1.17.0
# via python-dateutil
sniffio==1.3.1
# via scorecard-ai
time-machine==2.19.0
tomli==2.3.0
tomli==2.4.0
# via dependency-groups
# via mypy
# via nox
Expand All @@ -174,9 +174,9 @@ typing-extensions==4.15.0
# via virtualenv
typing-inspection==0.4.2
# via pydantic
urllib3==2.6.2
urllib3==2.6.3
# via requests
virtualenv==20.35.4
virtualenv==20.39.0
# via nox
yarl==1.22.0
# via aiohttp
Expand Down
8 changes: 4 additions & 4 deletions requirements.lock
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,21 @@
-e file:.
aiohappyeyeballs==2.6.1
# via aiohttp
aiohttp==3.13.2
aiohttp==3.13.3
# via httpx-aiohttp
# via scorecard-ai
aiosignal==1.4.0
# via aiohttp
annotated-types==0.7.0
# via pydantic
anyio==4.12.0
anyio==4.12.1
# via httpx
# via scorecard-ai
async-timeout==5.0.1
# via aiohttp
attrs==25.4.0
# via aiohttp
certifi==2025.11.12
certifi==2026.1.4
# via httpcore
# via httpx
# via requests
Expand All @@ -48,7 +48,7 @@ httpcore==1.0.9
httpx==0.28.1
# via httpx-aiohttp
# via scorecard-ai
httpx-aiohttp==0.1.9
httpx-aiohttp==0.1.12
# via scorecard-ai
idna==3.11
# via anyio
Expand Down
13 changes: 12 additions & 1 deletion scripts/mock
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,22 @@ echo "==> Starting mock server with URL ${URL}"

# Run prism mock on the given spec
if [ "$1" == "--daemon" ]; then
# Pre-install the package so the download doesn't eat into the startup timeout
npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism --version

npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock "$URL" &> .prism.log &

# Wait for server to come online
# Wait for server to come online (max 30s)
echo -n "Waiting for server"
attempts=0
while ! grep -q "✖ fatal\|Prism is listening" ".prism.log" ; do
attempts=$((attempts + 1))
if [ "$attempts" -ge 300 ]; then
echo
echo "Timed out waiting for Prism server to start"
cat .prism.log
exit 1
fi
echo -n "."
sleep 0.1
done
Expand Down
Loading