# Path: firebase_admin/credentials.py
# class Base:
# class Certificate(Base):
# class ApplicationDefault(Base):
# class RefreshToken(Base):
#     def get_access_token(self):
#     def get_credential(self):
#     def __init__(self, cert):
#     def project_id(self):
#     def signer(self):
#     def service_account_email(self):
#     def get_credential(self):
#     def __init__(self):
#     def get_credential(self):
#     def project_id(self):
#     def _load_credential(self):
#     def __init__(self, refresh_token):
#     def client_id(self):
#     def client_secret(self):
#     def refresh_token(self):
#     def get_credential(self):
# def _is_file_path(path):
#     _CREDENTIAL_TYPE = 'service_account'
#     _CREDENTIAL_TYPE = 'authorized_user'
# 
# Path: firebase_admin/db.py
# _DB_ATTRIBUTE = '_database'
# _INVALID_PATH_CHARACTERS = '[].?#$'
# _RESERVED_FILTERS = ('$key', '$value', '$priority')
# _USER_AGENT = 'Firebase/HTTP/{0}/{1}.{2}/AdminPython'.format(
#     firebase_admin.__version__, sys.version_info.major, sys.version_info.minor)
# _TRANSACTION_MAX_RETRIES = 25
# _EMULATOR_HOST_ENV_VAR = 'FIREBASE_DATABASE_EMULATOR_HOST'
#     _DEFAULT_AUTH_OVERRIDE = '_admin_'
# def reference(path='/', app=None, url=None):
# def _parse_path(path):
#     def __init__(self, sse_event):
#     def data(self):
#     def path(self):
#     def event_type(self):
#     def __init__(self, callback, sse):
#     def _start_listen(self):
#     def close(self):
#     def __init__(self, **kwargs):
#     def key(self):
#     def path(self):
#     def parent(self):
#     def child(self, path):
#     def get(self, etag=False, shallow=False):
#     def get_if_changed(self, etag):
#     def set(self, value):
#     def set_if_unchanged(self, expected_etag, value):
#     def push(self, value=''):
#     def update(self, value):
#     def delete(self):
#     def listen(self, callback):
#     def transaction(self, transaction_update):
#     def order_by_child(self, path):
#     def order_by_key(self):
#     def order_by_value(self):
#     def _add_suffix(self, suffix='.json'):
#     def _listen_with_session(self, callback, session=None):
#     def __init__(self, **kwargs):
#     def limit_to_first(self, limit):
#     def limit_to_last(self, limit):
#     def start_at(self, start):
#     def end_at(self, end):
#     def equal_to(self, value):
#     def _querystr(self):
#     def get(self):
#     def __init__(self, message):
#     def __init__(self, results, order_by):
#     def get(self):
#     def __init__(self, key, value, order_by):
#     def key(self):
#     def index(self):
#     def index_type(self):
#     def value(self):
#     def _get_index_type(cls, index):
#     def _extract_child(cls, value, path):
#     def _compare(self, other):
#     def __lt__(self, other):
#     def __le__(self, other):
#     def __gt__(self, other):
#     def __ge__(self, other):
#     def __eq__(self, other):
#     def __init__(self, app):
#     def get_client(self, db_url=None):
#     def _get_emulator_config(self, parsed_url):
#     def _parse_emulator_url(cls, parsed_url):
#     def _get_auth_override(cls, app):
#     def close(self):
#     def __init__(self, credential, base_url, timeout, params=None):
#     def request(self, method, url, **kwargs):
#     def create_listener_session(self):
#     def handle_rtdb_error(cls, error):
#     def _extract_error_message(cls, response):
# class Event:
# class ListenerRegistration:
# class Reference:
# class Query:
# class TransactionAbortedError(exceptions.AbortedError):
# class _Sorter:
# class _SortEntry:
# class _DatabaseService:
# class _Client(_http_client.JsonHttpClient):


import firebase_admin
    import firebase_admin
    import firebase_admin
    import firebase_admin
from firebase_admin import credentials
from firebase_admin import db
    from firebase_admin import credentials
    from firebase_admin import db
    from firebase_admin import credentials
    from firebase_admin import db
    from firebase_admin import credentials
    from firebase_admin import db
    from firebase_admin import db
    from firebase_admin import db
    # [START limit_query_2]
    ref = db.reference('dinosaurs')
    snapshot = ref.order_by_child('height').limit_to_first(2).get()
    for key in snapshot:
        print(key)
    # [END limit_query_2]

    # [START limit_query_3]
    scores_ref = db.reference('scores')
    snapshot = scores_ref.order_by_value().limit_to_last(3).get()
    for key, val in snapshot.items():
        print('The {0} dinosaur\'s score is {1}'.format(key, val))
    # [END limit_query_3]

def range_query():
    # [START range_query_1]
    ref = db.reference('dinosaurs')
    snapshot = ref.order_by_child('height').start_at(3).get()
    for key in snapshot:
        print(key)
    # [END range_query_1]

    # [START range_query_2]
    ref = db.reference('dinosaurs')
    snapshot = ref.order_by_key().end_at('pterodactyl').get()
    for key in snapshot:
        print(key)
    # [END range_query_2]

    # [START range_query_3]

