From c5ae72c8b8dffb5c8391b655a1bde21426fb92a0 Mon Sep 17 00:00:00 2001 From: Alexander_Kabui Date: Mon, 23 Jan 2023 13:35:57 +0300 Subject: init lmdb file generator --- .../correlation/correlation_file_generator.py | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/wqflask/wqflask/correlation/correlation_file_generator.py b/wqflask/wqflask/correlation/correlation_file_generator.py index 79161f6d..401b3ba6 100644 --- a/wqflask/wqflask/correlation/correlation_file_generator.py +++ b/wqflask/wqflask/correlation/correlation_file_generator.py @@ -123,3 +123,26 @@ def generate_csv_file(conn,db_name,txt_dir,file_name): except Exception as e: raise e + + +def lmdb_file_generator(): + pass + + + +"""" +import lmdb +import os +import tempfile +with tempfile.TemporaryDirectory() as tmpdirname: + + tmp_file_path = os.path.join(tmpdirname,"img_lmdb") + breakpoint() + db = lmdb.open(tmp_file_path, map_size=int(1e12)) + + with db.begin(write=True) as in_txn: + + + db.close() + +""" -- cgit v1.2.3