#NEWLINE# def make_meetup_blueprint( key = None , secret = None , scope = None , redirect_url = None , redirect_to = None , login_url = None , authorized_url = None , session_class = None , backend = None ) : #NEWLINE# #INDENT# '\n    Make a blueprint for authenticating with Meetup using OAuth 2. This requires\n    an OAuth consumer from Meetup. You should either pass the key and secret to\n    this constructor, or make sure that your Flask application config defines\n    them, using the variables MEETUP_OAUTH_KEY and MEETUP_OAUTH_SECRET.\n\n    Args:\n        key (str): The OAuth consumer key for your application on Meetup\n        secret (str): The OAuth consumer secret for your application on Meetup\n        scope (str, optional): comma-separated list of scopes for the OAuth token\n        redirect_url (str): the URL to redirect to after the authentication\n            dance is complete\n        redirect_to (str): if ``redirect_url`` is not defined, the name of the\n            view to redirect to after the authentication dance is complete.\n            The actual URL will be determined by :func:`flask.url_for`\n        login_url (str, optional): the URL path for the ``login`` view.\n            Defaults to ``/meetup``\n        authorized_url (str, optional): the URL path for the ``authorized`` view.\n            Defaults to ``/meetup/authorized``.\n        session_class (class, optional): The class to use for creating a\n            Requests session. Defaults to\n            :class:`~flask_dance.consumer.requests.OAuth2Session`.\n        backend: A storage backend class, or an instance of a storage\n                backend class, to use for this blueprint. Defaults to\n                :class:`~flask_dance.consumer.backend.session.SessionBackend`.\n\n    :rtype: :class:`~flask_dance.consumer.OAuth2ConsumerBlueprint`\n    :returns: A :ref:`blueprint <flask:blueprints>` to attach to your Flask app.\n    ' #NEWLINE# scope = ( scope or [ 'basic' ] ) #NEWLINE# meetup_bp = OAuth2ConsumerBlueprint ( 'meetup' , __name__ , client_id = key , client_secret = secret , scope = scope , base_url = 'https://api.meetup.com/2/' , authorization_url = 'https://secure.meetup.com/oauth2/authorize' , token_url = 'https://secure.meetup.com/oauth2/access' , redirect_url = redirect_url , redirect_to = redirect_to , login_url = login_url , authorized_url = authorized_url , session_class = session_class , backend = backend ) #NEWLINE# meetup_bp . from_config [ 'client_id' ] = 'MEETUP_OAUTH_KEY' #NEWLINE# meetup_bp . from_config [ 'client_secret' ] = 'MEETUP_OAUTH_SECRET' #NEWLINE# @ meetup_bp . before_app_request #NEWLINE# def set_applocal_session( ) : #NEWLINE# #INDENT# ctx = stack . top #NEWLINE# ctx . meetup_oauth = meetup_bp . session #NEWLINE# #UNINDENT# return meetup_bp