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.
Files changed (27) hide show
  1. {pylodstorage-0.0.44 → pylodstorage-0.0.45}/PKG-INFO +1 -1
  2. {pylodstorage-0.0.44 → pylodstorage-0.0.45}/lodstorage/storageconfig.py +15 -2
  3. {pylodstorage-0.0.44 → pylodstorage-0.0.45}/pylodstorage.egg-info/PKG-INFO +1 -1
  4. {pylodstorage-0.0.44 → pylodstorage-0.0.45}/pylodstorage.egg-info/requires.txt +1 -0
  5. {pylodstorage-0.0.44 → pylodstorage-0.0.45}/setup.py +3 -2
  6. {pylodstorage-0.0.44 → pylodstorage-0.0.45}/LICENSE +0 -0
  7. {pylodstorage-0.0.44 → pylodstorage-0.0.45}/README.md +0 -0
  8. {pylodstorage-0.0.44 → pylodstorage-0.0.45}/lodstorage/__init__.py +0 -0
  9. {pylodstorage-0.0.44 → pylodstorage-0.0.45}/lodstorage/csv.py +0 -0
  10. {pylodstorage-0.0.44 → pylodstorage-0.0.45}/lodstorage/entity.py +0 -0
  11. {pylodstorage-0.0.44 → pylodstorage-0.0.45}/lodstorage/jsonable.py +0 -0
  12. {pylodstorage-0.0.44 → pylodstorage-0.0.45}/lodstorage/jsonpicklemixin.py +0 -0
  13. {pylodstorage-0.0.44 → pylodstorage-0.0.45}/lodstorage/lod.py +0 -0
  14. {pylodstorage-0.0.44 → pylodstorage-0.0.45}/lodstorage/mwTable.py +0 -0
  15. {pylodstorage-0.0.44 → pylodstorage-0.0.45}/lodstorage/plot.py +0 -0
  16. {pylodstorage-0.0.44 → pylodstorage-0.0.45}/lodstorage/query.py +0 -0
  17. {pylodstorage-0.0.44 → pylodstorage-0.0.45}/lodstorage/sample.py +0 -0
  18. {pylodstorage-0.0.44 → pylodstorage-0.0.45}/lodstorage/schema.py +0 -0
  19. {pylodstorage-0.0.44 → pylodstorage-0.0.45}/lodstorage/sparql.py +0 -0
  20. {pylodstorage-0.0.44 → pylodstorage-0.0.45}/lodstorage/sql.py +0 -0
  21. {pylodstorage-0.0.44 → pylodstorage-0.0.45}/lodstorage/tabulateCounter.py +0 -0
  22. {pylodstorage-0.0.44 → pylodstorage-0.0.45}/lodstorage/uml.py +0 -0
  23. {pylodstorage-0.0.44 → pylodstorage-0.0.45}/lodstorage/yamlablemixin.py +0 -0
  24. {pylodstorage-0.0.44 → pylodstorage-0.0.45}/pylodstorage.egg-info/SOURCES.txt +0 -0
  25. {pylodstorage-0.0.44 → pylodstorage-0.0.45}/pylodstorage.egg-info/dependency_links.txt +0 -0
  26. {pylodstorage-0.0.44 → pylodstorage-0.0.45}/pylodstorage.egg-info/top_level.txt +0 -0
  27. {pylodstorage-0.0.44 → pylodstorage-0.0.45}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pylodstorage
3
- Version: 0.0.44
3
+ Version: 0.0.45
4
4
  Summary: python List of Dict (Table) Storage library
5
5
  Home-page: https://github.com/WolfgangFahl/pyLodStorage
6
6
  Author: Wolfgang Fahl
@@ -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):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pylodstorage
3
- Version: 0.0.44
3
+ Version: 0.0.45
4
4
  Summary: python List of Dict (Table) Storage library
5
5
  Home-page: https://github.com/WolfgangFahl/pyLodStorage
6
6
  Author: Wolfgang Fahl
@@ -1,3 +1,4 @@
1
1
  SPARQLWrapper
2
2
  PyYAML
3
3
  pandas
4
+ jsonpickle
@@ -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.44',
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