from datetime import datetime
from typing import List, Optional

class DecodeError(ValueError): ...
class InvalidUuidError(ValueError): ...

class PyUlid:
    def __repr__(self) -> str: ...
    def bytes(self) -> List[int]: ...
    def timestamp(self) -> int: ...
    def randomness(self) -> int: ...
    def str(self) -> str: ...
    def increment(self) -> Optional["PyUlid"]: ...

def new() -> PyUlid: ...
def from_string(value: str) -> PyUlid: ...
def from_uuid(value: str) -> PyUlid: ...
def from_timestamp(value: datetime) -> PyUlid: ...
def from_parts(timestamp: int, randomness: int) -> PyUlid: ...
