from typing import Any

from pony.orm.core import Entity as Entity
from pony.orm.core import TransactionError as TransactionError
from pony.utils import cut_traceback as cut_traceback
from pony.utils import throw as throw

class Bag:
    def __init__(bag, database: Any) -> None: ...
    def config(
        bag,
        entity: Any,
        only: Any | None = ...,
        exclude: Any | None = ...,
        with_collections: bool = ...,
        with_lazy: bool = ...,
        related_objects: bool = ...,
    ) -> Any: ...
    def put(bag, x: Any) -> None: ...
    def to_dict(bag: Any) -> Any: ...
    def to_json(bag: Any) -> Any: ...

def to_dict(objects: Any) -> Any: ...
def to_json(objects: Any) -> Any: ...
def json_converter(x: Any) -> Any: ...
