Skip to content

v0.1.0a3

Pre-release
Pre-release

Choose a tag to compare

@arrayyandn arrayyandn released this 09 Apr 01:08
· 17 commits to main since this release

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!