g_client = None def search(*args, **kwargs): # pylint: disable=W0603 global g_client if g_client is None: g_client = InteractiveVSOClient() return g_client.search(*args, **kwargs) search.__doc__ = InteractiveVSOClient.search.__doc__ def get(query_response, path=None, methods=('URL-FILE',), downloader=None): # pylint: disable=W0603 global g_client if g_client is None: g_client = InteractiveVSOClient() return g_client.get(query_response, path, methods, downloader) get.__doc__ = VSOClient.get.__doc__ if __name__ == "__main__": from sunpy.net import vso client = VSOClient() result = client.query( vso.attrs.Time((2011, 1, 1), (2011, 1, 1, 10)), vso.attrs.Instrument('aia') ) #res = client.get(result, path="/download/path").wait()
def search(*args, **kwargs): # pylint: disable=W0603 global g_client if g_client is None: g_client = InteractiveVSOClient() return g_client.search(*args, **kwargs) search.__doc__ = InteractiveVSOClient.search.__doc__ def get(query_response, path=None, methods=('URL-FILE', ), downloader=None): # pylint: disable=W0603 global g_client if g_client is None: g_client = InteractiveVSOClient() return g_client.get(query_response, path, methods, downloader) get.__doc__ = VSOClient.get.__doc__ if __name__ == "__main__": from sunpy.net import vso client = VSOClient() result = client.query(vso.attrs.Time((2011, 1, 1), (2011, 1, 1, 10)), vso.attrs.Instrument('aia')) #res = client.get(result, path="/download/path").wait()