Returns the snapshot as a streamed file object ( using urllib3.HTTPResponse).

Note: Make sure you set your API key before calling this method, for example:

public = enigma.Public()
public.set_auth(apikey='YOUR-API-KEY')

Required arguments

None

Optional keyword arguments

See snapshot.get( ) for a list of supported arguments. row_limit, row_offset, row_sort, and stats are ignored.

Example

Example 1 downloads the current snapshot for the specified dataset as a file object.

snapshot = public.datasets.get('d8c29d0d-f283-4eb5-b4d4-460c9779d05d').current_snapshot
file_obj = snapshot.export_stream()

You can read a CSV file object into a pandas DataFrame as shown here:

import pandas as pd
df = pd.read_csv(file_obj)

Example 2 demonstrates the use of arguments to export only specific rows.

dataset = public.datasets.get('d8c29d0d-f283-4eb5-b4d4-460c9779d05d')
file_obj = dataset.current_snapshot.export_stream(
    query_mode='advanced',
    geo_query='geo_location:40.744460,-73.987340;distance:100m', 
    query='food_type:asian'
)