pyLodStorage 0.2.7__tar.gz → 0.2.8__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 (40) hide show
  1. {pylodstorage-0.2.7 → pylodstorage-0.2.8}/PKG-INFO +2 -1
  2. {pylodstorage-0.2.7 → pylodstorage-0.2.8}/lodstorage/querymain.py +3 -2
  3. {pylodstorage-0.2.7 → pylodstorage-0.2.8}/lodstorage/version.py +3 -2
  4. {pylodstorage-0.2.7 → pylodstorage-0.2.8}/pylodstorage.egg-info/PKG-INFO +2 -1
  5. pylodstorage-0.2.8/pylodstorage.egg-info/requires.txt +10 -0
  6. {pylodstorage-0.2.7 → pylodstorage-0.2.8}/sampledata/wikidata.yaml +24 -0
  7. {pylodstorage-0.2.7 → pylodstorage-0.2.8}/setup.py +12 -18
  8. pylodstorage-0.2.7/pylodstorage.egg-info/requires.txt +0 -8
  9. {pylodstorage-0.2.7 → pylodstorage-0.2.8}/LICENSE +0 -0
  10. {pylodstorage-0.2.7 → pylodstorage-0.2.8}/README.md +0 -0
  11. {pylodstorage-0.2.7 → pylodstorage-0.2.8}/lodstorage/csv.py +0 -0
  12. {pylodstorage-0.2.7 → pylodstorage-0.2.8}/lodstorage/entity.py +0 -0
  13. {pylodstorage-0.2.7 → pylodstorage-0.2.8}/lodstorage/jsonable.py +0 -0
  14. {pylodstorage-0.2.7 → pylodstorage-0.2.8}/lodstorage/jsonpicklemixin.py +0 -0
  15. {pylodstorage-0.2.7 → pylodstorage-0.2.8}/lodstorage/lod.py +0 -0
  16. {pylodstorage-0.2.7 → pylodstorage-0.2.8}/lodstorage/mwTable.py +0 -0
  17. {pylodstorage-0.2.7 → pylodstorage-0.2.8}/lodstorage/plot.py +0 -0
  18. {pylodstorage-0.2.7 → pylodstorage-0.2.8}/lodstorage/query.py +0 -0
  19. {pylodstorage-0.2.7 → pylodstorage-0.2.8}/lodstorage/sample.py +0 -0
  20. {pylodstorage-0.2.7 → pylodstorage-0.2.8}/lodstorage/schema.py +0 -0
  21. {pylodstorage-0.2.7 → pylodstorage-0.2.8}/lodstorage/sparql.py +0 -0
  22. {pylodstorage-0.2.7 → pylodstorage-0.2.8}/lodstorage/sql.py +0 -0
  23. {pylodstorage-0.2.7 → pylodstorage-0.2.8}/lodstorage/storageconfig.py +0 -0
  24. {pylodstorage-0.2.7 → pylodstorage-0.2.8}/lodstorage/tabulateCounter.py +0 -0
  25. {pylodstorage-0.2.7 → pylodstorage-0.2.8}/lodstorage/trulytabular.py +0 -0
  26. {pylodstorage-0.2.7 → pylodstorage-0.2.8}/lodstorage/uml.py +0 -0
  27. {pylodstorage-0.2.7 → pylodstorage-0.2.8}/lodstorage/xml.py +0 -0
  28. {pylodstorage-0.2.7 → pylodstorage-0.2.8}/lodstorage/yamlablemixin.py +0 -0
  29. {pylodstorage-0.2.7 → pylodstorage-0.2.8}/pylodstorage.egg-info/SOURCES.txt +0 -0
  30. {pylodstorage-0.2.7 → pylodstorage-0.2.8}/pylodstorage.egg-info/dependency_links.txt +0 -0
  31. {pylodstorage-0.2.7 → pylodstorage-0.2.8}/pylodstorage.egg-info/entry_points.txt +0 -0
  32. {pylodstorage-0.2.7 → pylodstorage-0.2.8}/pylodstorage.egg-info/top_level.txt +0 -0
  33. {pylodstorage-0.2.7 → pylodstorage-0.2.8}/sampledata/__init__.py +0 -0
  34. {pylodstorage-0.2.7 → pylodstorage-0.2.8}/sampledata/endpoints.yaml +0 -0
  35. {pylodstorage-0.2.7 → pylodstorage-0.2.8}/sampledata/formats.yaml +0 -0
  36. {pylodstorage-0.2.7 → pylodstorage-0.2.8}/sampledata/queries.yaml +0 -0
  37. {pylodstorage-0.2.7 → pylodstorage-0.2.8}/sampledata/scholia.yaml +0 -0
  38. {pylodstorage-0.2.7 → pylodstorage-0.2.8}/sampledata/trulytabular.yaml +0 -0
  39. {pylodstorage-0.2.7 → pylodstorage-0.2.8}/sampledata/wf.yaml +0 -0
  40. {pylodstorage-0.2.7 → pylodstorage-0.2.8}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pylodstorage
