ontolutils 0.4.3__tar.gz → 0.4.4__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. {ontolutils-0.4.3 → ontolutils-0.4.4}/PKG-INFO +1 -1
  2. {ontolutils-0.4.3 → ontolutils-0.4.4}/ontolutils/classes/thing.py +8 -2
  3. {ontolutils-0.4.3 → ontolutils-0.4.4}/ontolutils/utils/qudt_units.py +2 -1
  4. {ontolutils-0.4.3 → ontolutils-0.4.4}/ontolutils.egg-info/PKG-INFO +1 -1
  5. {ontolutils-0.4.3 → ontolutils-0.4.4}/setup.cfg +1 -1
  6. {ontolutils-0.4.3 → ontolutils-0.4.4}/LICENSE +0 -0
  7. {ontolutils-0.4.3 → ontolutils-0.4.4}/README.md +0 -0
  8. {ontolutils-0.4.3 → ontolutils-0.4.4}/ontolutils/__init__.py +0 -0
  9. {ontolutils-0.4.3 → ontolutils-0.4.4}/ontolutils/_version.py +0 -0
  10. {ontolutils-0.4.3 → ontolutils-0.4.4}/ontolutils/cache.py +0 -0
  11. {ontolutils-0.4.3 → ontolutils-0.4.4}/ontolutils/classes/__init__.py +0 -0
  12. {ontolutils-0.4.3 → ontolutils-0.4.4}/ontolutils/classes/decorator.py +0 -0
  13. {ontolutils-0.4.3 → ontolutils-0.4.4}/ontolutils/classes/query_util.py +0 -0
  14. {ontolutils-0.4.3 → ontolutils-0.4.4}/ontolutils/classes/typing.py +0 -0
  15. {ontolutils-0.4.3 → ontolutils-0.4.4}/ontolutils/classes/utils.py +0 -0
  16. {ontolutils-0.4.3 → ontolutils-0.4.4}/ontolutils/namespacelib/__dev.py +0 -0
  17. {ontolutils-0.4.3 → ontolutils-0.4.4}/ontolutils/namespacelib/__init__.py +0 -0
  18. {ontolutils-0.4.3 → ontolutils-0.4.4}/ontolutils/namespacelib/_iana_utils.py +0 -0
  19. {ontolutils-0.4.3 → ontolutils-0.4.4}/ontolutils/namespacelib/codemeta.py +0 -0
  20. {ontolutils-0.4.3 → ontolutils-0.4.4}/ontolutils/namespacelib/m4i.py +0 -0
  21. {ontolutils-0.4.3 → ontolutils-0.4.4}/ontolutils/namespacelib/obo.py +0 -0
  22. {ontolutils-0.4.3 → ontolutils-0.4.4}/ontolutils/namespacelib/qudt_kind.py +0 -0
  23. {ontolutils-0.4.3 → ontolutils-0.4.4}/ontolutils/namespacelib/qudt_unit.py +0 -0
  24. {ontolutils-0.4.3 → ontolutils-0.4.4}/ontolutils/namespacelib/schema.py +0 -0
  25. {ontolutils-0.4.3 → ontolutils-0.4.4}/ontolutils/namespacelib/ssno.py +0 -0
  26. {ontolutils-0.4.3 → ontolutils-0.4.4}/ontolutils/utils/__init__.py +0 -0
  27. {ontolutils-0.4.3 → ontolutils-0.4.4}/ontolutils.egg-info/SOURCES.txt +0 -0
  28. {ontolutils-0.4.3 → ontolutils-0.4.4}/ontolutils.egg-info/dependency_links.txt +0 -0
  29. {ontolutils-0.4.3 → ontolutils-0.4.4}/ontolutils.egg-info/requires.txt +0 -0
  30. {ontolutils-0.4.3 → ontolutils-0.4.4}/ontolutils.egg-info/top_level.txt +0 -0
  31. {ontolutils-0.4.3 → ontolutils-0.4.4}/pyproject.toml +0 -0
  32. {ontolutils-0.4.3 → ontolutils-0.4.4}/setup.py +0 -0
  33. {ontolutils-0.4.3 → ontolutils-0.4.4}/tests/test_classes.py +0 -0
  34. {ontolutils-0.4.3 → ontolutils-0.4.4}/tests/test_decorator.py +0 -0
  35. {ontolutils-0.4.3 → ontolutils-0.4.4}/tests/test_namespaces.py +0 -0
  36. {ontolutils-0.4.3 → ontolutils-0.4.4}/tests/test_query.py +0 -0
  37. {ontolutils-0.4.3 → ontolutils-0.4.4}/tests/test_readme.py +0 -0
  38. {ontolutils-0.4.3 → ontolutils-0.4.4}/tests/test_typing.py +0 -0
  39. {ontolutils-0.4.3 → ontolutils-0.4.4}/tests/test_utils.py +0 -0
  40. {ontolutils-0.4.3 → ontolutils-0.4.4}/tests/test_version.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ontolutils
