Pleiades dataset API wrapper
Get the code for the Pleiades Dataset API Wrapper at https://github.com/vedph/pleiades-api
In the context of several projects related to the Classical world, ranging from general-purpose content creation frameworks for digital editions (Cadmus) to more specialized tools like meta-repositories of epigraphic documents, I have often found myself in need of a quick way to use the Pleiades database through an API service, from both frontend and backend solutions. To this end, I created a simple command-line interface (CLI) tool for importing Pleiades JSON data into an ad-hoc designed relational database management system (RDBMS) (primarily Postgres with Postgis), quickly index it, and provide an application programming interface (API) service to lookup places with a combination of search parameters. Even if until now I had no need for adding more optional features (like authentication, balancing, and the like), this could be accomplished in a few hours’ work, as the infrastructure is already in place. Also, the API service is ready to be containerized into Docker, also providing data dumps from Postgres to be automatically imported during container startup. This allows firing up a fully working API service with cross-origin resource sharing (CORS) support, Swagger frontend and fresh data in a few minutes. When an updated version of Pleiades comes out, you just have to rebuild the container with a new data dump. Of course, once the CLI tool has imported the database, you can also bypass my service completely and use the database as you prefer. The CLI tool also provides a command to interactively build SQL code to query the database. Full source code is available at https://github.com/vedph/pleiades-api.