3
- Version: 0.2.7
3
+ Version: 0.2.8
4
4
  Summary: python List of Dict (Table) Storage library
5
5
  Home-page: https://github.com/WolfgangFahl/pyLodStorage
6
6
  Author: Wolfgang Fahl
@@ -16,6 +16,7 @@ Classifier: Programming Language :: Python :: 3.6
16
16
  Classifier: Programming Language :: Python :: 3.7
17
17
  Classifier: Programming Language :: Python :: 3.8
18
18
  Classifier: Programming Language :: Python :: 3.9
19
+ Classifier: Programming Language :: Python :: 3.10
19
20
  Description-Content-Type: text/markdown
20
21
  License-File: LICENSE
21
22
 
@@ -102,8 +102,9 @@ class QueryMain:
102
102
  doc=query.documentQueryResult(qlod, tablefmt=str(args.format),floatfmt=".0f")
103
103
  docstr=doc.asText()
104
104
  print (docstr)
105
- elif args.format in [Format.json]:
106
- print(json.dumps(qlod))
105
+ elif args.format in [Format.json] or args.format is None: # set as default
106
+ # https://stackoverflow.com/a/36142844/1497139
107
+ print(json.dumps(qlod,indent=2, sort_keys=True, default=str))
107
108
  elif args.format in [Format.xml]:
108
109
  lod2xml=Lod2Xml(qlod)
109
110
  xml=lod2xml.asXml()
@@ -9,6 +9,7 @@ class Version(object):
9
9
  Version handling for pyLoDStorage