3
- Version: 0.4.3
3
+ Version: 0.4.4
4
4
  Summary: Utility library for the work with ontologies.
5
5
  Home-page: https://github.com/matthiasprobst/ontology-utils
6
6
  Author: Matthias Probst
@@ -44,8 +44,11 @@ def resolve_iri(key_or_iri: str, context: Context) -> Optional[str]:
44
44
  return 'http://www.w3.org/2000/01/rdf-schema#label'
45
45
  return
46
46
 
47
+
47
48
  def build_blank_n3():
48
49
  return rdflib.BNode().n3()
50
+
51
+
49
52
  @namespaces(owl='http://www.w3.org/2002/07/owl#',
50
53
  rdfs='http://www.w3.org/2000/01/rdf-schema#')
51
54
  @urirefs(Thing='owl:Thing', label='rdfs:label')
@@ -290,7 +293,8 @@ class Thing(ThingModel):
290
293
  exclude_none: bool = True,
291
294
  rdflib_serialize: bool = False,
292
295
  resolve_keys: bool = True,
293
- assign_bnode: bool = True) -> str:
296
+ assign_bnode: bool = True,
297
+ indent: int = 4) -> str:
294
298
  """Similar to model_dump_json() but will return a JSON string with
295
299
  context resulting in a JSON-LD serialization. Using `rdflib_serialize=True`
296
300
  will use the rdflib to serialize. This will make the output a bit cleaner
@@ -315,6 +319,8 @@ class Thing(ThingModel):
315
319
  explained in the context.
316
320
  assign_bnode: bool=True
317
321
  Assigns a blank node if no ID is set.
322
+ indent: int=4
323
+ The indent of the JSON-LD string
318
324
 
319
325
  .. seealso:: `Thing.get_jsonld_dict`
320
326
 
@@ -343,7 +349,7 @@ class Thing(ThingModel):
343
349
 
344
350
  return g.serialize(format='json-ld',
345
351
  context=_context,
346
- indent=4)
352
+ indent=indent)
347
353
 
348
354
  def __repr__(self, limit: Optional[int] = None):
349
355
  _fields = {k: getattr(self, k) for k in self.model_fields if getattr(self, k) is not None}
@@ -1,7 +1,8 @@
1
+ from typing import Optional
2
+
1
3
  import rdflib
2
4
 
3
5
  from ontolutils import QUDT_UNIT
4
- from typing import Optional
5
6
 
6
7
  qudt_lookup = {
7
8
  's': QUDT_UNIT.SEC, # time
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ontolutils
3
- Version: 0.4.3
3
+ Version: 0.4.4
4
4
  Summary: Utility library for the work with ontologies.
5
5
  Home-page: https://github.com/matthiasprobst/ontology-utils
6
6
  Author: Matthias Probst
@@ -1,6 +1,6 @@
1
1
  [metadata]
2
2
  name = ontolutils
3
- version = 0.4.3
3
+ version = 0.4.4
4
4
  author = Matthias Probst
5
5
  author_email = matthias.probst@kit.edu
6
6
  description = Utility library for the work with ontologies.
File without changes
File without changes
File without changes
File without changes