![PyPI Now Supports iOS and Android Wheels for Mobile Python Development](https://cdn.sanity.io/images/cgdhsj6q/production/96416c872705517a6a65ad9646ce3e7caef623a0-1024x1024.webp?w=400&fit=max&auto=format)
Security News
PyPI Now Supports iOS and Android Wheels for Mobile Python Development
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
@treecg/actor-init-ldes-client
Advanced tools
An init actor that fetches members from an Event Stream API
Metadata harvester for a Linked Data Event Stream.
npm install -g @treecg/actor-init-ldes-client
In order to use it as a library, you can leave out the -g
.
actor-init-ldes-client --parameter ${PARAMETER} ${URL}
Possible parameters:
Parameter | Description | Possible values |
---|---|---|
pollingInterval | Number of milliseconds before refetching uncacheable fragments | for example: 5000 |
mimeType | the MIME type of the output | application/ld+json, text/turtle... |
context | path to a file with the JSON-LD context you want to use when MIME type is application/ld+json | for example: ./context.jsonld |
fromTime | datetime to prune relations that have a lower datetime value | for example: 2020-01-01T00:00:00 |
emitMemberOnce | whether to emit a member only once, because collection contains immutable version objects. | true / false |
Example commando with parameters:
actor-init-ldes-client --pollingInterval 5000 --mimeType application/ld+json --context context.jsonld --fromTime 2021-02-03T15:48:12.309Z --emitMemberOnce true https://lodi.ilabt.imec.be/coghent/dmg/objecten
The easiest way to create an engine (with default config) is as follows:
const newEngine = require('@treecg/actor-init-ldes-client').newEngine;
const LDESClient = new newEngine();
With the engine or client created, you can now use it to call te async createReadStream(url, options)
method.
Here is an example synchronizing with a TREE root node of an Event Stream with polling interval of 5 seconds:
main()
function main() {
try {
let url = "https://lodi.ilabt.imec.be/coghent/dmg/objecten";
let options = {
"pollingInterval": 5000, // millis
"mimeType": "application/ld+json",
"fromTime": new Date("2021-02-03T15:46:12.307Z"),
"emitMemberOnce": true,
"jsonLdContext": {
"@context": [
"https://data.vlaanderen.be/doc/applicatieprofiel/cultureel-erfgoed-object/kandidaatstandaard/2020-07-17/context/cultureel-erfgoed-object-ap.jsonld",
"https://data.vlaanderen.be/context/persoon-basis.jsonld",
"https://brechtvdv.github.io/demo-data/cultureel-erfgoed-event-ap.jsonld",
{
"dcterms:isVersionOf": {
"@type": "@id"
},
"prov": "http://www.w3.org/ns/prov#"
}
]
}
};
let eventstreamSync = LDESClient.createReadStream(url, options);
eventstreamSync.on('data', (data) => {
let obj = JSON.parse(data)
console.log(obj)
});
eventstreamSync.on('end', () => {
console.log("No more data!")
});
} catch (e) {
console.error(e);
}
}
v2.0.7 - 2021-03-08
<a name="v2.0.6"></a>
FAQs
An init actor that fetches members from an Event Stream API
The npm package @treecg/actor-init-ldes-client receives a total of 37 weekly downloads. As such, @treecg/actor-init-ldes-client popularity was classified as not popular.
We found that @treecg/actor-init-ldes-client demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 9 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.