How return a shp file from a GeoDataframe, GeoPandas, without write this into disk?

Solution
import datetime
gdf_dict = {}

def result():
    # geojson = json.loads(request.values['geojson'])
    # gdf = gpd.GeoDataFrame.from_features(geojson['features'])
    
    # dummy df for demo purposes
    gdf = gpd.GeoDataFrame(geometry=[LineString([(1, 1), (4, 4)]),
                                            LineString([(1, 4), (4, 1)]),
                                            LineString([(6, 1), (6, 6)])])

    return gdf
gdf_dict[datetime.datetime.now()] = result()
with open('gdf.pickle', 'wb') as handle:
    pickle.dump(gdf_dict, handle)
with open('gdf.pickle', 'rb') as handle:
    from_pickle = pickle.load(handle)
def get_gdfs(gdf_dict, from_date_str, to_date_str):
    return sorted((k, v) for k, v in gdf_dict.items() if from_date_str <= k <= to_date_str)


gdfs_by_date = get_gdfs(gdf_dict, datetime.datetime(2022, 1, 21, 17, 46, 30, 408735), datetime.datetime(2023, 1, 22, 17, 48, 30, 408735))