# Stubs for rdflib.query (Python 2)
#
# NOTE: This dynamically typed stub was automatically generated by stubgen.

from typing import Any
from io import StringIO as BytesIO
import collections

class Processor:
    def __init__(self, graph): ...
    def query(self, strOrQuery, initBindings=..., initNs=..., DEBUG=False): ...

class UpdateProcessor:
    def __init__(self, graph): ...
    def update(self, strOrQuery, initBindings=..., initNs=...): ...

class ResultException(Exception): ...

class EncodeOnlyUnicode:
    def __init__(self, stream): ...
    def write(self, arg): ...
    def __getattr__(self, name): ...

class ResultRow(tuple):
    __doc__ = ... # type: Any
    def __new__(cls, values, labels): ...
    def __getattr__(self, name): ...
    def __getitem__(self, name): ...
    def asdict(self): ...

class Result(collections.Iterable):
    type = ... # type: Any
    vars = ... # type: Any
    askAnswer = ... # type: Any
    graph = ... # type: Any
    def __init__(self, type_): ...
    bindings = ... # type: Any
    @staticmethod
    def parse(source, format='', **kwargs): ...
    def serialize(self, destination=None, encoding='', format='', **args): ...
    def __len__(self): ...
    def __nonzero__(self): ...
    def __iter__(self): ...
    def __getattr__(self, name): ...
    def __eq__(self, other): ...

class ResultParser:
    def __init__(self): ...
    def parse(self, source, **kwargs): ...

class ResultSerializer:
    result = ... # type: Any
    def __init__(self, result): ...
    def serialize(self, stream, encoding='', **kwargs): ...
