Releases: leonhard-s/auraxium
Version 0.3
Changes
auraxium.Client.get_by_name()
now supports looking upps2.World
name instance (see #66)- Extraneous fields are now ignored as part of payload validation. No warning is emitted for this in client code
- The deprecation of the legacy utility methods
Ps2Object.get_*()
has been pushed back to Version 0.4 - Team ID has been added for the
Death
andVehicleDestroy
ESS payloads (see #69)
Fixes
- Dummy URLs generated as part of error messages no longer trigger default service ID warnings
- Addressed several issues related to documentation accuracy and unresolved references
- Fixed optional ESS payload arguments not defaulting for newer versions of Pydantic
Known issues
- The
auraxium.types.CensusData
type alias is not resolvable in the Docs as part of function signatures
Patch 0.2.4
- Fixed error when manually defining event stream triggers defined with string event names and world ID filters and applied (#66, #67).
- Fixed ESS
Trigger
instances not auto-insertinglogicalAndCharactersWithWorlds=true
for customGainExperience
event filters. - Removed code and documentation references to the removed
ContinentUnlock
ESS event. - The
Weapon.datasheet()
andItem.datasheet()
now returnNone
for missing records rather than throwingNotFoundError
.
Patch 0.2.3
This version addresses several issues related to recent API changes, as well as a number of performance and bugfixes.
Features
- Experimental support for third-party endpoints has been introduced to the REST and WSS endpoints (57)
Note that these endpoints are currently still compared against the API spec of the Census, making this support limited to endpoints that exactly mirror the DBG Census. Larger fixes to support custom endpoints and data types seamlessly is planned, proper documentation will be created once this has been established.
Example for REST clients with endpoint fall-through
All requests will first be made to the first entry in the list, then fail over to the next one on error.
DBG_CENSUS = 'http://census.daybreakgames.com'
FALLBACK_ENDPOINT = 'https://my.custom.endpoint.xyz'
async with auraxium.Client(endpoints=[DBG_CENSUS, FALLBACK_ENDPOINT]) as client:
...
Example for ESS clients (only 1 endpoint supported)
Known working endpoints are available in the auraxium.endpoints
namespace.
import auraxium
from auraxium import event
from auraxium.endpoints import NANITE_SYSTEMS
async def main():
async with auraxium.EventClient(ess_endpoint=NANITE_SYSTEMS) as client:
...
Fixes
- Resolved an issue with the
Character.items()
helper when accessing internal/removed items for which noItem
type exists (#58) Client.get_by_name(ps2.Character, 'Higby')
will now target thecharacter.name.first_lower
field instead of using a case-insensitive query (#61)- Added guard against spurious errors on shutdown on Python <3.11 (#60)
Hotfix 0.2.2
This version temporarily rolls back the API SSL certificate expiration test bypass while a long-term solution is worked on.
- Disabled the
no_ssl_certs
parameter (see #56)
Client code using the above parameter will see a FutureWarning
to inform them that it has no effect in this version. No modification to client code is required at this point and the warning may be ignored.
Version 0.2.1
This version introduces a workaround for the PS2 API occasionally letting its SSL certifications expire, which would cause SSL verifications errors when attempting to use the auraxium.EventClient
websocket.
- Introduced the
no_ssl_certs
field to allow disabling SSL verification (see #55)
The above flag can be used as follows to use the ESS client even when the SSL certs are expired:
client = event.EventClient(service_id='s:example', no_ssl_certs=True)
Version 0.2.0b4
Minor fix to address the websockets
version being pinned to 8.1.
Version 0.2.0b3
Minor bugfix release with no new features.
- Fixed
MetagameEvent
payloads misreporting experience IDs as integers - Improved error output for API model issues (fewer obscure pydantic errors)
Version 0.2.0b2
Minor documentation and bugfix release with no new features.
- Improved documentation for placeholder fields
- The new documentation on RTD (Read the Docs) is now also available in the source
- Image-specific fields have been fixed (see #47)
Version 0.2.0b1
Finally some improvements worth writing notes for. Huzzah!
Highlights
- Rewritten event streaming system
- Documentation was rewritten and significantly expanded upon
- Improved error handling and reconnect behaviour for the REST and ESS endpoints
New event streaming interface
Event payloads are now represented by individual subclasses available in auraxium.event
. These allow attribute and type inferrence, as well as provide some extra validation when used with static type checkers like Mypy or Pylance.
But most importantly, this brings auto complete - typos begone!
Previous versions
@client.trigger(auraxium.EventType.DEATH)
async def track_deaths(event: auraxium.Event) -> None:
# "event" is now a sad, generic object, with most interesting data hidden
# away in its "payload" attribute, an anonymous dictionary.
char_id = int(event.payload['character_id'])
attacker_id = int(event.payload['attacker_character_id'])
...
New version
@client.trigger(auraxium.event.Death)
async def track_deaths(event: auraxium.event.Death) -> None:
# "event" now has native, typed attributes for all fields provided by the
# event type. The values below are already cast and hinted as "int":
char_id = event.character_id
attacker_id = event.attacker_character_id
# Additionally, type checkers will yell at you if the types accepted by
# the decorated function are incompatible with the event subscription.
...
For a more thorough introduction into the new event streaming system, check out the new and improved documentation.
Interface clarifications
A lot of modules that did not have any user-facing functionality have been flagged as internal, i.e. prefixed with an underscore to show that they are not part of the library API.
auraxium._cache
auraxium._client
auraxium._rest
(formerlyauraxium.request
)- `auraxium._support
- All submodules of
auraxium.census
- Most submodules of
auraxium.models
- Most submodules of
auraxium.ps2
Potentially breaking changes
Where possible, legacy interfaces have been left in place and wrapped in DeprecationWarning
s to promote their on-the-chopping-block status. Watch out for these warnings as you run your apps; they will also tell you what to use instead.
However, some things were either completely incompatible with the new implementation, or simply too janky to port over. Here is a list:
- The
EventType
enum is gone and has been superceded by custom subclasses,auraxium.EventType.DEATH
is nowauraxium.event.Death
. - The
Event
class can no longer be imported from the root namespace, import it fromauraxium.event
instead. - The
Ps2Data
base class has been removed. In the off-chance that you do require it as part of your app, you will find a similar base type calledRESTPayload
inauraxium.models.base
. - The orphaned
auraxium.types.optional
helper method has been removed.
Bugfix release
Bugfix release for legacy codebase. This will probably be the final version before a larger rewrite.