Skip to content

Releases: Sub0X/veedb

v0.1.7

05 Jul 20:08

Choose a tag to compare

  • Merge branch 'main' of https://github.com/Sub0X/veedb (45ef708)
  • Added example to retrieve everything possible that a query can retrieve; Fixed bug of nested fields i.e. VN info in a staff's field not showing. (968abd7)

v0.1.6

27 Jun 19:29

Choose a tag to compare

v0.1.5

26 Jun 07:55

Choose a tag to compare

  • feat: add filter validation and available fields methods to _BaseEntityClient; update test fixture to use pytest_asyncio (af68b49)

v0.1.4

26 Jun 07:41

Choose a tag to compare

  • feat: add pagination methods for querying VNDB user lists and enhance example usage (a6af14d)

v0.1.3

19 Jun 21:50

Choose a tag to compare

  • fix: update release workflow to only trigger on published releases and improve optional fields in data classes (49ed280)

v0.1.2

19 Jun 06:12

Choose a tag to compare

  • fix: update GitHub token reference and simplify release condition (4fdc642)
  • feat: update release workflow to handle created releases and add debug script for version checks (313ced4)
  • Merge branch 'main' of https://github.com/Sub0X/veedb (767c105)
  • feat: Add orjson for faster JSON processing and update schema caching logic; enhance tests for schema functionality (d822841)
  • feat: Enhance CI workflow for auto-releasing and version bumping (55da9f3)
  • Update version number (5ad374e)

V0.1.1 Release

13 Jun 05:34

Choose a tag to compare

VeeDB v0.1.1 Release Notes

I'm excited to announce the first stable release of VeeDB, a modern asynchronous Python wrapper for the VNDB API v2 (Kana). VeeDB brings type-safe, validated, and efficient visual novel data access to your Python applications.

🚀 What is VeeDB?

VeeDB is a comprehensive Python library that provides:

  • Type-safe access to the VNDB (Visual Novel Database) API
  • Asynchronous operations using modern Python async/await
  • Intelligent validation with automatic schema caching
  • Complete coverage of all VNDB API v2 endpoints

Perfect for developers building visual novel applications, data analysis tools, or any project requiring access to VNDB's extensive database.

Smart Filter Validation

  • Real-time validation against the official VNDB API schema
  • Automatic schema caching with configurable TTL
  • Helpful suggestions for typos and invalid fields
  • Prevents API errors before they happen
# Validates filters before sending to API
result = await client.validate_filters("/vn", ["title", "~", "Fate"])
if result['valid']:
    # Safe to use in query
    pass
else:
    print(f"Suggestions: {result['suggestions']}")  # "Did you mean 'title'?"

🌐 Complete API Coverage

All VNDB API v2 endpoints are supported with proper typing:

Database Queries

  • 📚 Visual Novels (/vn) - Search and filter visual novels
  • 💿 Releases (/release) - Game releases and platforms
  • 🏢 Producers (/producer) - Companies and creators
  • 👥 Characters (/character) - Character information
  • 👨‍💼 Staff (/staff) - Development team members
  • 🏷️ Tags (/tag) - Genre and content tags
  • 🎭 Traits (/trait) - Character traits
  • 💬 Quotes (/quote) - Character quotes

User Operations

  • 📊 Statistics (/stats) - Database statistics
  • 👤 User Info (/user) - Public user profiles
  • 🔐 Authentication (/authinfo) - Token validation
  • 📝 User Lists (/ulist) - Personal VN lists (with CRUD operations)
  • 📋 Release Lists (/rlist) - Personal release lists

Schema & Metadata

  • 📋 API Schema (/schema) - Live API documentation

🔧 Advanced Features

Flexible Authentication

# Unauthenticated access for public data
async with VNDB() as client:
    stats = await client.get_stats()

# Authenticated access for personal features
async with VNDB(api_token="your-token") as client:
    auth_info = await client.get_authinfo()
    # Access personal lists, perform updates

Sandbox Support

# Test against VNDB's sandbox environment
async with VNDB(use_sandbox=True) as client:
    # Safe testing without affecting production data
    pass

Custom Session Management

# Bring your own aiohttp session
async with aiohttp.ClientSession() as session:
    async with VNDB(session=session) as client:
        # Use custom timeout, proxy, or other session settings
        pass

