Changelog¶
All notable changes to this project are documented here
The format is based on Keep a Changelog, and this project
adheres to Semantic Versioning
0.4.1 - 2026-07-03¶
A query performance patch, no API or database changes
Fixed¶
Form-Search Performance→ Searching entries and proper names by a written or reading form previously compiled to correlatedEXISTSsubqueries that scanned every row (743k for names). The predicates are rewritten as a non-correlatedid IN (... UNION ...)subquery that runs on the existing text indexes.kotobase.Kotobase.namesdrops from ~1.4s to ~2ms (~780x),kotobase.Kotobase.lookupfrom ~310ms to ~17ms, andkotobase.Kotobase.words_with_kanjifrom ~460ms to ~50ms. Result sets are unchanged and already-downloaded databases don't need a rebuild
0.4.0 - 2026-07-01¶
Richer data objects, a typed exception hierarchy, and a fix for the audio pull
Breaking Changes¶
-
JSON Output Shape→ The CLI--jsonoutput now followsPydantic'smodel_dump_json. Field names are unchanged and Japanese text stays verbatim, but the exact shape may differ from0.3.0, which0.xSemVer allows -
DTO Serialization→ TheSerializablemixin and itsto_dict/to_jsonhelpers are removed, serialize thePydanticDTOswithmodel_dump/model_dump_jsoninstead -
Bad-Argument Errors→ TheAPInow raisesAPIErrorfrom the new hierarchy on invalid arguments instead ofValueError
Added¶
-
Data-Facing DTO Methods→ The data objects gained pure helpers such asJMDictEntryDTO.all_pos/common_kanji,SenseDTO.all_tags/expand_tags,KanjiDTO.skip_codes/is_joyo, andLookupResult.has_* -
Exception Hierarchy→ A newkotobase.exceptionsmodule rooted atKotobaseError(DatabaseError,SourceExtractionError,DownloadError,APIErrorand their leaves), re-exported from the top-level package -
New API Methods→words_with_kanji,sentences_with_kanjiandresolve_references(each accepting aDTOor a string), plus amatchargument onby_radicalsto find kanji containing any of a set of radicals as well as all of them -
DTO Arguments→ The key-taking methods now accept aDTOas well as a string, reading the lookup key off the object, so a result from one call can be passed straight into another (e.g.sentences(entry),stroke_svg(kanji)) -
Test Suite→ Apytestsuite run against a tiny fixture database, with coverage reported toCodecovacrossPython3.10 to 3.13
Changed¶
-
Pydantic DTOs→ The data objects are nowPydanticmodels that carry data-facing behaviour and are built withmodel_validatestraight from theORMrows -
Typed Errors→ Repositories wrap unexpected database failures asDatabaseError, and the build pipeline raisesDownloadError/SourceExtractionError. TheCLIrenders anyKotobaseErroras a friendly message instead of a traceback
Fixed¶
Audio Pull→kotobase db pullpreviously rebuilt the audio database locally from theKanji Alivesources instead of pulling the pre-builtkotobase-audio.db.zstrelease asset
0.3.0 - 2026-06-26¶
A full rewrite of the package, its data and its tooling
0.2.7 shipped a flatter database covering JMdict, JMnedict, KanjiDic2, Japanese-Only Tatoeba
sentences and the Tanos JLPT lists, distributed through Google Drive
Added¶
-
New Data Sources →
KRADFILE/RADKFILEfor kanji to radical decomposition and radical search,JmdictFuriganafor per-form furigana,KanjiVGfor stroke-order SVG, and an optionalKanji Alivepronunciation audio pack -
Tatoeba→ Now imports the links and English exports as well, aligning Japanese sentences with their English translations -
Full
JMdict+JMnedictTag Extraction →part of speech,register(slang, colloquial, ...),field,dialectandpriority tagsthat the previous subset discarded -
New API Methods On
Kotobase→search_kanji,kanji_by_skip,stroke_svg,radicals,by_radicals,jlpt_list,names,furigana,audio,audio_bytes,save_audio,search_meaningandexpand_tags -
New
CLICommands Grouped Intolookup,dbandcache→lookup all,kanji-find,radicals,jlpt-list,names,meaning,sentences,furigana,kanji-svg,audio,cache path/size/clear -
dev+docsOptional-Dependency Extras →ruff/mypy/ pre-commit tooling, and a shippedpy.typedmarker
Changed¶
-
The
CLIis rebuilt onTyperandRich, with panelled output and--jsonon query commands. The entry point moved fromkotobase.cli:maintokotobase.cli:app -
The database is distributed through
GitHub Releasesas zstandard-compressed assets, rebuilt weekly, replacing theGoogle Drivedistribution -
The
schemais normalized (child tables and a JSON column for read-only tag blobs) instead of the previous flat tables with delimited-string columns, and the build streams the rawEDRDGandTatoebasources straight intoSQLite -
Reads go through a
thread-safe,read-onlyengine and return immutable, serializable data objects built withfrom_ormclassmethods -
The package is consolidated under
db/(connection,dtos,repos,uow,models,builder). The oldcore/,repos/anddb_builder/packages anddb/database.pywere restructured into it -
The minimum
Pythonversion is raised to3.10, with a modernizedpyproject.toml(full metadata and classifiers, includingTyping :: Typed)
Removed¶
-
The
Google Drivedistribution and thegdowndependency -
The
alembicdependency. The compiled database now records its format in adb_metaschema version instead of migrations -
The
clickdependency, replaced byTyper -
MANIFEST.in, replaced by declarative package data
0.2.7 - 2025-06-27¶
The final release of the original line
Had a flatter SQLite database distributed through Google Drive and queried with a Click CLI
The changelog for this and piror releases is documented only in the GitHub Releases section