Prometheus exporter for Starlette and FastAPI

Overview

starlette_exporter

Prometheus exporter for Starlette and FastAPI.

The middleware collects basic metrics:

  • Counter: starlette_requests_total
  • Histogram: starlette_request_duration_seconds

Metrics include labels for the HTTP method, the path, and the response status code.

starlette_requests_total{method="GET",path="/",status_code="200"} 1.0
starlette_request_duration_seconds_bucket{le="0.01",method="GET",path="/",status_code="200"} 1.0

Use the HTTP handler handle_metrics at path /metrics to expose a metrics endpoint to Prometheus.

Usage

pip install starlette_exporter

Starlette

from starlette.applications import Starlette
from starlette_exporter import PrometheusMiddleware, handle_metrics

app = Starlette()
app.add_middleware(PrometheusMiddleware)
app.add_route("/metrics", handle_metrics)

...

FastAPI

from fastapi import FastAPI
from starlette_exporter import PrometheusMiddleware, handle_metrics

app = FastAPI()
app.add_middleware(PrometheusMiddleware)
app.add_route("/metrics", handle_metrics)

...

Options

app_name: Sets the value of the app_name label for exported metrics (default: starlette).

prefix: Sets the prefix of the exported metric names (default: starlette).

group_paths: setting this to True will populate the path label using named parameters (if any) in the router path, e.g. /api/v1/items/{item_id}. This will group requests together by endpoint (regardless of the value of item_id). This option may come with a performance hit for larger routers. Default is False, which will result in separate metrics for different URLs (e.g., /api/v1/items/42, /api/v1/items/43, etc.).

filter_unhandled_paths: setting this to True will cause the middleware to ignore requests with unhandled paths (in other words, 404 errors). This helps prevent filling up the metrics with 404 errors and/or intentially bad requests. Default is False.

buckets: accepts an optional list of numbers to use as histogram buckets. The default value is None, which will cause the library to fall back on the Prometheus defaults (currently [0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5, 0.75, 1.0, 2.5, 5.0, 7.5, 10.0]).

Example:

app.add_middleware(PrometheusMiddleware, app_name="hello_world", group_paths=True, prefix='myapp', buckets=[0.1, 0.25, 0.5])

Custom Metrics

starlette_exporter will export all the prometheus metrics from the process, so custom metrics can be created by using the prometheus_client API.

Example:

from prometheus_client import Counter
from starlette.responses import RedirectResponse

REDIRECT_COUNT = Counter("redirect_total", "Count of redirects", ("from",))

async def some_view(request):
    REDIRECT_COUNT.labels(from="some_view").inc()
    return RedirectResponse(url="https://example.com", status_code=302)

The new metric will now be included in the the /metrics endpoint output:

...
redirect_total{from="some_view"} 2.0
...

Developing

git clone https://github.com/stephenhillier/starlette_exporter
cd starlette_exporter
pytest tests

License

Code released under the Apache License, Version 2.0.

Dependencies

https://github.com/prometheus/client_python

https://github.com/encode/starlette

Credits

Starlette - https://github.com/encode/starlette

FastAPI - https://github.com/tiangolo/fastapi

Flask exporter - https://github.com/rycus86/prometheus_flask_exporter

Alternate Starlette exporter - https://github.com/perdy/starlette-prometheus

