prefix-register 0.2.2

A PostgreSQL-backed namespace prefix registry for CURIE expansion and prefix management
Documentation
"""
Prefix Register - A PostgreSQL-backed namespace prefix registry for CURIE expansion

This library provides bidirectional mapping between namespace prefixes
(like "foaf", "rdf", "schema") and their full URI bases, optimized for
use in RDF/semantic web applications.

Example:
    >>> import asyncio
    >>> from prefix_register import PrefixRegistry
    >>>
    >>> async def main():
    ...     # Connect to PostgreSQL
    ...     registry = await PrefixRegistry.new("postgres://localhost/mydb", 10)
    ...
    ...     # Store a prefix (only if URI doesn't already have one)
    ...     stored = await registry.store_prefix_if_new("foaf", "http://xmlns.com/foaf/0.1/")
    ...     print(f"Prefix stored: {stored}")
    ...
    ...     # Expand a CURIE
    ...     uri = await registry.expand_curie("foaf", "Person")
    ...     if uri:
    ...         print(f"foaf:Person = {uri}")
    ...
    ...     # Batch store prefixes
    ...     prefixes = [
    ...         ("rdf", "http://www.w3.org/1999/02/22-rdf-syntax-ns#"),
    ...         ("rdfs", "http://www.w3.org/2000/01/rdf-schema#"),
    ...     ]
    ...     result = await registry.store_prefixes_if_new(prefixes)
    ...     print(f"Stored {result['stored']}, skipped {result['skipped']}")
    >>>
    >>> asyncio.run(main())
"""

from ._prefix_register import PrefixRegistry

__version__ = "0.1.1"
__all__ = ["PrefixRegistry"]