Anatoly Scherbakov
Anatoly Scherbakov
**Context.** Consider the following piece of code. ```python from classes import typeclass @typeclass def render(data_value) -> str: """Pretty-print a value.""" @render.instance(int) def _render_int(data_value: int) -> str: return f'🔢 {data_value}' render(True)...
**Context.** In order to define a default implementation (the one used if no other implementation matches), we currently have to write something like this: ```python from classes import typeclass @typeclass...
**Context.** I tried to subclass `rdflib.URIRef` and use it my code because I wanted to add additional functionality to it. **Expectations.** I expected a subclass of `URIRef` to work exactly...
Under RDFLIb 6.0.1, I am trying the following example: ```python import json from rdflib import Graph def test_rdflib_jsonld(): graph = Graph() graph.parse( data=json.dumps({ '@context': { '@import': 'ipfs://foo/bar/baz.json', }, }), format='json-ld',...
```python from pyld import jsonld from datetime import date jsonld.expand({'@context': {'@vocab': 'https://schema.org/'}, '@id': 'https://example.blog/post', 'publicationDate': datetime.date(2021, 1, 11)}) ``` Which gives: ```python ... File "{venv}/lib/python3.8/site-packages/pyld/jsonld.py", line 3523, in _expand_value if...
# Problem My PyLD version is 2.0.3 from pypi. The complete code for this issue is published at https://gist.github.com/anatoly-scherbakov/84a539d2f862d1792244168a3b970b57 I am trying to `expand()` a JSON-LD document like this: ```json...
While I listed all the atomic requirements earlier, actual API, based on the usage requirement, can be much more simpler and efficient with only two public functions: ``` get_all_mementos(urir) ->...
To ensure constant availability of every file loaded into IPFS from WARC archive, I would like to pin those files. I can see this can be rather straightforward: I only...
Such triples are illegal due to RDF standard, and they break at least some of the storage engines: see https://github.com/RDFLib/rdflib-sqlalchemy/issues/85 The full working example is here: https://gist.github.com/anatoly-scherbakov/ebde3d6b70ddde7f7b3baadb65d8464b I am not...
When using an `rdflib.ConjunctiveGraph`, OWL-RL creates its inferred triples in the default, unnamed graph. Is it possible to create them in a specific named graph instead, if so requested by...