10
10
  '''
11
11
  name="pylodstorage"
12
- version='0.2.7'
12
+ version='0.2.8'
13
13
  date = '2020-09-10'
14
- updated = '2022-07-02'
14
+ updated = '2022-07-22'
15
+ description='python List of Dict (Table) Storage library'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pylodstorage
3
- Version: 0.2.7
3
+ Version: 0.2.8
4
4
  Summary: python List of Dict (Table) Storage library
5
5
  Home-page: https://github.com/WolfgangFahl/pyLodStorage
6
6
  Author: Wolfgang Fahl
@@ -16,6 +16,7 @@ Classifier: Programming Language :: Python :: 3.6
16
16
  Classifier: Programming Language :: Python :: 3.7
17
17
  Classifier: Programming Language :: Python :: 3.8
18
18
  Classifier: Programming Language :: Python :: 3.9
19
+ Classifier: Programming Language :: Python :: 3.10
19
20
  Description-Content-Type: text/markdown
20
21
  License-File: LICENSE
21
22
 
@@ -0,0 +1,10 @@
1
+ SPARQLWrapper~=1.8.5
2
+ PyYAML
3
+ pandas
4
+ matplotlib
5
+ tabulate
6
+ numpy
7
+ jsonpickle==1.5.2
8
+ pylatexenc~=2.10
9
+ pygments
10
+ dicttoxml>=1.7.4
@@ -114,6 +114,9 @@
114
114
  'AcademicConferenceItemLabel':
115
115
  sparql: |
116
116
  # get the label for the given item
117
+ PREFIX p: <http://www.wikidata.org/prop/>
118
+ PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
119
+ PREFIX wd: <http://www.wikidata.org/entity/>
117
120
  SELECT ?itemLabel
118
121
  WHERE
119
122
  {
@@ -123,3 +126,24 @@
123
126
  ?item rdfs:label ?itemLabel.
124
127
  filter (lang(?itemLabel) = "en").
125
128
  }
129
+ 'MachadoDeAssis':
130
+ # https://stackoverflow.com/questions/71809883/sparql-query-dates-json-results-in-the-same-format-that-in-web-portal
131
+ sparql: |
132
+ # modified by WF 2022-07-22
133
+ PREFIX wd: <http://www.wikidata.org/entity/>
134
+ PREFIX wdt: <http://www.wikidata.org/prop/direct/>
135
+ PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
136
+ SELECT ?author ?authorLabel ?birthDate
137
+ WHERE
138
+ {
139
+ VALUES ?authorLabel {
140
+ "Machado de Assis"@pt
141
+ }
142
+ # Instance of Human
143
+ ?author wdt:P31 wd:Q5 .
144
+ # Joaquim Maria Machado de Assis
145
+ ?author rdfs:label ?authorLabel.
146
+ FILTER (LANG(?authorLabel) = "pt").
147
+ # birthDate
148
+ ?author wdt:P569 ?birthDate .
149
+ }
@@ -3,17 +3,19 @@
3
3
  from setuptools import setup
4
4
  from collections import OrderedDict
5
5
  from lodstorage.version import Version
6
+ import pathlib
6
7
 
7
- # read the contents of your README file
8
- from os import path
9
- this_directory = path.abspath(path.dirname(__file__))
10
- with open(path.join(this_directory, 'README.md'), encoding='utf-8') as f:
11
- long_description = f.read()
8
+ # where is this setup file?
9
+ here = pathlib.Path(__file__).parent.resolve()
10
+ # get thre requirements
11
+ requirements = (here / 'requirements.txt').read_text(encoding='utf-8').split("\n")
12
+ # and the README content
13
+ long_description = (here / 'README.md').read_text(encoding='utf-8')
12
14
 
13
15
  setup(
14
16
  name=Version.name,
15
17
  version=Version.version,
16
-
18
+ description=Version.description,
17
19
  packages=['lodstorage','sampledata'],
18
20
  package_data={
19
21
  'sampledata': ['*.yaml'],
@@ -30,23 +32,15 @@ setup(
30
32
  )
31
33
  ),
32
34
  license='Apache License',
33
- description='python List of Dict (Table) Storage library',
34
- install_requires=[
35
- 'SPARQLWrapper',
36
- 'PyYAML',
37
- 'pandas',
38
- 'jsonpickle',
39
- 'tabulate',
40
- 'pygments',
41
- 'pylatexenc~=2.10',
42
- 'dicttoxml~=1.7.4'
43
- ],
35
+
36
+ install_requires=requirements,
44
37
  classifiers=[
45
38
  'Programming Language :: Python',
46
39
  'Programming Language :: Python :: 3.6',
47
40
  'Programming Language :: Python :: 3.7',
48
41
  'Programming Language :: Python :: 3.8',
49
- 'Programming Language :: Python :: 3.9'
42
+ 'Programming Language :: Python :: 3.9',
43
+ 'Programming Language :: Python :: 3.10'
50
44
  ],
51
45
  entry_points={
52
46
  'console_scripts': [
@@ -1,8 +0,0 @@
1
- SPARQLWrapper
2
- PyYAML
3
- pandas
4
- jsonpickle
5
- tabulate
6
- pygments
7
- pylatexenc~=2.10
8
- dicttoxml~=1.7.4
File without changes
File without changes
File without changes