Package: pyldapi
Welcome to pyLDAPIThe Python Linked Data API (pyLDAPI) is:A very small module to add Linked Data API functionality to a Python FastAPI installation.What is it?This module contains a small Python module which is intended to be added (imported) into aFastAPI(v4.x +) orPython Flask(v3.x) installation to add a small library ofRendererclasses which can be used to handle requests and return responses in a manner consistent withLinked Dataprinciples of operation.The intention is to make it easy to “Linked Data-enable” web APIs.An API using this module will get:analt profilefor each endpoint that uses aRendererclass to return responses that the API deliversthis is aprofile, orviewof the resource that lists all other available profilesaRegister of Registersa start-up function that auto-generates a Register of Registers is run when the API is launched.a basic, over-writeable template for Registers’ HTML & RDFall of the functionality defined by the W3C’sContent Negotiation by Profilespecificationto allow for requests of content that conform to data specifications and profilesThe main parts of pyLDAPI are as follows:Web requests arrive at a Web Server, such asApacheornginx, which then forwards (some of) them on toFastAPI, a Python web framework. FastAPI calls Python functions for web requests defined in a request/function mapping and may call pyLDAPI elements. FastAPI need not call pyLDAPI for all requests, just as Apache/nginx need not forward all web request to FastAPI. pyLDAPI may then draw on any Python data source, such as database APIs, and uses therdflibPython module to formulate RDF responses.DefinitionsAlt ProfileThemodel viewthat lists all other views. This API uses the definition ofAlternate Profiles Data Model as an OWL ontologypresented athttps://www.w3.org/TR/dx-prof-conneg/#altr-owl.Linked Data PrinciplesThe principles of making things available over the internet in both human and machine-readable forms. Codified by the World Wide Web Consortium. Seehttps://www.w3.org/standards/semanticweb/data.Model ViewA set of properties of a Linked Data object codified according to a standard or profile of a standard.ObjectAny individual thing delivered according toLinked Dataprinciples.RegisterA simple listing of URIs of objects, delivered according toLinked Data principles.Register of RegistersAregisterthat lists all other registers which this API provides.pyLDAPI in actionRegister of Media Typeshttps://w3id.org/mediatype/Linked Data version of the Geocoded National Address Filehttp://linked.data.gov.au/dataset/gnafParts of the GNAF implementationGeoscience Australia’s Sites, Samples Surveys Linked Data APIhttp://pid.geoscience.gov.au/sample/Linked Data version of the Australian Statistical Geography Standard producthttp://linked.data.gov.au/dataset/asgsParts of the ASGS implementationDocumentationDetailed documentation can be found athttps://pyldapi.readthedocs.io/LicenceThis is licensed under GNU General Public License (GPL) v3.0. See theLICENSE deedfor more details.ContactDr Nicholas Car (lead)Data Systems ArchitectSURROUND Australia Pty Ltdnicholas.car@surroundaustralia.comhttps://orcid.org/0000-0002-8742-7730Ashley Sommer (senior developer)Informatics Software EngineerCSIRO Land and Waterashley.sommer@csiro.auRelated workpyLDAPI ClientA Simple helper library for consuming registers, indexes, and instances of classes exposed via a pyLDAPI endpoint.Changelog4.xVersion 4+ uses FastAPI, not Flask. For Flask, use <=3.113.11tokens applied to Representations in Alternate View profile, not Profiles3.0Content Negotiation specification by Profile supportedreplaced all references to “format” with “Media Type” and “view” with “profile”renamed class View to Profileadded unit tests for all profile functionsadded unit tests for main ConnegP functions