TurtleFmt
turtlefmt is an auto formatter for RDF Turtle under Apache 2 license.
Installation
It is currently distributed on:
Build from source requires NodeJS 6.0+ to be available in your PATH.
Usage
To use it:
turtlefmt MY_TURTLE_FILE.ttl
It is also possible to check if formatting of a given file is valid according to the formatter using:
turtlefmt --check MY_TURTLE_FILE.ttl
If the formatting is not valid, a patch to properly format the file is written to the standard output.
It is also possible to check a complete directory (and its subdirectories):
turtlefmt MY_DIR
Format
turtlefmt is in development and its output format is not stable yet.
Example:
@prefix ex: <http://example.com/> . # Prefix
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
# Some facts
<s> a ex:Foo ;
<p> "foo"@en , ( +01 +1.0 1.0e0 ) . # Foo
# An anonymous blank node
[ ex:p ex:o , ex:o2 ; ex:p2 ex:o3 ] ex:p3 true . # Bar
For now, it:
- Validates that the file is valid.
- Maintains consistent indentation and line jumps.
- Normalises string and IRI escapes to reduce their number as much as possible.
- Enforces the use of
"instead of'in literals. - Uses literals short notation for booleans, integers, decimals and doubles when it keeps the lexical representation unchanged.
- Uses
aforrdf:typewhere possible.
License
Copyright 2022 Helsing GmbH
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Release files for turtlefmt 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| turtlefmt-0.1.2-py3-none-win_amd64.whl | Python 3 | none | Windows x86-64 | Details |
| turtlefmt-0.1.2-py3-none-musllinux_1_2_x86_64.whl | Python 3 | none | Linux musl 1.2+ x86-64 | Details |
| turtlefmt-0.1.2-py3-none-manylinux_2_28_x86_64.whl | Python 3 | none | Linux glibc 2.28+ x86-64 | Details |
| turtlefmt-0.1.2-py3-none-manylinux_2_28_aarch64.whl | Python 3 | none | Linux glibc 2.28+ ARM64 | Details |
| turtlefmt-0.1.2-py3-none-macosx_11_0_arm64.whl | Python 3 | none | macOS 11.0+ ARM64 | Details |
| turtlefmt-0.1.2-py3-none-macosx_10_12_x86_64.whl | Python 3 | none | macOS 10.12+ x86-64 | Details |
Total release size: 3.3 MB
Release files / turtlefmt-0.1.2-py3-none-win_amd64.whl
| Download URL | turtlefmt-0.1.2-py3-none-win_amd64.whl |
|---|---|
| Size | 410.3 kB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
d7dce0b5bfd65f6f0c88181fb93495fb88f6925b64faffe5624b056203a964c9
|
|
BLAKE2b-256 checksum How to use checksums |
b0bb757cf2b71d4d7f483bc3b78ff118925dac609f1c5181e64e6f324fe01986
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.0.1 CPython/3.12.8
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 30, 2024.
Transparency logRelease files / turtlefmt-0.1.2-py3-none-musllinux_1_2_x86_64.whl
| Download URL | turtlefmt-0.1.2-py3-none-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 637.4 kB |
| Tags | Linux musl 1.2+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
8831390a8ba76805bf4e90b90519aede193fbc15967ca391809bead3355f1acd
|
|
BLAKE2b-256 checksum How to use checksums |
b2b27c53877a4bf94c2a514dcf12d33b61e896268864a000f3a14d64a3ded650
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.0.1 CPython/3.12.8
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 30, 2024.
Transparency logRelease files / turtlefmt-0.1.2-py3-none-manylinux_2_28_x86_64.whl
| Download URL | turtlefmt-0.1.2-py3-none-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 586.2 kB |
| Tags | Linux glibc 2.28+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
2b18fac19ae0d4286b6e47ee5749c0af48ed3d2e292b05102887cdf27ec7eb2d
|
|
BLAKE2b-256 checksum How to use checksums |
9cc85570c7f0d3f1ebc5f11bf1f50f3065f962ea5ab50ed66061668932ba345e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.0.1 CPython/3.12.8
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 30, 2024.
Transparency logRelease files / turtlefmt-0.1.2-py3-none-manylinux_2_28_aarch64.whl
| Download URL | turtlefmt-0.1.2-py3-none-manylinux_2_28_aarch64.whl |
|---|---|
| Size | 573.0 kB |
| Tags | Linux glibc 2.28+ ARM64 Python 3 |
|
SHA-256 checksum How to use checksums |
a7789bafe9442190547ccd95b2e166575e5b366be0cb9d6e5a044d4c07f153c1
|
|
BLAKE2b-256 checksum How to use checksums |
53174633b52ea1a267c07f8c7561f04cf8b7ca2e6d66d2c045e401ff80a84eea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.0.1 CPython/3.12.8
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 30, 2024.
Transparency logRelease files / turtlefmt-0.1.2-py3-none-macosx_11_0_arm64.whl
| Download URL | turtlefmt-0.1.2-py3-none-macosx_11_0_arm64.whl |
|---|---|
| Size | 526.5 kB |
| Tags | Python 3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
f42f0961587058fc7969e6d415c33f2b1a5be6597cb254c0db455b28655484b6
|
|
BLAKE2b-256 checksum How to use checksums |
58d527a9d782c688168f8c5406869c365849cb41807387cfd542f159b303adbc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.0.1 CPython/3.12.8
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 30, 2024.
Transparency logRelease files / turtlefmt-0.1.2-py3-none-macosx_10_12_x86_64.whl
| Download URL | turtlefmt-0.1.2-py3-none-macosx_10_12_x86_64.whl |
|---|---|
| Size | 548.7 kB |
| Tags | Python 3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
81b7741736422e3c49bfbbf3d0412822269659bb2310d7b1f49ee3b97d15bb37
|
|
BLAKE2b-256 checksum How to use checksums |
695dc4db5230fb407fd31521e434e554f3ad5060712ac18d2109d9e90d334d3d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.0.1 CPython/3.12.8
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 30, 2024.
Transparency log