Skip to main content

A simple syntax for RDF.

Project description

graffl Logo

(pronounced g-raffl, but also derived from the Bavarian word "Graffl" meaning "stuff" or "junk")

Summary

graffl is a (still) experimental RDF scratch pad file format. Its purpose is to write something down that is immediately understood as graph data. No annoying syntax like dots or commas is required. Think of it as Markdown for RDF.

For example, the following graffl graph:

Alice likes -> Bob

written as Turtle:

@prefix ns1: <https://www.hedenus.de/graffl/76a04f61-342e-11f1-a289-e08f4ccbe174/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .

ns1:Alice rdfs:label "Alice" ;
    ns1:likes ns1:Bob .

It also supports OWL modeling and nested graphs!

See the documentation docs/graffl.adoc.

See the src/graffl/graffl.lark file for the EBNF grammar.

The parser is implemented as an extension for rdflib: https://github.com/rdflib/rdflib

The file format is used by rdf2graphml: https://github.com/mhedenus/rdf2graphml

CLI

The CLI command graffl converts one or more *.graffl files to TriG:

graffl [-h] [-V] [-o OUTPUT] [-v] [-d INPUT_DIR] [input_files ...]

The produced RDF is merged in one dataset. You can separate the graphs using the @context directive. If no output is specified, the result is printed to standard output.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

graffl-0.9.1.tar.gz (4.2 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

graffl-0.9.1-py3-none-any.whl (13.8 kB view details)

Uploaded Python 3

File details

Details for the file graffl-0.9.1.tar.gz.

File metadata

  • Download URL: graffl-0.9.1.tar.gz
  • Upload date:
  • Size: 4.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for graffl-0.9.1.tar.gz
Algorithm Hash digest
SHA256 1f9ea998d41a02a8bc7edc637040461d3cc6cd16f7bf9ca5a1b12049a5928f40
MD5 afdc7e8588c3a124f1886c49f7391d77
BLAKE2b-256 89f80b5221623bb20e1a6ac4080b93f0301920f45254a2776e4aa76545b4ccec

See more details on using hashes here.

File details

Details for the file graffl-0.9.1-py3-none-any.whl.

File metadata

  • Download URL: graffl-0.9.1-py3-none-any.whl
  • Upload date:
  • Size: 13.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for graffl-0.9.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6706f40dc89b3e818def2721a7b37298f5452edbe981c2ba0c5b1ee19f5e7325
MD5 5b6bc89fb7a7384014ba66f015197e2b
BLAKE2b-256 6015add9c1e8b9c258174b335acc9a75bbf3355e47fa0d13d57dfe1e7905dff4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page