Security News
PyPI’s New Archival Feature Closes a Major Security Gap
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
github.com/callidon/joseki
Joseki is a pure Go library for working with RDF, a powerful framework for representing informations as graphs.
For more informations about RDF itself, please see https://www.w3.org/TR/rdf11-concepts
Joseki provides the following features to work with RDF :
This package aims to work with RDF graphs, which are composed of RDF Triple {Subject Object Predicate}. Using joseki, you can represent an RDF Triple as followed :
import (
"github.com/Callidon/joseki/rdf"
"fmt"
)
subject := rdf.NewURI("http://example.org/book/book1")
predicate := rdf.NewURI("http://purl.org/dc/terms/title")
object := rdf.NewLiteral("Harry Potter and the Order of the Phoenix")
triple := rdf.NewTriple(subject, predicate, object)
fmt.Println(triple)
// Output : {<http://example.org/book/book1> <http://purl.org/dc/terms/title> "Harry Potter and the Order of the Phoenix"}
You can also store your RDF Triples in a RDF Graph, using various type of graphs. Here, we use a Tree Graph to store our triple :
import (
"github.com/Callidon/joseki/rdf"
"github.com/Callidon/joseki/graph"
)
subject := rdf.NewURI("http://example.org/book/book1")
predicate := rdf.NewURI("http://purl.org/dc/terms/title")
object := rdf.NewLiteral("Harry Potter and the Order of the Phoenix")
graph := graph.NewTreeGraph()
graph.Add(rdf.NewTriple(subject, predicate, object))
You can also query any triple from a RDF Graph, using a low level API or a SPARQL query.
import (
"github.com/Callidon/joseki/rdf"
"github.com/Callidon/joseki/graph"
"fmt"
)
graph := graph.NewTreeGraph()
// Datas stored in a file can be easily loaded into a graph
graph.LoadFromFile("datas/awesome-books.ttl", "turtle")
// Let's fetch the titles of all the books in our graph !
subject := rdf.NewVariable("title")
predicate := rdf.NewURI("http://www.w3.org/1999/02/22-rdf-syntax-ns#type")
object := rdf.NewURI("https://schema.org/Book")
for bindings := range graph.Filter(subject, predicate, object) {
fmt.Println(bindings)
}
For more informations about specific features, see the documentation
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
Research
Security News
Malicious npm package postcss-optimizer delivers BeaverTail malware, targeting developer systems; similarities to past campaigns suggest a North Korean connection.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.