Skip to content

Releases

0.4.0

Choose a tag to compare

@shpigunov shpigunov released this 30 Oct 18:52

The first release built and published entirely by CI, with signed provenance on PyPI. It also brings the bank clients up to date with the current Monobank, PrivatBank and NBU APIs.

⚠️ Compatibility

  • Python 3.11 or newer is now required. Python 3.10 reached end of life in October 2026. On 3.10, pip and uv will keep installing 0.3.0 automatically.
  • MonobankManagedClient.tin is now IPN | str (it was int). A valid tax number is parsed into an IPN. Anything else, such as the passport details used by FOPs registered without a tax number, stays a string instead of failing the whole get_client_info() response. As an int, a tax number starting with 0 lost its leading zero.
  • IPN now compares by value and is hashable. IPN("…") == "…" works, and IPNs can go in sets or be dict keys. It never compares equal to an int, since that would drop leading zeros.
  • IPNValidationError now subclasses ValueError, so pydantic reports an invalid IPN as a regular ValidationError. Existing except IPNValidationError blocks are unaffected.

Fixes

  • Monobank: MonobankPublicClient.get_currency_rates() works again. Monobank still quotes currencies that ISO 4217 has withdrawn: BGN (975, euro since 2026), HRK (191) and SLL (694). One such row made the whole call fail. Those rows are now skipped. They are not converted to the euro, because a lev or kuna isn't worth one euro. Any other malformed row still raises.
  • Monobank: rate-limit errors from the public endpoints come back as MonobankErrorResponse. Those endpoints reply {"errCode": "TMR", "errText": …} instead of the documented errorDescription. That used to raise BankTransportError. A new error_code field carries "TMR".
  • PrivatBank: transactions now include STRUCT_CATEGORY, the tax-notice field of a structured tax payment. It was being silently dropped.

Dependencies

  • schwifty no longer has an upper bound (>=2026.1.0). schwifty updates its bank registry roughly monthly, and the old <=2026.7.1 cap kept you on outdated bank data. The full test suite passes on Python 3.11 with the lowest versions allowed (pydantic 2.1, schwifty 2026.1.0, httpx 0.28.1).

Supply chain

  • Published through PyPI Trusted Publishing, with PEP 740 attestations. The PyPI page now shows which repository, workflow and commit built each file. To verify a download:
    uvx pypi-attestations verify pypi \
      --repository https://github.com/shpigunov/ua_banktools \
      'pypi:ua_banktools-0.4.0-py3-none-any.whl'
    Releases before 0.4.0 were uploaded with an API token and have no attestations.
  • Dependencies are audited on every change and weekly (uv audit against OSV), and the GitHub Actions workflows are audited with zizmor.
  • Report vulnerabilities privately: see SECURITY.md.
  • Package metadata now declares the license (MIT) and the project URLs, so PyPI can show them as verified.

Full changelog: 0.3.0...0.4.0

0.3.0

Choose a tag to compare

@shpigunov shpigunov released this 13 Aug 17:08

ua-banktools 0.3.0

This release improves transport safety, model serialization, and statement retrieval across the supported Ukrainian bank APIs.

Highlights

  • Added optional httpx.Client injection to every bank client.
  • Added bounded default timeouts: 30 seconds overall and 10 seconds for connection establishment.
  • Credentials are now attached per request, allowing one session to be shared safely between clients.
  • Added BankTransportError for gateway, proxy, and other HTTP errors that do not match a bank’s documented error schema.
  • Made response models JSON-safe, including Currency and IBAN fields.

Complete statement retrieval

  • Added MonobankPersonalClient.get_full_statement(), which divides long date ranges into Monobank-compatible windows and combines the results.
  • Added PBCorporateClient.get_all_transactions() and get_all_balances() to follow PrivatBank pagination automatically.
  • Added safeguards against repeated or malformed page identifiers and unexpectedly large page counts.
  • Partial results are discarded when a later request fails, preventing incomplete statements from being mistaken for complete ones.

Additional improvements

  • Improved NBU currency normalization.
  • Exported BankTransportError and DEFAULT_TIMEOUT from ua_banktools.banks.
  • Added ty static type checking and a generated ISO-4217 type stub.
  • Expanded tests for transport errors, session injection, serialization, pagination, and statement windowing.

Upgrade note

Clients no longer use an unlimited timeout by default. Applications requiring a larger timeout—such as those using a throttling or pacing proxy—should inject a configured session:

import httpx

from ua_banktools.banks import MonobankPersonalClient

session = httpx.Client(timeout=httpx.Timeout(90.0))
client = MonobankPersonalClient("your-token", session=session)

0.2.0

Choose a tag to compare

@shpigunov shpigunov released this 10 Jul 15:36
  • updated mono api
  • updated privatbank api
  • added currency exchange rate operations and split them out into public client classes
  • moved to httpx
  • now using iso4217 for currencies

0.1.0

Choose a tag to compare

@shpigunov shpigunov released this 01 Aug 11:16
f6607ca

Support for a subset of Monobank public API

0.0.8

Choose a tag to compare

@shpigunov shpigunov released this 01 Aug 09:41
856f509
  • bumped Pydantic to v2
  • updated for recent API changes

0.0.2

Choose a tag to compare

@shpigunov shpigunov released this 25 Nov 22:32

This is an initial release designed to test the Actions build system.