Skip to content

Releases

dankmemer.py 1.0.2

Choose a tag to compare

@arrayyandn arrayyandn released this 18 Oct 23:02

This patch release improves item filtering, enum compatibility, and origin validation.

Changes

  • MerchantTrades.for_item() now accepts an item model, item ID, or exact item name.
  • SDK enum members and configurations containing them can now be copied, deep-copied, and pickled while retaining canonical enum identity.
  • Origin values now reject non-ASCII characters before being sent as an HTTP header.

Installation

python -m pip install --upgrade "dankmemer.py==1.0.2"

The release is also available under the mirror package name dankmemer. Install only one package name; both import as dankmemer.

See the documentation for setup and examples.

dankmemer.py 1.0.1

Choose a tag to compare

@arrayyandn arrayyandn released this 04 Oct 01:23

Bug fix

Repeated global_boosts_changed events for boosts that haven't changed.

The API works out each global boost's endsAt per request, so identical boosts come back with end times a millisecond apart (…37.810Z vs …37.811Z). Because snapshots were compared exactly, global_boosts_changed fired on almost every poll and listeners posted the same boosts again and again.

Snapshot events (global boosts, drops, store sales, fishing events, daily gifts, lottery, merchant trades and the streaming game) now compare timestamps with a tolerance. A polled timestamp within the tolerance of its saved value keeps the saved value, so it isn't reported as a change. Slow drift is still measured from the saved value, so real changes are always reported.

New option

EventConfig.timestamp_tolerance (a timedelta, default 1 second, range 0 to 1 minute):

from datetime import timedelta
from dankmemer import DankMemer, EventConfig

dank = DankMemer(token, events=EventConfig(timestamp_tolerance=timedelta(seconds=1)))

Set it to timedelta(0) to go back to exact comparison.

Upgrade notes

  • No code changes are needed. The default fixes the duplicate events.
  • Shared coordination: the tolerance is part of the shared settings check, so every process sharing a store must run 1.0.1 with the same tolerance.

Install

python -m pip install --upgrade "dankmemer.py>=1.0.1"

The dankmemer mirror package is published with the same version.

dankmemer.py 1.0.0

Choose a tag to compare

@arrayyandn arrayyandn released this 03 Oct 19:28

This release replaces the previous client with a fully asynchronous SDK for the official Dank Memer API.

Highlights

  • Typed resources and models for items, pets, skins, commands, fishing data, live events, publications, daily gifts, merchant trades, lottery results, and ban-status lookups
  • Name, ID, and key lookups with searching, filtering, pagination, and configurable caching
  • Event listeners with resource-aware polling schedules
  • Durable callback replay using SQLite, PostgreSQL, or a custom event store
  • Optional shared polling and delivery across multiple processes
  • discord.py support for Cogs, event decorators, slash commands, and item autocomplete
  • Strict typing and support for Python 3.11 through 3.14

This version uses the official Dank Memer API and requires a developer token. Applications upgrading from 1.0.0rc3 should follow the migration guide:

https://dankmemerpy.readthedocs.io/en/latest/migrating.html

Installation

python -m pip install --upgrade "dankmemer.py>=1.0.0"

The release is also available under the mirror package name dankmemer. Install only one of the two package names; both import as dankmemer.

Documentation:

https://dankmemerpy.readthedocs.io/en/latest/

v1.0.0rc3

v1.0.0rc3 Pre-release
Pre-release

Choose a tag to compare

@arrayyandn arrayyandn released this 31 Jul 14:57

Full Changelog: v1.0.0rc2...v1.0.0rc3

v1.0.0rc2

v1.0.0rc2 Pre-release
Pre-release

Choose a tag to compare

@arrayyandn arrayyandn released this 25 May 22:26

dankmemer.py v1.0.0rc2

This release candidate adds the new DankAlert stream endpoint and improves the client internals ahead of the stable 1.0 release.

Highlights

  • Added client.stream for the /dank/stream endpoint.
  • Added StreamData and TrendingGame response models.
  • Parsed stream lastModified values into timezone-aware datetime objects.
  • Added shared internal route cache and filtering helpers to reduce duplicated route code.
  • Added configurable retry handling for rate limits, temporary server errors, timeouts, and connection errors.
  • Added cache controls:
    • client.clear_cache()
    • client.clear_route_cache(...)
    • route-level clear_cache()
    • route-level cache_info()
  • Added support for disabling cache with cache_ttl_hours=0 or None.
  • Added session ownership support for user-provided aiohttp.ClientSession objects.
  • Added configurable logging modes:
    • logging_mode="default"
    • logging_mode="null"
    • logging_mode="inherit"
    • logger=custom_logger
  • Updated supported Python versions to Python 3.11+.
  • Updated README and Sphinx docs.
  • Added more automated tests and a manual maintainer smoke script.

Install

pip install --upgrade dankmemer

or:

pip install --upgrade dankmemer.py

Notes

This is still a release candidate. The package has not yet had a stable 1.0.0 release, so this version is intended for final testing before promoting the API to stable.

Full Changelog: v1.0.0rc1...v1.0.0rc2

v1.0.0rc1

v1.0.0rc1 Pre-release
Pre-release

Choose a tag to compare

@arrayyandn arrayyandn released this 12 Apr 23:00

Release Candidate of dankmemer.py

docs: https://dankmemerpy.readthedocs.io/en/latest/

v0.1.0a3

v0.1.0a3 Pre-release
Pre-release

Choose a tag to compare

@arrayyandn arrayyandn released this 09 Apr 01:08

dankmemer.py v0.1.0a3

We are excited to announce the first alpha release of dankmemer.py, a lightweight asynchronous Python wrapper for the DankAlert API. This release provides basic support for the /items endpoint, complete with built-in caching and powerful filtering options.

Overview

dankmemer.py enables you to easily access and work with data from the DankAlert API—such as items, NPCs, skills, and tools—using Python’s asynchronous capabilities. In this alpha release:

  • The /items endpoint is implemented.
  • Caching can be configured with a custom TTL.
  • Flexible filtering is available using exact matching, fuzzy matching (via the Fuzzy helper), and numeric range queries.

Basic Usage Example

Below is a quick example demonstrating how to query items and apply filtering:

import asyncio
from dankmemer import DankMemerClient, ItemsFilter, Fuzzy

async def main():
    async with DankMemerClient() as client:
        # Retrieve all items
        all_items = await client.items.query()
        print("All items:", all_items)

        # Filter items:
        # - Fuzzy match on 'name' (e.g. similar to "trash" with a cutoff of 80%)
        # - Boolean filter on 'hasUse' (only items that are not usable)
        # - Numeric range filter on 'marketValue'
        filter_obj = ItemsFilter(
            name=Fuzzy("trash", cutoff=80),
            hasUse=False,
            marketValue=(5000, 10000000)
        )

        filtered_items = await client.items.query(filter_obj)
        print("Filtered items:", filtered_items)

asyncio.run(main())

What’s Next

This alpha release focuses on the /items endpoint. Future releases will expand coverage to include additional endpoints and enhanced features.

Feedback, bug reports, and contributions are welcome. Happy coding!