pyLodStorage 0.2.7__tar.gz → 0.2.9__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.2.7 → pylodstorage-0.2.9}/PKG-INFO +2 -1
- {pylodstorage-0.2.7 → pylodstorage-0.2.9}/lodstorage/querymain.py +3 -2
- {pylodstorage-0.2.7 → pylodstorage-0.2.9}/lodstorage/trulytabular.py +6 -1
- {pylodstorage-0.2.7 → pylodstorage-0.2.9}/lodstorage/version.py +3 -2
- {pylodstorage-0.2.7 → pylodstorage-0.2.9}/pylodstorage.egg-info/PKG-INFO +2 -1
- {pylodstorage-0.2.7 → pylodstorage-0.2.9}/pylodstorage.egg-info/SOURCES.txt +1 -0
- pylodstorage-0.2.9/pylodstorage.egg-info/requires.txt +10 -0
- pylodstorage-0.2.9/sampledata/__init__.py +0 -0
- {pylodstorage-0.2.7 → pylodstorage-0.2.9}/sampledata/wikidata.yaml +24 -0
- {pylodstorage-0.2.7 → pylodstorage-0.2.9}/setup.py +12 -18
- pylodstorage-0.2.7/pylodstorage.egg-info/requires.txt +0 -8
- {pylodstorage-0.2.7 → pylodstorage-0.2.9}/LICENSE +0 -0
- {pylodstorage-0.2.7 → pylodstorage-0.2.9}/README.md +0 -0
- {pylodstorage-0.2.7/sampledata → pylodstorage-0.2.9/lodstorage}/__init__.py +0 -0
- {pylodstorage-0.2.7 → pylodstorage-0.2.9}/lodstorage/csv.py +0 -0
- {pylodstorage-0.2.7 → pylodstorage-0.2.9}/lodstorage/entity.py +0 -0
- {pylodstorage-0.2.7 → pylodstorage-0.2.9}/lodstorage/jsonable.py +0 -0
- {pylodstorage-0.2.7 → pylodstorage-0.2.9}/lodstorage/jsonpicklemixin.py +0 -0
- {pylodstorage-0.2.7 → pylodstorage-0.2.9}/lodstorage/lod.py +0 -0
- {pylodstorage-0.2.7 → pylodstorage-0.2.9}/lodstorage/mwTable.py +0 -0
- {pylodstorage-0.2.7 → pylodstorage-0.2.9}/lodstorage/plot.py +0 -0
- {pylodstorage-0.2.7 → pylodstorage-0.2.9}/lodstorage/query.py +0 -0
- {pylodstorage-0.2.7 → pylodstorage-0.2.9}/lodstorage/sample.py +0 -0
- {pylodstorage-0.2.7 → pylodstorage-0.2.9}/lodstorage/schema.py +0 -0
- {pylodstorage-0.2.7 → pylodstorage-0.2.9}/lodstorage/sparql.py +0 -0
- {pylodstorage-0.2.7 → pylodstorage-0.2.9}/lodstorage/sql.py +0 -0
- {pylodstorage-0.2.7 → pylodstorage-0.2.9}/lodstorage/storageconfig.py +0 -0
- {pylodstorage-0.2.7 → pylodstorage-0.2.9}/lodstorage/tabulateCounter.py +0 -0
- {pylodstorage-0.2.7 → pylodstorage-0.2.9}/lodstorage/uml.py +0 -0
- {pylodstorage-0.2.7 → pylodstorage-0.2.9}/lodstorage/xml.py +0 -0
- {pylodstorage-0.2.7 → pylodstorage-0.2.9}/lodstorage/yamlablemixin.py +0 -0
- {pylodstorage-0.2.7 → pylodstorage-0.2.9}/pylodstorage.egg-info/dependency_links.txt +0 -0
- {pylodstorage-0.2.7 → pylodstorage-0.2.9}/pylodstorage.egg-info/entry_points.txt +0 -0
- {pylodstorage-0.2.7 → pylodstorage-0.2.9}/pylodstorage.egg-info/top_level.txt +0 -0
- {pylodstorage-0.2.7 → pylodstorage-0.2.9}/sampledata/endpoints.yaml +0 -0
- {pylodstorage-0.2.7 → pylodstorage-0.2.9}/sampledata/formats.yaml +0 -0
- {pylodstorage-0.2.7 → pylodstorage-0.2.9}/sampledata/queries.yaml +0 -0
- {pylodstorage-0.2.7 → pylodstorage-0.2.9}/sampledata/scholia.yaml +0 -0
- {pylodstorage-0.2.7 → pylodstorage-0.2.9}/sampledata/trulytabular.yaml +0 -0
- {pylodstorage-0.2.7 → pylodstorage-0.2.9}/sampledata/wf.yaml +0 -0
- {pylodstorage-0.2.7 → pylodstorage-0.2.9}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: pylodstorage
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.9
|
|
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
|
-
|
|
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()
|
|
@@ -292,7 +292,12 @@ WHERE
|
|
|
292
292
|
# instance of {self.item.qlabel}
|
|
293
293
|
?item wdt:P31 wd:{self.item.qid}.{self.where}
|
|
294
294
|
}}"""
|
|
295
|
-
|
|
295
|
+
try:
|
|
296
|
+
count=self.sparql.getValue(query, "count")
|
|
297
|
+
except Exception as ex:
|
|
298
|
+
count=None
|
|
299
|
+
|
|
300
|
+
return count
|
|
296
301
|
|
|
297
302
|
def asText(self,long:bool=True):
|
|
298
303
|
'''
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: pylodstorage
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.9
|
|
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
|
|
|
File without changes
|
|
@@ -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
|
-
#
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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
|
-
|
|
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': [
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|