MIME type constants and helpers used by ekglib components that need to work with content types.
This package is typically used indirectly by higher-level tools.
The module provides constants for common MIME types used in RDF and SPARQL operations:
MIME_TURTLE - text/turtleMIME_RDFXML - application/rdf+xmlMIME_NTRIPLES - application/n-triplesMIME_TRIG - application/trigMIME_NQUADS - application/n-quadsMIME_N3 - text/n3MIME_TRIX - application/trixMIME_JSONLD - application/ld+jsonMIME_SPARQLRESULTS_XML - application/sparql_endpoint-results+xmlMIME_SPARQLRESULTS_JSON - application/sparql_endpoint-results+jsonMIME_CSV - text/csvMIME_TSV - text/tsvcheck_sparql_mime_type(mime_type: str) -> bool - Validates that a MIME type is supported for SPARQL operationsfrom ekglib.mime import MIME_TURTLE, check_sparql_mime_type
# Use MIME type constants
content_type = MIME_TURTLE
# Validate MIME types
if check_sparql_mime_type('text/turtle'):
print("Valid SPARQL MIME type")