PHPackages                             wikimedia/purtle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. wikimedia/purtle

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

wikimedia/purtle
================

Fast streaming RDF serializer

v2.0.0(1y ago)11698.1k↑50.9%11GPL-2.0-or-laterPHPPHP &gt;=7.4

Since Apr 29Pushed 1mo ago6 watchersCompare

[ Source](https://github.com/wikimedia/purtle)[ Packagist](https://packagist.org/packages/wikimedia/purtle)[ Docs](https://mediawiki.org/wiki/Purtle)[ RSS](/packages/wikimedia-purtle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)Dependencies (8)Versions (12)Used By (1)

Purtle
======

[](#purtle)

**Purtle** is a fast, lightweight RDF generator. It provides a "fluent" interface for generating RDF output in Turtle, JSON-LD, XML/RDF or N-Triples. The fluent interface allows the resulting PHP code to be structured just like Turtle notation for RDF, hence the name: "Purtle" is a contraction of "PHP Turtle".

The concrete classes implementing the common `RdfWriter` interface are:

- `TurtleRdfWriter` outputs Turtle
- `JsonLdRdfWriter` outputs JSON-LD
- `XmlRdfWriter` outputs XML/RDF
- `NTriplesRdfWriter` outputs N-Triples

The PHP code would look something like this:

```
$writer = new TurtleRdfWriter();

$writer->prefix( 'acme', 'http://acme.test/terms/' );

$writer->about( 'http://quux.test/Something' )
  ->a( 'acme', 'Thing' )
  ->say( 'acme', 'name' )->text( 'Thingy' )->text( 'Dingsda', 'de' )
  ->say( 'acme', 'owner' )->is( 'http://quux.test/' );
```

###  Health Score

55

—

FairBetter than 98% of packages

Maintenance67

Regular maintenance activity

Popularity44

Moderate usage in the ecosystem

Community27

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~346 days

Recently: every ~713 days

Total

10

Last Release

555d ago

Major Versions

v1.0.8 → v2.0.02024-11-10

PHP version history (5 changes)v1.0PHP &gt;=5.3.0

v1.0.4PHP &gt;=5.5.0

v1.0.6PHP &gt;=5.5.9

v1.0.8PHP &gt;=7.2.9

v2.0.0PHP &gt;=7.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/b94d9718c06ec7c3fd7a104bc44966fb7464b9ec7411582343ea35a7a6a85f08?d=identicon)[mediawiki](/maintainers/mediawiki)

![](https://www.gravatar.com/avatar/716c86d71cbf921e7912a505f89d799de398fc0a3af0bd4c8862834b2d642bd7?d=identicon)[wikimedia](/maintainers/wikimedia)

![](https://www.gravatar.com/avatar/054adb441e7ee248ec924bc45fa793835c284710eb31627587fa5de21bab9e96?d=identicon)[wmde](/maintainers/wmde)

![](https://www.gravatar.com/avatar/5406ed1d40d50ffc61d67e9f5149914dbfe0b8a52bdf297299f5ccfab0a73d91?d=identicon)[thiemowmde](/maintainers/thiemowmde)

![](https://www.gravatar.com/avatar/fe4220e5a109212ea1a84969fbcb0795ceaf975145c1f0577bd758d0500e6428?d=identicon)[manicki](/maintainers/manicki)

![](https://www.gravatar.com/avatar/181a5756e047a1e3a5544cd68caa9d6a9302952c5af826e2f36aabd0ca39b632?d=identicon)[smalyshev](/maintainers/smalyshev)

![](https://www.gravatar.com/avatar/48fe6db5961e3fbad563a1572db822d6a6ec79f607bf744c53098d970d79f890?d=identicon)[brightbyte](/maintainers/brightbyte)

---

Top Contributors

[![thiemowmde](https://avatars.githubusercontent.com/u/6576639?v=4)](https://github.com/thiemowmde "thiemowmde (41 commits)")[![umherirrender](https://avatars.githubusercontent.com/u/1174884?v=4)](https://github.com/umherirrender "umherirrender (14 commits)")[![jdforrester](https://avatars.githubusercontent.com/u/881572?v=4)](https://github.com/jdforrester "jdforrester (12 commits)")[![smalyshev](https://avatars.githubusercontent.com/u/155000?v=4)](https://github.com/smalyshev "smalyshev (11 commits)")[![cscott](https://avatars.githubusercontent.com/u/156080?v=4)](https://github.com/cscott "cscott (8 commits)")[![reedy](https://avatars.githubusercontent.com/u/67615?v=4)](https://github.com/reedy "reedy (7 commits)")[![legoktm](https://avatars.githubusercontent.com/u/81392?v=4)](https://github.com/legoktm "legoktm (5 commits)")[![addshore](https://avatars.githubusercontent.com/u/3308769?v=4)](https://github.com/addshore "addshore (3 commits)")[![JeroenDeDauw](https://avatars.githubusercontent.com/u/146040?v=4)](https://github.com/JeroenDeDauw "JeroenDeDauw (2 commits)")[![lucaswerkmeister](https://avatars.githubusercontent.com/u/2346599?v=4)](https://github.com/lucaswerkmeister "lucaswerkmeister (2 commits)")[![mariushoch](https://avatars.githubusercontent.com/u/2446964?v=4)](https://github.com/mariushoch "mariushoch (2 commits)")[![Krinkle](https://avatars.githubusercontent.com/u/156867?v=4)](https://github.com/Krinkle "Krinkle (1 commits)")[![DannyS712](https://avatars.githubusercontent.com/u/46829944?v=4)](https://github.com/DannyS712 "DannyS712 (1 commits)")[![Daimona](https://avatars.githubusercontent.com/u/38216014?v=4)](https://github.com/Daimona "Daimona (1 commits)")

---

Tags

serializerJSON-LDRDFTurtle

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/wikimedia-purtle/health.svg)

```
[![Health](https://phpackages.com/badges/wikimedia-purtle/health.svg)](https://phpackages.com/packages/wikimedia-purtle)
```

###  Alternatives

[masterminds/html5

An HTML5 parser and serializer.

1.8k242.8M229](/packages/masterminds-html5)[digitalbazaar/json-ld

A JSON-LD Processor and API implementation in PHP.

28555.4k1](/packages/digitalbazaar-json-ld)[goetas-webservices/xsd2php

Convert XSD (XML Schema) definitions into PHP classes and JMS metadata

2411.6M37](/packages/goetas-webservices-xsd2php)[goetas-webservices/xsd2php-runtime

Convert XSD (XML Schema) definitions into PHP classes

4910.9M36](/packages/goetas-webservices-xsd2php-runtime)[flix-tech/avro-serde-php

A library to serialize and deserialize Avro records making use of the confluent schema registry

674.0M17](/packages/flix-tech-avro-serde-php)[laminas/laminas-serializer

Serialize and deserialize PHP structures to a variety of representations

3411.2M115](/packages/laminas-laminas-serializer)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
