from singer import utils
from singer.utils import (
    chunk,
    load_json,
    parse_args,
    ratelimit,
    strftime,
    strptime,
    update_state,
    should_sync_field,
)

from singer.logger import (
    get_logger,
    log_debug,
    log_info,
    log_warning,
    log_error,
    log_critical,
    log_fatal,
    log_exception,
)

from singer.metrics import (
    Counter,
    Timer,
    http_request_timer,
    job_timer,
    record_counter,
)

from singer.messages import (
    ActivateVersionMessage,
    Message,
    RecordMessage,
    SchemaMessage,
    StateMessage,
    format_message,
    parse_message,
    write_message,
    write_record,
    write_records,
    write_schema,
    write_state,
    write_version,
)

from singer.transform import (
    NO_INTEGER_DATETIME_PARSING,
    UNIX_SECONDS_INTEGER_DATETIME_PARSING,
    UNIX_MILLISECONDS_INTEGER_DATETIME_PARSING,
    Transformer,
    transform,
    _transform_datetime,
    resolve_schema_references
)

from singer.catalog import (
    Catalog,
    CatalogEntry
)
from singer.schema import Schema

from singer.bookmarks import (
    write_bookmark,
    get_bookmark,
    clear_bookmark,
    reset_stream,
    set_offset,
    clear_offset,
    get_offset,
    set_currently_syncing,
    get_currently_syncing,
)

from singer.exceptions import (
    SingerConfigurationError,
    SingerDiscoveryError,
    SingerError,
    SingerRetryableRequestError,
    SingerSyncError,
)

if __name__ == "__main__":
    import doctest
    doctest.testmod()
