Skip to content

Experimental alternative Meltano Hub API built with FastAPI

License

Notifications You must be signed in to change notification settings

edgarrmondragon/hub-api

Repository files navigation

hub-api

Experimental 🧪 alternative Meltano Hub API, using the same underlying data as the official API.

Built with:

Usage

  1. Run the following command to start the API server:

    uv run --no-dev granian hub_api.main:app
  2. Configure Meltano to use the new API:

    meltano config meltano set hub_api_root "http://localhost:8000/meltano/api/v1"
  3. Run Meltano as usual.

    meltano add extractor tap-github
    meltano lock --all --update

Additional Features

This API also includes additional features that are not available in the official API.

Default Variant Endpoint

The /meltano/api/v1/plugins/<plugin type>/<plugin name>/default endpoint returns the default variant for a plugin.

Maintainers Endpoints

  • /meltano/api/v1/maintainers: Returns a list of maintainers for all plugins.
  • /meltano/api/v1/maintainers/<maintainer>: Returns details for a specific maintainer.

ETag Support

All endpoints respond with an ETag header, which can be used to check if the data has changed since the last request to save bandwidth.

$ curl -I http://localhost:8000/meltano/api/v1/plugins/index
HTTP/1.1 200 OK
server: granian
content-length: 217962
content-type: application/json
etag: "etag-df7f7bd3-946d-4f48-99ae-eb64639eb76c"
date: Sat, 18 Jan 2025 13:21:35 GMT
$ curl -I -X GET http://localhost:8000/meltano/api/v1/plugins/index -H 'If-None-Match: "etag-df7f7bd3-946d-4f48-99ae-eb64639eb76c"'
HTTP/1.1 304 Not Modified
server: granian
etag: "etag-df7f7bd3-946d-4f48-99ae-eb64639eb76c"
date: Sat, 18 Jan 2025 03:21:45 GMT

GZip Compression

Large responses are compressed using GZip to save bandwidth.

$ curl -I -X GET http://localhost:8000/meltano/api/v1/plugins/index
HTTP/1.1 200 OK
server: granian
content-length: 217962
content-type: application/json
etag: "etag-ad96ae68-5317-44c2-b700-0492035b741c"
date: Sat, 18 Jan 2025 03:26:20 GMT
$ curl -I -X GET http://localhost:8000/meltano/api/v1/plugins/index -H 'Accept-Encoding: gzip'
HTTP/1.1 200 OK
server: granian
content-length: 19895
content-type: application/json
content-encoding: gzip
vary: Accept-Encoding
etag: "etag-ad96ae68-5317-44c2-b700-0492035b741c"
date: Sat, 18 Jan 2025 03:26:32 GMT

About

Experimental alternative Meltano Hub API built with FastAPI

Topics

Resources

License

Stars

Watchers

Forks