sparqly
SPARQL semantic translator and object-mapper for Python (wip).
Example
We define a query object as an instance of sparqly.Item, with the predicates
listed as attributes following the idiom of pretty_name = "actual name". For
example, to query Pre-Raphaelite aritsts on WikiData, the schema we define could
look like
from sparqly import Item
class Artist(Item):
movement = "wdt:P135"
instance_of = "wdt:P31"
We can then generate the query text for a selection with
from sparqly import query
q = query()
q.select(Artist).where(
movement = "wd:Q184814", # pre-raphaelite
instance_of = "wd:Q5" # human
)
print(q.all())
Which will print to the console:
SELECT ?Artist WHERE {
?Artist wdt:P135 wd:Q184814 ;
wdt:P31 wd:Q5 .
}
Changelog
Version 0.1.0:
- Object-Relational-Mapping (ORM)
SELECTWHERE
Planned Features
- Ability to attach service
CONSTRUCT/ASK/DESCRIBE- Filters like
ORDER,LIMIT,GROUP - More semantic support
- Additional methods for constructing queries depending on circumstance and complexity
Metadata
Release files for sparqly 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sparqly-0.1.1.tar.gz | 3.9 kB | Without provenance | Details for sparqly-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sparqly-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for sparqly-0.1.1-py3-none-any.whl |
Total release size: 20.1 kB
Release files / sparqly-0.1.1.tar.gz
| Download URL | sparqly-0.1.1.tar.gz |
|---|---|
| Size | 3.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4de5886e52719d4114a05bad79e07fe0207198f1ece24d225832e1efddfcd395
|
|
BLAKE2b-256 checksum How to use checksums |
5442a127bcb9f8d9ad93146c5d9118c06c5e1d22e7f38ee55e98db5717068ac3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.5
|
Release files / sparqly-0.1.1-py3-none-any.whl
| Download URL | sparqly-0.1.1-py3-none-any.whl |
|---|---|
| Size | 16.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1065183cd5e3435a7b04770f14dc9773895e755e4141049a53f35656641598d9
|
|
BLAKE2b-256 checksum How to use checksums |
7bd5337735ef651c2754765c8b329f625386e5c8ca7592d4d5cc2407199cd48c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.5
|
Security for sparqly 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.