grind-t-cbr-ratings
Async Python client for the Bank of Russia credit ratings registry.
Python port of @grind-t/cbr-ratings.
Installation
uv add grind-t-cbr-ratings
Usage
import asyncio
from datetime import date
import httpx
from cbr_ratings import CbrRatingsClient
async def main():
async with httpx.AsyncClient(timeout=30) as http:
client = CbrRatingsClient(http)
items = await client.query(
isin="RU000A1025U5",
date_from=date(2020, 1, 1),
type_group=["Финансовые инструменты"],
)
for item in items:
print(
item.kra_code,
item.rating_code,
item.prediction,
)
asyncio.run(main())
API
| Name | Description |
|---|---|
CbrRatingsClient(...).query(...) |
Search the registry; all filters of the site's advanced form |
RatingItem |
Pydantic model of one registry row; the type of items returned by query. Also validates its own dump, e.g. the files in exports/ |
KraCode |
Credit rating agency code: AKRA, NKR, EXPERT_RA, NRA |
Prediction |
Rating outlook code: STA, POS, NEG, DEV |
latest_rating(items) |
Newest non-withdrawn rating, or None |
latest_ratings_by_kra(items) |
Newest non-withdrawn rating per agency |
All of them are importable from the package root: from cbr_ratings import ....
Metadata
Release files for grind-t-cbr-ratings 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| grind_t_cbr_ratings-0.1.1.tar.gz | 11.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| grind_t_cbr_ratings-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 31.5 kB
Release files / grind_t_cbr_ratings-0.1.1.tar.gz
| Download URL | grind_t_cbr_ratings-0.1.1.tar.gz |
|---|---|
| Size | 11.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6c8851b59c8ab468524aa93bcfd4e4b0fc2c9b733cfaf345f742d3b492d31e06
|
|
BLAKE2b-256 checksum How to use checksums |
3cdaa0105db1f90ecd3930214e41d123b779b133887e6de2ccd2feb0cc434319
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.9 {"installer":{"name":"uv","version":"0.12.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / grind_t_cbr_ratings-0.1.1-py3-none-any.whl
| Download URL | grind_t_cbr_ratings-0.1.1-py3-none-any.whl |
|---|---|
| Size | 19.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
be6d82281bef1d3279c456c35626c022125d1306621cf41bde63f031d610633e
|
|
BLAKE2b-256 checksum How to use checksums |
51fff1c320c7074d058003702b0bd749bdc264ad8aab434612d98db9b126bb3a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.9 {"installer":{"name":"uv","version":"0.12.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|