Comments
  • New Default Metric: Requests In Progress

    New Default Metric: Requests In Progress

    Addressed issue #26 in this PR. Along with that, I've made some additional changes too.

    1. Added pytest dependency into requirements.txt.
    2. Minor correction in README.md.

    image

    This is my very first contribution to an external open source project. Feel free to comment on the contribution and I'll be glad to learn and improve. Thank you.

    opened by scotgopal 11
  • gunicorn doesn't work

    gunicorn doesn't work

    I can generate correct Prometheus metrics with gunicorn when it's worker is only 1. (I check the gauge is correct) But when I increase the worker to 2, the gauge is not correct anymore.

    And I add this environment, the result is the metric page is empty now. export PROMETHEUS_MULTIPROC_DIR=/home/ubuntu/ap/tmp

    I also try to add the code, but it's still show empty. Any suggestion?

    from prometheus_client import multiprocess
    
    def child_exit(server, worker):
        multiprocess.mark_process_dead(worker.pid)
    
    opened by dennys 7
  • status_code displays enum name in stats

    status_code displays enum name in stats

    When using code like the example below (with fastapi in this case)

    from starlette_exporter import PrometheusMiddleware, handle_metrics
    from http import HTTPStatus
    from fastapi import FastAPI, HTTPException, Response
    import uvicorn
    
    app = FastAPI()
    app.add_middleware(PrometheusMiddleware)
    app.add_route("/metrics", handle_metrics)
    
    
    @app.get("/")
    async def root():
        return Response(status_code=HTTPStatus.OK)
    
    
    @app.get("/200")
    async def root():
        return {"I am returning 200"}
    
    
    @app.get("/500")
    async def root():
        raise HTTPException(status_code=500)
        return {"I am returning 200"}
    
    
    @app.get("/500v2")
    async def root():
        raise HTTPException(status_code=HTTPStatus.INTERNAL_SERVER_ERROR)
        return {"I am returning 200"}
    
    
    if __name__ == "__main__":
        uvicorn.run(app, host="127.0.0.1", port=5000, log_level="info")
    
    

    The status code that is displayed in the metrics is the enum name, not the numeric code.

    starlette_request_duration_seconds_bucket{app_name="starlette",le="10.0",method="GET",path="/",status_code="HTTPStatus.OK"} 2.0
    

    Is this desired behaviour?

    Perhaps it might be better to attempt to convert the status code to an int?

    I think all we would have to do is maybe do a type check and convert to int right here https://github.com/stephenhillier/starlette_exporter/blob/master/starlette_exporter/middleware.py#L174

    opened by jgould22 6
  • How to add custom metrics ?

    How to add custom metrics ?

    HI again ! Last issue for the period I believe ;-)

    Would you mind adding a quick doc about how to extend the metrics ? The FastAPI / starlette ones are a very good basis, but I'ld like to add some related to my app.

    For example I have a Postgres database, I want to add the number of active subscription in the metrics, aka the result of a SELECT * FROM subscription WHERE active == 1 that would show up as starlette_subscription_active{app_name="starlette",query="SELECT * FROM subscription WHERE active == 1"} 1382

    help wanted good first issue 
    opened by rgarrigue 6
  • add hostname to labels #45

    add hostname to labels #45

    Base by request on https://github.com/stephenhillier/starlette_exporter/issues/45 added an bool feature to enable to add hostname/url to the path value. Enable:

    app.add_middleware(starelette_exporter.Prometheus, hn_ext=True)

    Output: starlette_requests_total{app_name="starlette",method="GET",path="<HTTP hearder host>/200",status_code="200"} 1.0

    This header is always on as pre http1.1 headers. https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html [14.23] Host

    opened by intelroman 4
  • ASGI3 and other misc improvements

    ASGI3 and other misc improvements

    A small set of improvements β€” I can split them up into separate PRs if you need it.

    Each commit is self-contained

    1. Change middleware to be a generic ASGI3 middleware. Starlette is discouraging use of BaseHTTPMiddleware because it causes all sorts of problems with streaming requests & responses. eg: https://github.com/encode/starlette/issues/919#issuecomment-672908610 and others. Personally, I'm running into early EOFs during reading request.stream() when PrometheusMiddleware (or anything BaseHTTPMiddleware-derived) is active.

    2. Use time.perf_counter() instead of time.time(). It doesn't go backwards and it operates at a higher precision

    3. Add prefix option for metric naming #3

    opened by rcoup 4
  • Better naming

    Better naming

    Waiting proposal for naming .. on optional_metrics Now we have 2 optional metrics request_response_body_size => how much bytes the server send back to the client. client_receive_body_size => how much data receive server from client (post/put)

    It will be great to have a better naming .

    opened by intelroman 3
  • Added server receive content-length, server can be started as standalone

    Added server receive content-length, server can be started as standalone

    Added optional_metrics = ["all"] will work on rec and snd body_size Added receive_body_size metric Added starting Prometheus as service on different port .

    opened by intelroman 3
  • group_paths not work for method `OPTIONS`

    group_paths not work for method `OPTIONS`

    I think something wrong when request method is OPTIONS like below

    starlette_requests_total{app_name="starlette",method="GET",path="/api/v1/datasets",status_code="200"} 92.0
    starlette_requests_total{app_name="starlette",method="GET",path="/api/v1/tasks/nm",status_code="200"} 53.0
    starlette_requests_total{app_name="starlette",method="GET",path="/api/v1/datasets/{did}",status_code="200"} 22.0
    starlette_requests_total{app_name="starlette",method="GET",path="/api/v1/datasets/{did}/stats",status_code="200"} 7.0
    starlette_requests_total{app_name="starlette",method="DELETE",path="/api/v1/datasets/{did}",status_code="200"} 4.0
    starlette_requests_total{app_name="starlette",method="OPTIONS",path="/api/v1/datasets/567738610",status_code="200"} 1.0
    starlette_requests_total{app_name="starlette",method="OPTIONS",path="/api/v1/datasets/2003501303",status_code="200"} 1.0
    starlette_requests_total{app_name="starlette",method="OPTIONS",path="/api/v1/datasets/921436406",status_code="200"} 1.0
    starlette_requests_total{app_name="starlette",method="OPTIONS",path="/api/v1/datasets/799719666",status_code="200"} 1.0
    starlette_requests_total{app_name="starlette",method="OPTIONS",path="/api/v1/datasets/1602879743",status_code="200"} 1.0
    starlette_requests_total{app_name="starlette",method="OPTIONS",path="/api/v1/datasets/150110457",status_code="200"} 1.0
    starlette_requests_total{app_name="starlette",method="OPTIONS",path="/api/v1/datasets/1256292570",status_code="200"} 1.0
    

    My version is starlette-exporter==0.11.0 and I add prometheus middleware

    app.add_middleware(PrometheusMiddleware, group_paths=True)
    app.add_route("/metrics", handle_metrics)
    

    Is there any problem? Please take a look

    opened by ZimmerHao 3
  • Skip path option

    Skip path option

    Adds an option to avoid collecting metrics on specific paths. This option is useful to avoid the collection on endpoints used for healthcheck, liveness or readiness probes and even to avoid collecting metrics in the self Prometheus exposed endpoint (commonly /metrics).

    The new option is an optional list called skip_paths.

    opened by fdaines 3
  • Custom labels

    Custom labels

    How to define custom labels that will be used on every starlette_exporter metrics ? For example to add the user_id (email) extracted from a JWT token or any part of the request/session.

    It could be acheive with a callback or by monkey-patching *.

    Does it make sense ?

    enhancement 
    opened by PhE 3
  • feature : support open metrics exemplars

    feature : support open metrics exemplars

    https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#exemplars-1

    https://github.com/prometheus/client_python/blob/f17a8361ad3ed5bc47f193ac03b00911120a8d81/README.md#exemplars

    Would it be reasonable to have optional dependencies on open telemetry to get the trace info for a bucket?

    opened by camerondavison 5
  • How to see python_*** metrics

    How to see python_*** metrics

    I can use starlette_exporter to generate starlette_request_*** metrics now, but I don't see python_*** metrics. Is there a flag to enable it? (Sorry, I cannot find related information in issues and code... If I miss anything, please let me know, thanks.)

    opened by dennys 2
  • /metrics and /docs (again?)

    /metrics and /docs (again?)

    I am running FastAPI (0.79.1), starlette (0.19.1), satrlette_exporter (0.14.0), uvicorn (0.17.6) and prometheus_client (0.14.1). When I set root_path to fix my /docs (It is behind nginx), most of my application metrics disappeared from /metrics. I see this was supposed to be fixed in v0.12.0, so perhaps I am missing something? Thanks for any help or insight on this.

    opened by BillScherer 4
  • Blocking Calls when in Multiprocess mode

    Blocking Calls when in Multiprocess mode

    I am still getting a bit of a handle on how python async works however I have a question.

    Since starlette_exporter depends on the client_python which is not generally async am I blocking the event loop when I enable client_python's multi-process mode?

    I can see it uses the file system here to store/share its metrics between workers and in doing so makes regular file open calls.

    Do these open calls block the event loop?

    opened by jgould22 2
  • Exposing metrics not hosted via starlette

    Exposing metrics not hosted via starlette

    Often in a production application one might want to hide the /metrics endpoint from public traffic. Using the methods listed in the README, one would have to explicitly mask the /metrics route within a reverse proxy and bind to two different ports which can be non-trivial (see encode/uvicorn#571 for context).

    In my experience I've found it easier to just expose the metrics on a separate port (Ie. 9090) via Prometheus's default start_http_server function but I'm not sure if this is supported by starlette-exporter. This way the metrics requests are served completely internally (and, for example, can only be exposed internally within a kubernetes cluster). While probably not necessary, to be clean I also integrated the server used in start_http_server with starlette's lifespan events (otherwise I'm worried for example the socket won't unbind for some period of time when hot reloading).

    My questions are (edit: updated questions):

    1. Is this supported/possible?
    2. Would an example that uses start_http_server be accepted into the README?
    3. Would code that calls start_http_server handling lifespan hooks be accepted as a contribution?

    cc @NargiT

    opened by MatthewScholefield 3
  • fix: return the actual path instead of None on partial matches

    fix: return the actual path instead of None on partial matches

    If the match is partial we want the path of the route and not None, which would result in a dropped metric if filter_unhandled_paths is set to True and a request is made to an actually handled endpoint but with the wrong http method.

    opened by janLo 8
Releases(v0.14.0)
  • v0.14.0(Aug 16, 2022)

    This release adds a labels argument to PrometheusMiddleware that accepts a dict of labels/values that will be added to all metrics.

    Each label's value can be either a static value or, optionally, a callback function that takes the Request instance as its argument and returns a string.

    Example:

    app.add_middleware(
      PrometheusMiddleware,
      labels={
         "service": "api",
         "env": os.getenv("ENV"),
         "my_header": lambda r: r.headers.get("X-My-Header")
        }
    )
    

    Reminder: always evaluate the cardinality of sets of labels before using them, and do not use user-supplied values (e.g. untrusted headers) or unconstrained values to populate labels. See this for more information: https://grafana.com/blog/2022/02/15/what-are-cardinality-spikes-and-why-do-they-matter/

    Thank you to @intelroman for helping contribute to this feature.

    Source code(tar.gz)
    Source code(zip)
  • v0.13.0(May 23, 2022)

    Request and response body sizes

    This release adds new optional request and response body size metrics. They will track the size, in bytes, of request and response bodies received and returned by all endpoints. To enable them, use the optional_metrics option:

    from starlette_exporter.optional_metrics import response_body_size, request_body_size
    
    app.add_middleware(PrometheusMiddleware, optional_metrics=[response_body_size, request_body_size])
    

    Thank you to @intelroman for contributing this feature.

    better support for http.HTTPStatus

    There is now an option always_use_int_status to convert http.HTTPStatus codes to integers for the status_code metric label. To ensure no breakage for users already working around this behavior, it defaults to False.

    app.add_middleware(PrometheusMiddleware, always_use_int_status=True)
    

    credit to @jgould22 for reporting and fixing this issue.

    Source code(tar.gz)
    Source code(zip)
  • v0.12.0(Dec 31, 2021)

    Adds support for FastAPI's root_path setting, intended for use behind a proxy (for more information about root_path, see the FastAPI docs: https://fastapi.tiangolo.com/advanced/behind-a-proxy/). #39

    Thanks to @Bear1110 for reporting the bug!

    Source code(tar.gz)
    Source code(zip)
  • v0.11.0(Oct 15, 2021)

    v0.11.0 adds a new option skip_paths that accepts a list of paths that should be ignored when collecting metrics. This is useful if you don't want to track metrics for health check endpoints or the /metrics endpoint.

    Example:

    app.add_middleware(PrometheusMiddleware, skip_paths=['/health'])  #  no metrics will be collected for `/health`
    

    Credit to @fdaines for contributing this new feature.

    Source code(tar.gz)
    Source code(zip)
  • v0.10.0(Jul 14, 2021)

    v0.10.0 adds a new default metric requests_in_progress.

    This metric is a gauge that keeps track of the number of concurrent requests that your application is processing.

    Thanks to @scotgopal for contributing this feature! :tada:

    Source code(tar.gz)
    Source code(zip)
  • v0.9.0(Jun 11, 2021)

    v0.9.0 now supports mounted routes when using group_paths=True and/or filter_unhandled_paths=True. Metrics for these routes will now be properly exported with the correct path labels.

    Thanks to @axyjo for the report (#21)!

    Source code(tar.gz)
    Source code(zip)
  • v0.8.2(May 28, 2021)

  • v0.8.1(May 11, 2021)

    v0.8.1 addresses an issue where the end time may not be recorded in some cases. This fix ensures the end time is always recorded before the request duration metric is observed. (#18)

    Source code(tar.gz)
    Source code(zip)
  • v0.8.0(May 11, 2021)

    The request duration metric now correctly reports the time between request and response, even if a background task has been kicked off by the request handler. (#16, #17)

    If you need a metric that captures the processing time including background tasks, please post an issue and it can be added.

    Source code(tar.gz)
    Source code(zip)
  • v0.7.0(Nov 20, 2020)

    This release grants the option to ignore unhandled paths. Use this option to prevent 404 errors from filling up the metrics. See #14.

    From README:

    filter_unhandled_paths: setting this to True will cause the middleware to ignore requests with unhandled paths (in other words, 404 errors). This helps prevent filling up the metrics with 404 errors and/or intentially bad requests. Default is False.

    example:

    app.add_middleware(PrometheusMiddleware,
                       filter_unhandled_paths=True, group_paths=True)
    

    Thank you to @mwek for contributing this feature (#15).

    Source code(tar.gz)
    Source code(zip)
  • v0.6.0(Nov 5, 2020)

    This release adds a buckets option, which accepts a list of numbers to use as buckets for the histogram. If not set (or set to None), the Prometheus default will be used. (credit to @RyBo)

    Source code(tar.gz)
    Source code(zip)
  • v0.5.0(Oct 9, 2020)

    This release converts the starlette_exporter PrometheusMiddleware to be an ASGI middleware with a __call__ method instead of subclassing BaseHTTPMiddleware (add768e20b27540b04397e621c394f2a1703a691). This fixes an issue that prevents background tasks from being used with the middleware. See https://github.com/encode/starlette/issues/919#issuecomment-672908610 for more information on the BaseHTTPMiddleware issue.

    Other improvements:

    • added prefix option, which allows developers to change the prefix of the exported metrics (previously, the metrics would always be prefixed starlette_, which remains the default). See issue #3. (b53bb3fcca9087c7ed204bd325d5eb519e5587e9)
    • switched to time.perf_counter() instead of time.time() for request times. (381a4bef264efd88a76ea32d3dfadb346696c3dd)

    Credit for the improvements in this release goes to @rcoup.

    Source code(tar.gz)
    Source code(zip)
  • v0.4.1(Jun 15, 2020)

  • v0.4.0(Jun 6, 2020)

  • v0.3.0(Apr 22, 2020)

    The application name can now be specified when creating the middleware:

    app.add_middleware(PrometheusMiddleware, app_name="my_app")
    

    This allows filtering metrics by application if you have several FastAPI apps exporting metrics to the same Prometheus service.

    Author: @paweldudzinski

    Source code(tar.gz)
    Source code(zip)
  • v0.2.0(Apr 22, 2020)

    This version provides a group_paths option to the PrometheusMiddleware constructor that will cause all metrics to be grouped by their router path.

    This means that requests to endpoints with path variables like /api/v1/shop/1234 and /api/v1/shop/75 will appear in the metrics as /api/v1/shop/{item_id}. This might be helpful if you want metrics organized by HTTP path but don't want them broken down by each individual item in a collection.

    Source code(tar.gz)
    Source code(zip)
  • v0.1.0(Oct 28, 2019)

    Initial release of starlette_exporter with request counter and request duration histogram. Both metrics include the HTTP method, path, and status code. Successful requests/errors can be separated by status code.

    Source code(tar.gz)
    Source code(zip)
Owner
Steve Hillier
Working on solutions for civil infrastructure & natural resources
Steve Hillier
Cache-house - Caching tool for python, working with Redis single instance and Redis cluster mode

Caching tool for python, working with Redis single instance and Redis cluster mo

Tural 14 Jan 06, 2022
Prometheus exporter for Starlette and FastAPI

starlette_exporter Prometheus exporter for Starlette and FastAPI. The middleware collects basic metrics: Counter: starlette_requests_total Histogram:

Steve Hillier 225 Jan 05, 2023
Ready-to-use and customizable users management for FastAPI

FastAPI Users Ready-to-use and customizable users management for FastAPI Documentation: https://fastapi-users.github.io/fastapi-users/ Source Code: ht

FastAPI Users 2.3k Dec 30, 2022
Drop-in MessagePack support for ASGI applications and frameworks

msgpack-asgi msgpack-asgi allows you to add automatic MessagePack content negotiation to ASGI applications (Starlette, FastAPI, Quart, etc.), with a s

Florimond Manca 128 Jan 02, 2023
Deploy/View images to database sqlite with fastapi

Deploy/View images to database sqlite with fastapi cd realistic Dependencies dat

Fredh Macau 1 Jan 04, 2022
High-performance Async REST API, in Python. FastAPI + GINO + Arq + Uvicorn (w/ Redis and PostgreSQL).

fastapi-gino-arq-uvicorn High-performance Async REST API, in Python. FastAPI + GINO + Arq + Uvicorn (powered by Redis & PostgreSQL). Contents Get Star

Leo Sussan 351 Jan 04, 2023
Restful Api developed with Flask using Prometheus and Grafana for monitoring and containerization with Docker :rocket:

Hephaestus πŸš€ In Greek mythology, Hephaestus was either the son of Zeus and Hera or he was Hera's parthenogenous child. ... As a smithing god, Hephaes

Yasser Tahiri 16 Oct 07, 2022
🐍Pywork is a Yeoman generator to scaffold a Bare-bone Python Application

Pywork python app yeoman generator Yeoman | Npm Pywork | Home PyWork is a Yeoman generator for a basic python-worker project that makes use of Pipenv,

Vu Tran 10 Dec 16, 2022
A simple Redis Streams backed Chat app using Websockets, Asyncio and FastAPI/Starlette.

redis-streams-fastapi-chat A simple demo of Redis Streams backed Chat app using Websockets, Python Asyncio and FastAPI/Starlette. Requires Python vers

ludwig404 135 Dec 19, 2022
A rate limiter for Starlette and FastAPI

SlowApi A rate limiting library for Starlette and FastAPI adapted from flask-limiter. Note: this is alpha quality code still, the API may change, and

Laurent Savaete 562 Jan 01, 2023
FastAPI simple cache

FastAPI Cache Implements simple lightweight cache system as dependencies in FastAPI. Installation pip install fastapi-cache Usage example from fastapi

Ivan Sushkov 188 Dec 29, 2022
πŸ”€β³ Easy throttling with asyncio support

Throttler Zero-dependency Python package for easy throttling with asyncio support. πŸ“ Table of Contents πŸŽ’ Install πŸ›  Usage Examples Throttler and Thr

Ramzan Bekbulatov 80 Dec 07, 2022
The template for building scalable web APIs based on FastAPI, Tortoise ORM and other.

FastAPI and Tortoise ORM. Powerful but simple template for web APIs w/ FastAPI (as web framework) and Tortoise-ORM (for working via database without h

prostomarkeloff 95 Jan 08, 2023
A dynamic FastAPI router that automatically creates CRUD routes for your models

⚑ Create CRUD routes with lighting speed ⚑ A dynamic FastAPI router that automatically creates CRUD routes for your models Documentation: https://fast

Adam Watkins 943 Jan 01, 2023
A rate limiter for Starlette and FastAPI

SlowApi A rate limiting library for Starlette and FastAPI adapted from flask-limiter. Note: this is alpha quality code still, the API may change, and

Laurent Savaete 562 Jan 01, 2023
🚒 Docker images and utilities to power your Python APIs and help you ship faster. With support for Uvicorn, Gunicorn, Starlette, and FastAPI.

🚒 inboard 🐳 Docker images and utilities to power your Python APIs and help you ship faster. Description This repository provides Docker images and a

Brendon Smith 112 Dec 30, 2022
FastAPI interesting concepts.

fastapi_related_stuffs FastAPI interesting concepts. FastAPI version :- 0.70 Python3 version :- 3.9.x Steps Test Django Like settings export FASTAPI_S

Mohd Mujtaba 3 Feb 06, 2022
✨️🐍 SPARQL endpoint built with RDFLib to serve machine learning models, or any other logic implemented in Python

✨ SPARQL endpoint for RDFLib rdflib-endpoint is a SPARQL endpoint based on a RDFLib Graph to easily serve machine learning models, or any other logic

Vincent Emonet 27 Dec 19, 2022
Get MODBUS data from Sofar (K-TLX) inverter through LSW-3 or LSE module

SOFAR Inverter + LSW-3/LSE Small utility to read data from SOFAR K-TLX inverters through the Solarman (LSW-3/LSE) datalogger. Two scripts to get inver

58 Dec 29, 2022
Town / City geolocations with FastAPI & Mongo

geolocations-api United Kingdom Town / City geolocations with FastAPI & Mongo Build container To build a custom image or extend the api run the follow

Joe Gasewicz 3 Jan 26, 2022