# Path: firebase_admin/credentials.py
# class Base:
# class Certificate(Base):
# class ApplicationDefault(Base):
# class RefreshToken(Base):
#     def get_access_token(self):
#     def get_credential(self):
#     def __init__(self, cert):
#     def project_id(self):
#     def signer(self):
#     def service_account_email(self):
#     def get_credential(self):
#     def __init__(self):
#     def get_credential(self):
#     def project_id(self):
#     def _load_credential(self):
#     def __init__(self, refresh_token):
#     def client_id(self):
#     def client_secret(self):
#     def refresh_token(self):
#     def get_credential(self):
# def _is_file_path(path):
#     _CREDENTIAL_TYPE = 'service_account'
#     _CREDENTIAL_TYPE = 'authorized_user'
# 
# Path: firebase_admin/db.py
# _DB_ATTRIBUTE = '_database'
# _INVALID_PATH_CHARACTERS = '[].?#$'
# _RESERVED_FILTERS = ('$key', '$value', '$priority')
# _USER_AGENT = 'Firebase/HTTP/{0}/{1}.{2}/AdminPython'.format(
#     firebase_admin.__version__, sys.version_info.major, sys.version_info.minor)
# _TRANSACTION_MAX_RETRIES = 25
# _EMULATOR_HOST_ENV_VAR = 'FIREBASE_DATABASE_EMULATOR_HOST'
#     _DEFAULT_AUTH_OVERRIDE = '_admin_'
# def reference(path='/', app=None, url=None):
# def _parse_path(path):
#     def __init__(self, sse_event):
#     def data(self):
#     def path(self):
#     def event_type(self):
#     def __init__(self, callback, sse):
#     def _start_listen(self):
#     def close(self):
#     def __init__(self, **kwargs):
#     def key(self):
#     def path(self):
#     def parent(self):
#     def child(self, path):
#     def get(self, etag=False, shallow=False):
#     def get_if_changed(self, etag):
#     def set(self, value):
#     def set_if_unchanged(self, expected_etag, value):
#     def push(self, value=''):
#     def update(self, value):
#     def delete(self):
#     def listen(self, callback):
#     def transaction(self, transaction_update):
#     def order_by_child(self, path):
#     def order_by_key(self):
#     def order_by_value(self):
#     def _add_suffix(self, suffix='.json'):
#     def _listen_with_session(self, callback, session=None):
#     def __init__(self, **kwargs):
#     def limit_to_first(self, limit):
#     def limit_to_last(self, limit):
#     def start_at(self, start):
#     def end_at(self, end):
#     def equal_to(self, value):
#     def _querystr(self):
#     def get(self):
#     def __init__(self, message):
#     def __init__(self, results, order_by):
#     def get(self):
#     def __init__(self, key, value, order_by):
#     def key(self):
#     def index(self):
#     def index_type(self):
#     def value(self):
#     def _get_index_type(cls, index):
#     def _extract_child(cls, value, path):
#     def _compare(self, other):
#     def __lt__(self, other):
#     def __le__(self, other):
#     def __gt__(self, other):
#     def __ge__(self, other):
#     def __eq__(self, other):
#     def __init__(self, app):
#     def get_client(self, db_url=None):
#     def _get_emulator_config(self, parsed_url):
#     def _parse_emulator_url(cls, parsed_url):
#     def _get_auth_override(cls, app):
#     def close(self):
#     def __init__(self, credential, base_url, timeout, params=None):
#     def request(self, method, url, **kwargs):
#     def create_listener_session(self):
#     def handle_rtdb_error(cls, error):
#     def _extract_error_message(cls, response):
# class Event:
# class ListenerRegistration:
# class Reference:
# class Query:
# class TransactionAbortedError(exceptions.AbortedError):
# class _Sorter:
# class _SortEntry:
# class _DatabaseService:
# class _Client(_http_client.JsonHttpClient):


# Path: snippets/database/index.py
import firebase_admin
    import firebase_admin
    import firebase_admin
    import firebase_admin
from firebase_admin import credentials
from firebase_admin import db
    from firebase_admin import credentials
    from firebase_admin import db
    from firebase_admin import credentials
    from firebase_admin import db
    from firebase_admin import credentials
    from firebase_admin import db
    from firebase_admin import db
    from firebase_admin import db

    # [START limit_query_2]
    ref = db.reference('dinosaurs')
    snapshot = ref.order_by_child('height').limit_to_first(2).get()
    for key in snapshot:
        print(key)
    # [END limit_query_2]

    # [START limit_query_3]
    scores_ref = db.reference('scores')
    snapshot = scores_ref.order_by_value().limit_to_last(3).get()
    for key, val in snapshot.items():
        print('The {0} dinosaur\'s score is {1}'.format(key, val))
    # [END limit_query_3]

def range_query():
    # [START range_query_1]
    ref = db.reference('dinosaurs')
    snapshot = ref.order_by_child('height').start_at(3).get()
    for key in snapshot:
        print(key)
    # [END range_query_1]

    # [START range_query_2]
    ref = db.reference('dinosaurs')
    snapshot = ref.order_by_key().end_at('pterodactyl').get()
    for key in snapshot:
        print(key)
    # [END range_query_2]

    # [START range_query_3]

    ref = db.reference('dinosaurs')