Schema Cache Configuration

# Customize caching behavior
async with VNDB(
    schema_cache_dir="./my_cache",
    schema_cache_ttl_hours=6.0,
    local_schema_path="./custom_schema.json"
) as client:
    # Control how schema is cached and refreshed
    pass

📚 Documentation & Examples

Quick Start

import asyncio
from veedb import VNDB, QueryRequest

async def main():
    async with VNDB() as client:
        # Search for visual novels
        response = await client.vn.query(QueryRequest(
            filters=["title", "~", "Steins"],
            fields="id, title, rating, released",
            sort="rating",
            reverse=True,
            results=5
        ))
        
        for vn in response.results:
            print(f"{vn.title} ({vn.released}): ⭐ {vn.rating}")

asyncio.run(main())

Advanced Filtering

# Complex nested filters
complex_filter = [
    "and",
    ["title", "~", "fate"],
    ["or",
        ["rating", ">", 8.0],
        ["votecount", ">", 100]
    ],
    ["length", "in", [3, 4]]  # Medium to long VNs
]

response = await client.vn.query(QueryRequest(
    filters=complex_filter,
    fields="id, title, rating, length, votecount"
))

User List Management

# Authenticated operations
async with VNDB(api_token=token) as client:
    # Add VN to your list
    await client.ulist.update_item("v17", {
        "vote": 9,
        "notes": "Excellent time travel story!",
        "added": "2024-12-07"
    })
    
    # Query your list
    my_list = await client.ulist.query(QueryRequest(
        filters=["vote", ">", 8],
        fields="id, vote, notes, vn.title"
    ))

🔧 Installation & Requirements

Installation

pip install veedb

Requirements

  • Python 3.8+ - Modern async/await support
  • aiohttp >=3.8.0,<5.0.0 - Async HTTP client
  • dacite >=1.6.0,<2.0.0 - Dataclass conversion

Optional Dependencies

  • VNDB API Token - For authenticated features (free from vndb.org)

🧪 Quality & Testing

  • Comprehensive test suite covering all endpoints
  • Type checking with mypy
  • Code quality with automated linting
  • Documentation testing with sphinx
  • Integration tests against live VNDB API
  • Error scenario testing for robust error handling

🚧 Getting Started

  1. Install the library:

    pip install veedb
  2. Basic usage:

    import asyncio
    from veedb import VNDB
    
    async def main():
        async with VNDB() as client:
            stats = await client.get_stats()
            print(f"Total VNs in database: {stats.vn}")
    
    asyncio.run(main())
  3. For authenticated features, get an API token from VNDB:

    • Visit https://vndb.org/u/edit
    • Generate an API token
    • Use in your application:
      async with VNDB(api_token="your-token") as client:
          auth_info = await client.get_authinfo()

V0.1.0 PreRelease

13 Jun 01:57

Choose a tag to compare

V0.1.0 PreRelease Pre-release
Pre-release

VeeDB v0.1.0 Release Notes

🎉 Initial PreRelease

I'm excited to announce the first prerelease of VeeDB, a modern asynchronous Python wrapper for the VNDB API v2 (Kana). VeeDB brings type-safe, validated, and efficient visual novel data access to your Python applications.

🚀 What is VeeDB?

VeeDB is a comprehensive Python library that provides:

  • Type-safe access to the VNDB (Visual Novel Database) API
  • Asynchronous operations using modern Python async/await
  • Intelligent validation with automatic schema caching
  • Complete coverage of all VNDB API v2 endpoints

Perfect for developers building visual novel applications, data analysis tools, or any project requiring access to VNDB's extensive database.

Smart Filter Validation

  • Real-time validation against the official VNDB API schema
  • Automatic schema caching with configurable TTL
  • Helpful suggestions for typos and invalid fields
  • Prevents API errors before they happen
# Validates filters before sending to API
result = await client.validate_filters("/vn", ["title", "~", "Fate"])
if result['valid']:
    # Safe to use in query
    pass
else:
    print(f"Suggestions: {result['suggestions']}")  # "Did you mean 'title'?"

🌐 Complete API Coverage

All VNDB API v2 endpoints are supported with proper typing:

