or run

tessl search
Log in

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
pypipkg:pypi/pydantic@2.11.x
tile.json

tessl/pypi-pydantic

tessl install tessl/pypi-pydantic@2.11.0

Data validation using Python type hints

Agent Success

Agent success rate when using this tile

90%

Improvement

Agent success rate improvement when using this tile compared to baseline

1.3x

Baseline

Agent success rate without this tile

69%

task.mdevals/scenario-6/

Event Tracking System

A data validation system for processing event tracking logs with version-specific unique identifiers.

Capabilities

Version-specific UUID validation

  • Accepts an event record with a time-based identifier (version 1) in the "session_id" field: {"session_id": "c3e3a0f0-1234-11e9-ab14-d663bd873d93", "request_id": "550e8400-e29b-41d4-a716-446655440000", "device_id": "6fa459ea-ee8a-3ca4-894e-db77e160355e"} @test
  • Accepts an event record with a random identifier (version 4) in the "request_id" field: {"session_id": "c3e3a0f0-1234-11e9-ab14-d663bd873d93", "request_id": "550e8400-e29b-41d4-a716-446655440000", "device_id": "6fa459ea-ee8a-3ca4-894e-db77e160355e"} @test
  • Accepts an event record with a name-based MD5 identifier (version 3) in the "device_id" field: {"session_id": "c3e3a0f0-1234-11e9-ab14-d663bd873d93", "request_id": "550e8400-e29b-41d4-a716-446655440000", "device_id": "6fa459ea-ee8a-3ca4-894e-db77e160355e"} @test
  • Rejects an event record when the session_id field contains a version 4 UUID instead of version 1: {"session_id": "550e8400-e29b-41d4-a716-446655440000", "request_id": "550e8400-e29b-41d4-a716-446655440000", "device_id": "6fa459ea-ee8a-3ca4-894e-db77e160355e"} @test
  • Rejects an event record when the request_id field contains an invalid UUID string: {"session_id": "c3e3a0f0-1234-11e9-ab14-d663bd873d93", "request_id": "not-a-uuid", "device_id": "6fa459ea-ee8a-3ca4-894e-db77e160355e"} @test
  • Rejects an event record when the device_id field contains a version 1 UUID instead of version 3: {"session_id": "c3e3a0f0-1234-11e9-ab14-d663bd873d93", "request_id": "550e8400-e29b-41d4-a716-446655440000", "device_id": "c3e3a0f0-1234-11e9-ab14-d663bd873d93"} @test

Implementation

@generates

API

from pydantic import BaseModel

class EventRecord(BaseModel):
    """Data model for event tracking records with version-specific UUID validation."""
    session_id: ... # Version 1 UUID
    request_id: ... # Version 4 UUID
    device_id: ... # Version 3 UUID

Dependencies { .dependencies }

pydantic { .dependency }

Provides data validation with version-specific UUID type support.