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.0.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.0-py3-none-any.whl (13.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: graffl-0.9.0.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.0.tar.gz
Algorithm Hash digest
SHA256 de38a8071b45b2ccadc0e85b993f4be924fce0f8a8207e45d9e0e4e5f0858eaa
MD5 ef23f5f71eb9b69b34ccfb4f52f89a0d
BLAKE2b-256 ef598317e30f59ac09442f6e5a0aead08fe29b33c4e73dd39935dc0c4c77557d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: graffl-0.9.0-py3-none-any.whl
  • Upload date:
  • Size: 13.5 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bf1de465043551e8038f705cbfb4084e58ae4c9020992832e305f753ac970a0a
MD5 b194dd4afcf04681fcdff7f79c1e9277
BLAKE2b-256 56102015cb83b80ec5e560355af49221fff7de55fe28bc1928d82ee8b3d17bba

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