v2.0.0#
Core#
- Complete rewrite.
Codebase rebuilt from scratch with clean architecture.
- Removed synchronous client.
Maintaining both sync and async versions added architectural complexity and forced an unnecessary choice on users. Asynchronous I/O is the modern standard and remains the only supported path.
- Global configuration.
New
Configclass provides centralized defaults for region, pagination, sorting, and more. Settings applied once affect all clients.
- Replaced httpx with aiohttp.
Improved request performance and connection stability.
- Upgraded Pydantic from v1 to v2.
Faster response parsing and better type safety.
- Refined exception hierarchy.
Exceptions are now more granular, consistent, and provide clearer error context.
DatabaseLookup#
Complete redesign of item ID resolution.
Previous LocalItem and WebItem classes have been removed. The new DatabaseLookup system synchronizes a local copy of the official game database and provides fuzzy search by item/achievement/stat names.
- Synchronization.
Data is fetched from the
stalcraft-databaseGitHub repository when needed or explicitly requested.
- Caching.
Search indexes and assets (JSON, PNG) are cached in memory with configurable TTL. Subsequent searches are instant (~0.0001s).
- Multiโrealm support.
Full support for both
ruandglobaldatabase versions.
- No external database required.
Everything runs inโmemory, zero setup, zero dependencies.
Authentication#
- Unified OAuthClient.
Replaced separate
AppAuthandUserAuthclasses. Single client handles both application and user token flows.
- Configurable OAuth endpoint.
base_urlparameter allows switching between.netand.rudomains.
- CSRF protection.
get_authorize_url()now accepts an optionalstateparameter. The oldcode_urlattribute is removed.
Documentation#
- Added complete documentation.
Includes
Guides(concepts) andAPI Reference(autogenerated).
Migration Guide (v1.x โ v2.0)#
- Renamed package name.
stalcraftโscapi. Shorter, import friendly, no ambiguity with game name.
v1.x |
v2.0 |
|---|---|
|
|
|
|
v1.x |
v2.0 |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
Old |
New |
|---|---|
|
|
|
|
|
|
Constant |
Replacement |
|---|---|
|
|
|
Exceptions types |