Skip to main content

Python bindings for the prttl Turtle formatter

Project description

pyprttl

Python bindings for the Rust prttl Turtle formatter.

Installation

Python 3.11 or newer is required.

Install the published package from PyPI:

pip install pyprttl

If a wheel is not available for your platform, pip will build from source. Source builds require:

  • Python 3.11+
  • a Rust toolchain with cargo
  • git, because Cargo fetches the pinned prttl dependency from its upstream git repository

To install from a local checkout:

pip install .

To install in editable mode for development:

uv sync --group dev
uv pip install -e '.[test]'

This creates .venv/ and installs the build and test dependencies used by this project.

Building

Build an editable local extension module into the active virtual environment:

uv sync --group dev
.venv/bin/python -m maturin develop

Build a wheel:

uv sync --group dev
.venv/bin/python -m maturin build --release --locked --compatibility pypi

The wheel will be written to target/wheels/.

Build a source distribution:

uv sync --group dev
.venv/bin/python -m maturin sdist --out dist

Testing

Run the test suite with:

.venv/bin/python -m pytest -q

Usage

import pyprttl

formatted = pyprttl.format_turtle("@prefix ex: <http://example.com/> . ex:s ex:p ex:o .")

The package is built with maturin.

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

pyprttl-1.0.1.tar.gz (17.6 kB view details)

Uploaded Source

Built Distributions

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

pyprttl-1.0.1-cp311-abi3-win_amd64.whl (768.6 kB view details)

Uploaded CPython 3.11+Windows x86-64

pyprttl-1.0.1-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (995.5 kB view details)

Uploaded CPython 3.11+manylinux: glibc 2.17+ x86-64

pyprttl-1.0.1-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (952.4 kB view details)

Uploaded CPython 3.11+manylinux: glibc 2.17+ ARM64

pyprttl-1.0.1-cp311-abi3-macosx_11_0_arm64.whl (869.2 kB view details)

Uploaded CPython 3.11+macOS 11.0+ ARM64

File details

Details for the file pyprttl-1.0.1.tar.gz.

File metadata

  • Download URL: pyprttl-1.0.1.tar.gz
  • Upload date:
  • Size: 17.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pyprttl-1.0.1.tar.gz
Algorithm Hash digest
SHA256 4c9a506259be22f5eac2c498ce42157281a49a376dae97da2fa6b98cae9ca3bb
MD5 bbc37b8b3fe06ae4cbd23cdc8802efde
BLAKE2b-256 a68ab8761a868d8322712fcc29bc0d633bd99d5972ea1c8848f479ce33e1f92d

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyprttl-1.0.1.tar.gz:

Publisher: release.yml on rism-digital/pyprttl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyprttl-1.0.1-cp311-abi3-win_amd64.whl.

File metadata

  • Download URL: pyprttl-1.0.1-cp311-abi3-win_amd64.whl
  • Upload date:
  • Size: 768.6 kB
  • Tags: CPython 3.11+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pyprttl-1.0.1-cp311-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 39876010ef0f6a24664b0cb8824acdeff9effcee4d1bbe51e04b35f17347f874
MD5 47a9b07509ff9fcae54ad11c7b0ce2c6
BLAKE2b-256 5f80225162e2a22083b1db875cd3414b9ee6ce1ef0b4f20f2266c4f9af12346e

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyprttl-1.0.1-cp311-abi3-win_amd64.whl:

Publisher: release.yml on rism-digital/pyprttl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyprttl-1.0.1-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pyprttl-1.0.1-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bd401373a5e8700247572bb87f1dc99c2db838e29a424c10bbf498c41cd9f310
MD5 8f7a59e3c6dce7b744fcd5951e586d37
BLAKE2b-256 496ae3dd5d2eb3c6239db79b6240fb21c32864935878587c1b008d83ebd306c4

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyprttl-1.0.1-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release.yml on rism-digital/pyprttl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyprttl-1.0.1-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for pyprttl-1.0.1-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 47168a5c164c6ecb78bf9635f2dc9df921bc96c46e323fa87ed09e092aef2a70
MD5 fb432d05c1afb56c0df716c348918a4e
BLAKE2b-256 228e21eb418275bc72c166f5a8f298dee1e55bd192f707455fc918b9ec3cba7d

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyprttl-1.0.1-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: release.yml on rism-digital/pyprttl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyprttl-1.0.1-cp311-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pyprttl-1.0.1-cp311-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3b293dbb54fa3fea561d72478217a325fffd4e79180d808ab795be13f43a4553
MD5 648534de83b8af0b881e1cba9135f32a
BLAKE2b-256 6dfcbf8b93aeed43efbfa54364c60db5343c1a909890336fdf903eeaa6816dbd

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyprttl-1.0.1-cp311-abi3-macosx_11_0_arm64.whl:

Publisher: release.yml on rism-digital/pyprttl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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