Database Queries

  • 📚 Visual Novels (/vn) - Search and filter visual novels
  • 💿 Releases (/release) - Game releases and platforms
  • 🏢 Producers (/producer) - Companies and creators
  • 👥 Characters (/character) - Character information
  • 👨‍💼 Staff (/staff) - Development team members
  • 🏷️ Tags (/tag) - Genre and content tags
  • 🎭 Traits (/trait) - Character traits
  • 💬 Quotes (/quote) - Character quotes

User Operations

  • 📊 Statistics (/stats) - Database statistics
  • 👤 User Info (/user) - Public user profiles
  • 🔐 Authentication (/authinfo) - Token validation
  • 📝 User Lists (/ulist) - Personal VN lists (with CRUD operations)
  • 📋 Release Lists (/rlist) - Personal release lists

Schema & Metadata

  • 📋 API Schema (/schema) - Live API documentation

🔧 Advanced Features

Flexible Authentication

# Unauthenticated access for public data
async with VNDB() as client:
    stats = await client.get_stats()

# Authenticated access for personal features
async with VNDB(api_token="your-token") as client:
    auth_info = await client.get_authinfo()
    # Access personal lists, perform updates

Sandbox Support

# Test against VNDB's sandbox environment
async with VNDB(use_sandbox=True) as client:
    # Safe testing without affecting production data
    pass

Custom Session Management

# Bring your own aiohttp session
async with aiohttp.ClientSession() as session:
    async with VNDB(session=session) as client:
        # Use custom timeout, proxy, or other session settings
        pass

Schema Cache Configuration

# Customize caching behavior
async with VNDB(
    schema_cache_dir="./my_cache",
    schema_cache_ttl_hours=6.0,
    local_schema_path="./custom_schema.json"
) as client:
    # Control how schema is cached and refreshed
    pass

📚 Documentation & Examples

Quick Start

import asyncio
from veedb import VNDB, QueryRequest

async def main():
    async with VNDB() as client:
        # Search for visual novels
        response = await client.vn.query(QueryRequest(
            filters=["title", "~", "Steins"],
            fields="id, title, rating, released",
            sort="rating",
            reverse=True,
            results=5
        ))
        
        for vn in response.results:
            print(f"{vn.title} ({vn.released}): ⭐ {vn.rating}")

asyncio.run(main())

Advanced Filtering

# Complex nested filters
complex_filter = [
    "and",
    ["title", "~", "fate"],
    ["or",
        ["rating", ">", 8.0],
        ["votecount", ">", 100]
    ],
    ["length", "in", [3, 4]]  # Medium to long VNs
]

response = await client.vn.query(QueryRequest(
    filters=complex_filter,
    fields="id, title, rating, length, votecount"
))

User List Management

# Authenticated operations
async with VNDB(api_token=token) as client:
    # Add VN to your list
    await client.ulist.update_item("v17", {
        "vote": 9,
        "notes": "Excellent time travel story!",
        "added": "2024-12-07"
    })
    
    # Query your list
    my_list = await client.ulist.query(QueryRequest(
        filters=["vote", ">", 8],
        fields="id, vote, notes, vn.title"
    ))

🔧 Installation & Requirements

Installation

pip install veedb

Requirements

  • Python 3.8+ - Modern async/await support
  • aiohttp >=3.8.0,<5.0.0 - Async HTTP client
  • dacite >=1.6.0,<2.0.0 - Dataclass conversion

Optional Dependencies

  • VNDB API Token - For authenticated features (free from vndb.org)

🧪 Quality & Testing

  • Comprehensive test suite covering all endpoints
  • Type checking with mypy
  • Code quality with automated linting
  • Documentation testing with sphinx
  • Integration tests against live VNDB API
  • Error scenario testing for robust error handling

🚧 Getting Started

  1. Install the library:

    pip install veedb
  2. Basic usage:

    import asyncio
    from veedb import VNDB
    
    async def main():
        async with VNDB() as client:
            stats = await client.get_stats()
            print(f"Total VNs in database: {stats.vn}")
    
    asyncio.run(main())
  3. For authenticated features, get an API token from VNDB:

    • Visit https://vndb.org/u/edit
    • Generate an API token
    • Use in your application:
      async with VNDB(api_token="your-token") as client:
          auth_info = await client.get_authinfo()