Skip to content

A lightweight experimental credential-less service with queues, tables, blobs, trees and templates

License

Notifications You must be signed in to change notification settings

LostSavannah/bureaucrat

Repository files navigation

NuGet version (Bureaucrat.Core) Docker image (bureaucrat) Pypi package (pybureaucrat) Nightly builds

Simple queues, blobs, tables, trees and templates

Admin site

In the hosting machine you can access the admin site in this location: http://localhost:19970/

Queues

Bureacrat uses a very straightfoward in-memory queue paradigm. Every queue gets created when needed (when any queue or dequeue operation is requested in a queue). Futhermore every queue can be deleted on demand.

method path name
GET /queues/ Lists every queue
GET /queues/{name} Dequeues from the {name} queue
POST /queues/{name} Enqueues in the {name} queue
DELETE /queues/{name} Deletes the {name} queue

Blobs

The blob service consists in a simple plain storage. The name given to any blob is purely logic. The physical location for every blob is set by the BUREAUCRAT_BLOBS_ROOT environment variable, which should point to an existing writable folder.

method path name
GET /blobs/{full_path} Get the index of the logic {full_path} location
GET /blobs/download:{full_path} Downloads the blob in the logic {full_path} location
GET /blobs/raw:{full_path} Gets the content of the blob in the logic {full_path} location as a base64 string
POST /blobs/{full_path} Writes a file in the logic {full_path} location
DELETE /blobs/{full_path} Deletes the file in the logic {full_path} location

Tables

This service is just a backend for sqlite3 databases. The root path for every database is set by the BUREAUCRAT_TABLES_DATABASE environment variable, which should point to an existing writable folder.

method path name
GET /tables/ List every database
GET /tables/{database} List every table in the {database}
POST /tables/{database} Executes in the {database} the query sent in the body and returns the result
GET /tables/{database}/{table} Retrieves every record in the {table} in the {database}

Trees

The trees service is just a bunch of folders with some json files. Folders are called forests and json files are called trees. You can freely navigate and update any tree inside any forest. The physical location for the root of every forest is set in the BUREAUCRAT_TREES_ROOT environment variable, which should point to an existing writable folder.

method path name
GET /trees/ List every available forest
GET /trees/{forest} Lists every available tree in the {forest}
GET /trees/{forest}/{tree}/index:{path} Gets the index for the node located in the {path} inside the {tree} belonging to the specified {forest}
GET /trees/{forest}/{tree}/{path} Gets the content of the node located in the {path} inside the {tree} belonging to the specified {forest}
POST /trees/{forest}/{tree}/{path} Sets the content of the node located in the {path} inside the {tree} belonging to the specified {forest}

Templates

The templates service allows you to manage documents templates, and parse and export them. The supported parsing engines include mako and jinja2. Also, you can export to pdf or docx.

method path name
GET /templates/template List every available template
GET /trees/render Lists every available render
GET /trees/parser Lists every available parser
GET /templates/template/{template} Gets the content of the template {template}
POST /templates/template/{template} Sets the content of the template {template}, creating it if not exists
DELETE /templates/template/{template} Deletes the template {template}
PUT /templates/template/{template}?render={render}&parser={parser} Parses the template {template} with the given data, using the render {render} and {parser} parser.

dev.moradev.dev