Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ListOfDict Support #160

Open
WolfgangFahl opened this issue Aug 18, 2020 · 4 comments
Open

ListOfDict Support #160

WolfgangFahl opened this issue Aug 18, 2020 · 4 comments

Comments

@WolfgangFahl
Copy link

WolfgangFahl commented Aug 18, 2020

To make life easier for Python developers a "ListOfDict" support would be nice as implemented in
https://github.com/WolfgangFahl/pyLoDStorage/blob/master/lodstorage/sparql.py
and tested in https://github.com/WolfgangFahl/pyLoDStorage/blob/master/tests/testSPARQL.py

see also http://wiki.bitplan.com/index.php/PyLoDStorage#SPARQL_unit_test

It allows for round-trip handling of list of dicts with native python datatypes and currently works for

  • string
  • boolean
  • int
  • float
  • date
  • datetime

What do you suggest about this Change Request?

I am offering to make this a separate OS project and make it availabe via pypi comparable to https://lawlesst.github.io/notebook/sparql-dataframe.html

Another way would be to directly integrate the code in sparqlwrapper.

@nicholascar
Copy link
Member

In discussion with another RDFlib maintainer, it would be great to see this added to SPARQLWrapper. SPARQLWrapper is working well and extensions to it to export more modern data objects are to be encourage.

There are a couple of issues with the maintenance of SPARQLWrapper, mainly that the tests need some revision to see whey they always seem to have a couple of failures (see each PR in https://github.com/RDFLib/sparqlwrapper/pulls is failing) but, once this issue is fixed, it would be great to see a PR for this and have it merged.

@WolfgangFahl
Copy link
Author

@nicholascar for the time being i decided to make this a separate project since I'd also like to get SQL and JSON support and may be later CVS and Dgraph and so on.

https://github.com/WolfgangFahl/pyLoDStorage

is the project it's available via https://pypi.org/project/pylodstorage/ and WolfgangFahl/pyLoDStorage#6 is the issue which introduces the SPARQL support.

@dhimmel
Copy link

dhimmel commented Oct 6, 2020

@WolfgangFahl can you update your original comment to use commit-hash versioned links (links are currently broken).

A way to get results as a list of dicts, where values used Python types, would be really nice. It would make addressing #125 much easier.

@WolfgangFahl
Copy link
Author

@dhimmel indeed it's better to have the links updated after the refactoring from the test project to the one that is already released and maintained and in use. If you'd like to get the pandas support integrated please file an issue at https://github.com/WolfgangFahl/pyLoDStorage/issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants