pyLodStorage 0.0.44__tar.gz → 0.0.45__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pylodstorage-0.0.44 → pylodstorage-0.0.45}/PKG-INFO +1 -1
- {pylodstorage-0.0.44 → pylodstorage-0.0.45}/lodstorage/storageconfig.py +15 -2
- {pylodstorage-0.0.44 → pylodstorage-0.0.45}/pylodstorage.egg-info/PKG-INFO +1 -1
- {pylodstorage-0.0.44 → pylodstorage-0.0.45}/pylodstorage.egg-info/requires.txt +1 -0
- {pylodstorage-0.0.44 → pylodstorage-0.0.45}/setup.py +3 -2
- {pylodstorage-0.0.44 → pylodstorage-0.0.45}/LICENSE +0 -0
- {pylodstorage-0.0.44 → pylodstorage-0.0.45}/README.md +0 -0
- {pylodstorage-0.0.44 → pylodstorage-0.0.45}/lodstorage/__init__.py +0 -0
- {pylodstorage-0.0.44 → pylodstorage-0.0.45}/lodstorage/csv.py +0 -0
- {pylodstorage-0.0.44 → pylodstorage-0.0.45}/lodstorage/entity.py +0 -0
- {pylodstorage-0.0.44 → pylodstorage-0.0.45}/lodstorage/jsonable.py +0 -0
- {pylodstorage-0.0.44 → pylodstorage-0.0.45}/lodstorage/jsonpicklemixin.py +0 -0
- {pylodstorage-0.0.44 → pylodstorage-0.0.45}/lodstorage/lod.py +0 -0
- {pylodstorage-0.0.44 → pylodstorage-0.0.45}/lodstorage/mwTable.py +0 -0
- {pylodstorage-0.0.44 → pylodstorage-0.0.45}/lodstorage/plot.py +0 -0
- {pylodstorage-0.0.44 → pylodstorage-0.0.45}/lodstorage/query.py +0 -0
- {pylodstorage-0.0.44 → pylodstorage-0.0.45}/lodstorage/sample.py +0 -0
- {pylodstorage-0.0.44 → pylodstorage-0.0.45}/lodstorage/schema.py +0 -0
- {pylodstorage-0.0.44 → pylodstorage-0.0.45}/lodstorage/sparql.py +0 -0
- {pylodstorage-0.0.44 → pylodstorage-0.0.45}/lodstorage/sql.py +0 -0
- {pylodstorage-0.0.44 → pylodstorage-0.0.45}/lodstorage/tabulateCounter.py +0 -0
- {pylodstorage-0.0.44 → pylodstorage-0.0.45}/lodstorage/uml.py +0 -0
- {pylodstorage-0.0.44 → pylodstorage-0.0.45}/lodstorage/yamlablemixin.py +0 -0
- {pylodstorage-0.0.44 → pylodstorage-0.0.45}/pylodstorage.egg-info/SOURCES.txt +0 -0
- {pylodstorage-0.0.44 → pylodstorage-0.0.45}/pylodstorage.egg-info/dependency_links.txt +0 -0
- {pylodstorage-0.0.44 → pylodstorage-0.0.45}/pylodstorage.egg-info/top_level.txt +0 -0
- {pylodstorage-0.0.44 → pylodstorage-0.0.45}/setup.cfg +0 -0
|
@@ -5,7 +5,7 @@ Created on 2020-08-29
|
|
|
5
5
|
'''
|
|
6
6
|
from enum import Enum
|
|
7
7
|
from pathlib import Path
|
|
8
|
-
|
|
8
|
+
import os
|
|
9
9
|
class StoreMode(Enum):
|
|
10
10
|
'''
|
|
11
11
|
possible supported storage modes
|
|
@@ -20,8 +20,19 @@ class StorageConfig(object):
|
|
|
20
20
|
'''
|
|
21
21
|
a storage configuration
|
|
22
22
|
'''
|
|
23
|
+
|
|
24
|
+
def ensureDirectoryExists(self,file_path:str):
|
|
25
|
+
'''
|
|
26
|
+
check that the given path exists and otherwise create it
|
|
27
|
+
|
|
28
|
+
Args
|
|
29
|
+
file_path(str): the path to check
|
|
30
|
+
'''
|
|
31
|
+
directory = os.path.dirname(file_path)
|
|
32
|
+
if not os.path.exists(directory):
|
|
33
|
+
os.makedirs(directory)
|
|
23
34
|
|
|
24
|
-
def getCachePath(self)->str:
|
|
35
|
+
def getCachePath(self,ensureExists=True)->str:
|
|
25
36
|
'''
|
|
26
37
|
get the path to the default cache
|
|
27
38
|
|
|
@@ -30,6 +41,8 @@ class StorageConfig(object):
|
|
|
30
41
|
'''
|
|
31
42
|
home = str(Path.home())
|
|
32
43
|
cachedir=f"{home}/.{self.cacheDirName}"
|
|
44
|
+
if ensureExists:
|
|
45
|
+
self.ensureDirectoryExists(cachedir)
|
|
33
46
|
return cachedir
|
|
34
47
|
|
|
35
48
|
def __init__(self, mode=StoreMode.SQL,cacheDirName="lodstorage",cacheFile=None,withShowProgress=True,profile=True,debug=False,errorDebug=True):
|
|
@@ -11,7 +11,7 @@ with open(path.join(this_directory, 'README.md'), encoding='utf-8') as f:
|
|
|
11
11
|
|
|
12
12
|
setup(
|
|
13
13
|
name='pylodstorage',
|
|
14
|
-
version='0.0.
|
|
14
|
+
version='0.0.45',
|
|
15
15
|
|
|
16
16
|
packages=['lodstorage',],
|
|
17
17
|
author='Wolfgang Fahl',
|
|
@@ -30,7 +30,8 @@ setup(
|
|
|
30
30
|
install_requires=[
|
|
31
31
|
'SPARQLWrapper',
|
|
32
32
|
'PyYAML',
|
|
33
|
-
'pandas'
|
|
33
|
+
'pandas',
|
|
34
|
+
'jsonpickle',
|
|
34
35
|
],
|
|
35
36
|
classifiers=[
|
|
36
37
|
'Programming Language :: Python',
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|