File tree Expand file tree Collapse file tree 3 files changed +9
-3
lines changed
Expand file tree Collapse file tree 3 files changed +9
-3
lines changed Original file line number Diff line number Diff line change 88
99from hivemind_plugin_manager .database import Client , AbstractDB
1010
11+ from dataclasses import dataclass
1112
13+
14+ @dataclass
1215class SQLiteDB (AbstractDB ):
1316 """Database implementation using SQLite."""
17+ name : str = "clients"
18+ subfolder : str = "hivemind-core"
1419
15- def __init__ (self , name = "clients" , subfolder = "hivemind-core" ):
20+ def __post_init__ (self ):
1621 """
1722 Initialize the SQLiteDB connection.
1823 """
19- db_path = os .path .join (xdg_data_home (), subfolder , name + ".db" )
24+ db_path = os .path .join (xdg_data_home (), self . subfolder , self . name + ".db" )
2025 LOG .debug (f"sqlite database path: { db_path } " )
2126 os .makedirs (os .path .dirname (db_path ), exist_ok = True )
2227
Original file line number Diff line number Diff line change 1+ hivemind-plugin-manager >= 0.1.0 ,< 1.0.0
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ def required(requirements_file):
4848 url = 'https://github.com/JarbasHiveMind/hivemind-sqlite-database' ,
4949 license = 'Apache-2.0' ,
5050 author = 'jarbasAi' ,
51- # install_requires=required("requirements.txt"),
51+ install_requires = required ("requirements.txt" ),
5252 entry_points = {'hivemind.database' : PLUGIN_ENTRY_POINT },
5353 author_email = 'jarbasai@mailfence.com' ,
5454 description = 'sqlite database plugin for hivemind-core'
You can’t perform that action at this time.
0 commit comments