Simple web app example serving a PyTorch model using streamlit and FastAPI

Overview

streamlit-fastapi-model-serving

Simple example of usage of streamlit and FastAPI for ML model serving described on this blogpost and PyConES 2020 video.

When developing simple APIs that serve machine learning models, it can be useful to have both a backend (with API documentation) for other applications to call and a frontend for users to experiment with the functionality.

In this example, we serve an image semantic segmentation model using FastAPI for the backend service and streamlit for the frontend service. docker-compose orchestrates the two services and allows communication between them.

To run the example in a machine running Docker and docker-compose, run:

docker-compose build
docker-compose up

To visit the FastAPI documentation of the resulting service, visit http://localhost:8000 with a web browser.
To visit the streamlit UI, visit http://localhost:8501.

Logs can be inspected via:

docker-compose logs

Deployment

To deploy the app, one option is deployment on Heroku (with Dockhero). To do so:

  • rename docker-compose.yml to dockhero-compose.yml
  • create an app (we refer to its name as <my-app>) on a Heroku account
  • install locally the Heroku CLI, and enable the Dockhero plugin with heroku plugins:install dockhero
  • add to the app the DockHero add-on (and with a plan allowing enough RAM to run the model!)
  • in a command line enter heroku dh:compose up -d --app <my-app> to deploy the app
  • to find the address of the app on the web, enter heroku dh:open --app <my-app>
  • to visualize the api, visit the address adding port 8000/docs, e.g. http://dockhero-<named-assigned-to-my-app>-12345.dockhero.io:8000/docs(not https)
  • visit the address adding :8501 to visit the streamlit interface
  • logs are accessible via heroku logs -p dockhero --app <my-app>

Debugging

To modify and debug the app, development in containers can be useful (and kind of fun!).

Comments
  • after deployment on ubuntu the Streamlit page always shows

    after deployment on ubuntu the Streamlit page always shows "Please Wait"

    I use ubuntu virtual machine 18.04 to deploy your program.

    I use following steps to finish this.

    1. sudo apt install docker.io
    2. sudo apt install docker-compose
    3. systemctl start docker
    4. git clone the project code and enter the directory
    5. sudo docker-compose build
    6. sudo docker-compose up

    then the streamlit page always display "Please Wait", when I refresh the page, the terminal logs a problem I search for a long time but I can not resolve. Thanks for your work and waiting for your reply.

    streamlit    | Exception in thread ScriptRunner.scriptThread:
    streamlit    | Traceback (most recent call last):
    streamlit    |   File "/usr/local/lib/python3.7/threading.py", line 926, in _bootstrap_inner
    streamlit    |     self.run()
    streamlit    |   File "/usr/local/lib/python3.7/threading.py", line 870, in run
    streamlit    |     self._target(*self._args, **self._kwargs)
    streamlit    |   File "/usr/local/lib/python3.7/site-packages/streamlit/script_runner.py", line 172, in _process_request_queue
    streamlit    |     self._run_script(data)
    streamlit    |   File "/usr/local/lib/python3.7/site-packages/streamlit/script_runner.py", line 272, in _run_script
    streamlit    |     self.on_event.send(ScriptRunnerEvent.SCRIPT_STARTED)
    streamlit    |   File "/usr/local/lib/python3.7/site-packages/blinker/base.py", line 267, in send
    streamlit    |     for receiver in self.receivers_for(sender)]
    streamlit    |   File "/usr/local/lib/python3.7/site-packages/blinker/base.py", line 267, in <listcomp>
    streamlit    |     for receiver in self.receivers_for(sender)]
    streamlit    |   File "/usr/local/lib/python3.7/site-packages/streamlit/report_session.py", line 285, in _on_scriptrunner_event
    streamlit    |     self._enqueue_new_report_message()
    streamlit    |   File "/usr/local/lib/python3.7/site-packages/streamlit/report_session.py", line 383, in _enqueue_new_report_message
    streamlit    |     _populate_user_info_msg(imsg.user_info)
    streamlit    |   File "/usr/local/lib/python3.7/site-packages/streamlit/report_session.py", line 706, in _populate_user_info_msg
    streamlit    |     msg.installation_id = Installation.instance().installation_id
    streamlit    |   File "/usr/local/lib/python3.7/site-packages/streamlit/metrics_util.py", line 129, in instance
    streamlit    |     cls._instance = Installation()
    streamlit    |   File "/usr/local/lib/python3.7/site-packages/streamlit/metrics_util.py", line 133, in __init__
    streamlit    |     self.installation_id_v1 = str(uuid.uuid5(uuid.NAMESPACE_DNS, _get_machine_id()))
    streamlit    |   File "/usr/local/lib/python3.7/site-packages/streamlit/metrics_util.py", line 49, in _get_machine_id
    streamlit    |     subprocess.run(["sudo", "dbus-uuidgen", "--ensure"])
    streamlit    |   File "/usr/local/lib/python3.7/subprocess.py", line 488, in run
    streamlit    |     with Popen(*popenargs, **kwargs) as process:
    streamlit    |   File "/usr/local/lib/python3.7/subprocess.py", line 800, in __init__
    streamlit    |     restore_signals, start_new_session)
    streamlit    |   File "/usr/local/lib/python3.7/subprocess.py", line 1551, in _execute_child
    streamlit    |     raise child_exception_type(errno_num, err_msg, err_filename)
    streamlit    | FileNotFoundError: [Errno 2] No such file or directory: 'sudo': 'sudo'
    streamlit    | 
    streamlit    | Exception in thread ScriptRunner.scriptThread:
    streamlit    | Traceback (most recent call last):
    streamlit    |   File "/usr/local/lib/python3.7/threading.py", line 926, in _bootstrap_inner
    streamlit    |     self.run()
    streamlit    |   File "/usr/local/lib/python3.7/threading.py", line 870, in run
    streamlit    |     self._target(*self._args, **self._kwargs)
    streamlit    |   File "/usr/local/lib/python3.7/site-packages/streamlit/script_runner.py", line 172, in _process_request_queue
    streamlit    |     self._run_script(data)
    streamlit    |   File "/usr/local/lib/python3.7/site-packages/streamlit/script_runner.py", line 272, in _run_script
    streamlit    |     self.on_event.send(ScriptRunnerEvent.SCRIPT_STARTED)
    streamlit    |   File "/usr/local/lib/python3.7/site-packages/blinker/base.py", line 267, in send
    streamlit    |     for receiver in self.receivers_for(sender)]
    streamlit    |   File "/usr/local/lib/python3.7/site-packages/blinker/base.py", line 267, in <listcomp>
    streamlit    |     for receiver in self.receivers_for(sender)]
    streamlit    |   File "/usr/local/lib/python3.7/site-packages/streamlit/report_session.py", line 285, in _on_scriptrunner_event
    streamlit    |     self._enqueue_new_report_message()
    streamlit    |   File "/usr/local/lib/python3.7/site-packages/streamlit/report_session.py", line 383, in _enqueue_new_report_message
    streamlit    |     _populate_user_info_msg(imsg.user_info)
    streamlit    |   File "/usr/local/lib/python3.7/site-packages/streamlit/report_session.py", line 706, in _populate_user_info_msg
    streamlit    |     msg.installation_id = Installation.instance().installation_id
    streamlit    |   File "/usr/local/lib/python3.7/site-packages/streamlit/metrics_util.py", line 129, in instance
    streamlit    |     cls._instance = Installation()
    streamlit    |   File "/usr/local/lib/python3.7/site-packages/streamlit/metrics_util.py", line 133, in __init__
    streamlit    |     self.installation_id_v1 = str(uuid.uuid5(uuid.NAMESPACE_DNS, _get_machine_id()))
    streamlit    |   File "/usr/local/lib/python3.7/site-packages/streamlit/metrics_util.py", line 49, in _get_machine_id
    streamlit    |     subprocess.run(["sudo", "dbus-uuidgen", "--ensure"])
    streamlit    |   File "/usr/local/lib/python3.7/subprocess.py", line 488, in run
    streamlit    |     with Popen(*popenargs, **kwargs) as process:
    streamlit    |   File "/usr/local/lib/python3.7/subprocess.py", line 800, in __init__
    streamlit    |     restore_signals, start_new_session)
    streamlit    |   File "/usr/local/lib/python3.7/subprocess.py", line 1551, in _execute_child
    streamlit    |     raise child_exception_type(errno_num, err_msg, err_filename)
    streamlit    | FileNotFoundError: [Errno 2] No such file or directory: 'sudo': 'sudo'
    streamlit    | 
    streamlit    | Exception in thread ScriptRunner.scriptThread:
    streamlit    | Traceback (most recent call last):
    streamlit    |   File "/usr/local/lib/python3.7/threading.py", line 926, in _bootstrap_inner
    streamlit    |     self.run()
    streamlit    |   File "/usr/local/lib/python3.7/threading.py", line 870, in run
    streamlit    |     self._target(*self._args, **self._kwargs)
    streamlit    |   File "/usr/local/lib/python3.7/site-packages/streamlit/script_runner.py", line 172, in _process_request_queue
    streamlit    |     self._run_script(data)
    streamlit    |   File "/usr/local/lib/python3.7/site-packages/streamlit/script_runner.py", line 272, in _run_script
    streamlit    |     self.on_event.send(ScriptRunnerEvent.SCRIPT_STARTED)
    streamlit    |   File "/usr/local/lib/python3.7/site-packages/blinker/base.py", line 267, in send
    streamlit    |     for receiver in self.receivers_for(sender)]
    streamlit    |   File "/usr/local/lib/python3.7/site-packages/blinker/base.py", line 267, in <listcomp>
    streamlit    |     for receiver in self.receivers_for(sender)]
    streamlit    |   File "/usr/local/lib/python3.7/site-packages/streamlit/report_session.py", line 285, in _on_scriptrunner_event
    streamlit    |     self._enqueue_new_report_message()
    streamlit    |   File "/usr/local/lib/python3.7/site-packages/streamlit/report_session.py", line 383, in _enqueue_new_report_message
    streamlit    |     _populate_user_info_msg(imsg.user_info)
    streamlit    |   File "/usr/local/lib/python3.7/site-packages/streamlit/report_session.py", line 706, in _populate_user_info_msg
    streamlit    |     msg.installation_id = Installation.instance().installation_id
    streamlit    |   File "/usr/local/lib/python3.7/site-packages/streamlit/metrics_util.py", line 129, in instance
    streamlit    |     cls._instance = Installation()
    streamlit    |   File "/usr/local/lib/python3.7/site-packages/streamlit/metrics_util.py", line 133, in __init__
    streamlit    |     self.installation_id_v1 = str(uuid.uuid5(uuid.NAMESPACE_DNS, _get_machine_id()))
    streamlit    |   File "/usr/local/lib/python3.7/site-packages/streamlit/metrics_util.py", line 49, in _get_machine_id
    streamlit    |     subprocess.run(["sudo", "dbus-uuidgen", "--ensure"])
    streamlit    |   File "/usr/local/lib/python3.7/subprocess.py", line 488, in run
    streamlit    |     with Popen(*popenargs, **kwargs) as process:
    streamlit    |   File "/usr/local/lib/python3.7/subprocess.py", line 800, in __init__
    streamlit    |     restore_signals, start_new_session)
    streamlit    |   File "/usr/local/lib/python3.7/subprocess.py", line 1551, in _execute_child
    streamlit    |     raise child_exception_type(errno_num, err_msg, err_filename)
    streamlit    | FileNotFoundError: [Errno 2] No such file or directory: 'sudo': 'sudo'
    streamlit    | 
    streamlit    | Exception in thread ScriptRunner.scriptThread:
    streamlit    | Traceback (most recent call last):
    streamlit    |   File "/usr/local/lib/python3.7/threading.py", line 926, in _bootstrap_inner
    streamlit    |     self.run()
    streamlit    |   File "/usr/local/lib/python3.7/threading.py", line 870, in run
    streamlit    |     self._target(*self._args, **self._kwargs)
    streamlit    |   File "/usr/local/lib/python3.7/site-packages/streamlit/script_runner.py", line 172, in _process_request_queue
    streamlit    |     self._run_script(data)
    streamlit    |   File "/usr/local/lib/python3.7/site-packages/streamlit/script_runner.py", line 272, in _run_script
    streamlit    |     self.on_event.send(ScriptRunnerEvent.SCRIPT_STARTED)
    streamlit    |   File "/usr/local/lib/python3.7/site-packages/blinker/base.py", line 267, in send
    streamlit    |     for receiver in self.receivers_for(sender)]
    streamlit    |   File "/usr/local/lib/python3.7/site-packages/blinker/base.py", line 267, in <listcomp>
    streamlit    |     for receiver in self.receivers_for(sender)]
    streamlit    |   File "/usr/local/lib/python3.7/site-packages/streamlit/report_session.py", line 285, in _on_scriptrunner_event
    streamlit    |     self._enqueue_new_report_message()
    streamlit    |   File "/usr/local/lib/python3.7/site-packages/streamlit/report_session.py", line 383, in _enqueue_new_report_message
    streamlit    |     _populate_user_info_msg(imsg.user_info)
    streamlit    |   File "/usr/local/lib/python3.7/site-packages/streamlit/report_session.py", line 706, in _populate_user_info_msg
    streamlit    |     msg.installation_id = Installation.instance().installation_id
    streamlit    |   File "/usr/local/lib/python3.7/site-packages/streamlit/metrics_util.py", line 129, in instance
    streamlit    |     cls._instance = Installation()
    streamlit    |   File "/usr/local/lib/python3.7/site-packages/streamlit/metrics_util.py", line 133, in __init__
    streamlit    |     self.installation_id_v1 = str(uuid.uuid5(uuid.NAMESPACE_DNS, _get_machine_id()))
    streamlit    |   File "/usr/local/lib/python3.7/site-packages/streamlit/metrics_util.py", line 49, in _get_machine_id
    streamlit    |     subprocess.run(["sudo", "dbus-uuidgen", "--ensure"])
    streamlit    |   File "/usr/local/lib/python3.7/subprocess.py", line 488, in run
    streamlit    |     with Popen(*popenargs, **kwargs) as process:
    streamlit    |   File "/usr/local/lib/python3.7/subprocess.py", line 800, in __init__
    streamlit    |     restore_signals, start_new_session)
    streamlit    |   File "/usr/local/lib/python3.7/subprocess.py", line 1551, in _execute_child
    streamlit    |     raise child_exception_type(errno_num, err_msg, err_filename)
    streamlit    | FileNotFoundError: [Errno 2] No such file or directory: 'sudo': 'sudo'
    
    
    bug 
    opened by Presiton 4
  • fastapi exited with code 137

    fastapi exited with code 137

    Hi Davide I am unfamiliar with FastAPI, but it looks very powerful! On running docker-compose up and uploading an image via the UI I get an error:

    ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
    Traceback:
    
    File "/usr/local/lib/python3.7/site-packages/streamlit/ScriptRunner.py", line 322, in _run_script
        exec(code, module.__dict__)
    File "/streamlit/ui.py", line 37, in <module>
        segments = process(image, url + endpoint)
    File "/streamlit/ui.py", line 30, in process
        timeout=8000,
    File "/usr/local/lib/python3.7/site-packages/requests/api.py", line 119, in post
        return request('post', url, data=data, json=json, **kwargs)
    File "/usr/local/lib/python3.7/site-packages/requests/api.py", line 61, in request
        return session.request(method=method, url=url, **kwargs)
    File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 530, in request
        resp = self.send(prep, **send_kwargs)
    File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 643, in send
        r = adapter.send(request, **kwargs)
    File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 498, in send
        raise ConnectionError(err, request=request)
    

    And in the logs:

    MacBook-Pro:streamlit-fastapi-model-serving robin$ docker-compose up
    Starting fastapi ... done
    Starting streamlit ... done
    Attaching to fastapi, streamlit
    streamlit    | 
    streamlit    |   You can now view your Streamlit app in your browser.
    streamlit    | 
    streamlit    |   Network URL: http://172.18.0.3:8501
    streamlit    |   External URL: http://2.26.108.101:8501
    streamlit    | 
    fastapi      | Using cache found in /root/.cache/torch/hub/pytorch_vision_v0.6.0
    fastapi      | INFO:     Started server process [1]
    fastapi      | INFO:     Waiting for application startup.
    fastapi      | INFO:     Application startup complete.
    fastapi      | INFO:     Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
    fastapi exited with code 137
    

    Have confirmed api is on 8000. Possibly I need to assign more memory to the container? Cheers

    enhancement 
    opened by robmarkcole 4
  • Do not store a temporary file

    Do not store a temporary file

    Great article and tutorial @davidefiocco!

    Just a tiny detail but I'm pretty sure you can just send the binary data from the image using https://pillow.readthedocs.io/en/latest/reference/Image.html#PIL.Image.Image.tobytes and a raw starlette.Response

    Would love to read more about those subjects in the future!

    enhancement 
    opened by julien-c 3
  • streamlit exited with code 1 due to TypeError in python3.7/site-packages/google/protobuf/descriptor.py

    streamlit exited with code 1 due to TypeError in python3.7/site-packages/google/protobuf/descriptor.py

    Thanks for the example of how to tie up FastAPI and streamlit in docker.

    On two of my machines streamlit exited with code 1, as mentioned in the title. The full trace is pasted below. The solution I found was to upgrade the packages in streamlit/requirements.txt to their most recent versions:

    -- original requirements.txt ---

    streamlit==1.9.0 
    requests==2.24.0
    requests-toolbelt==0.9.1
    

    -- modified requirements.txt ---

    streamlit==1.10.0 
    requests==2.28.1
    requests-toolbelt==0.9.1
    

    --- Screen output---

    ~/Downloads/streamlit-fastapi$ docker-compose up
    Creating network "streamlit-fastapi_deploy_network" with driver "bridge"
    Creating fastapi ... done
    Creating streamlit ... done
    Attaching to fastapi, streamlit
    streamlit    | Traceback (most recent call last):
    streamlit    |   File "/usr/local/bin/streamlit", line 5, in <module>
    streamlit    |     from streamlit.cli import main
    streamlit    |   File "/usr/local/lib/python3.7/site-packages/streamlit/__init__.py", line 48, in <module>
    streamlit    |     from streamlit.proto.RootContainer_pb2 import RootContainer
    streamlit    |   File "/usr/local/lib/python3.7/site-packages/streamlit/proto/RootContainer_pb2.py", line 37, in <module>
    streamlit    |     create_key=_descriptor._internal_create_key),
    streamlit    |   File "/usr/local/lib/python3.7/site-packages/google/protobuf/descriptor.py", line 755, in __new__
    streamlit    |     _message.Message._CheckCalledFromGeneratedFile()
    streamlit    | TypeError: Descriptors cannot not be created directly.
    streamlit    | If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0.
    streamlit    | If you cannot immediately regenerate your protos, some other possible workarounds are:
    streamlit    |  1. Downgrade the protobuf package to 3.20.x or lower.
    streamlit    |  2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).
    streamlit    | 
    streamlit    | More information: https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates
    streamlit exited with code 1
    fastapi      | Downloading: "https://github.com/pytorch/vision/archive/v0.6.0.zip" to /root/.cache/torch/hub/v0.6.0.zip
    fastapi      | Downloading: "https://download.pytorch.org/models/resnet101-5d3b4d8f.pth" to /root/.cache/torch/hub/checkpoints/resnet101-5d3b4d8f.pth
    100.0%i      | 
    fastapi      | Downloading: "https://download.pytorch.org/models/deeplabv3_resnet101_coco-586e9e4e.pth" to /root/.cache/torch/hub/checkpoints/deeplabv3_resnet101_coco-586e9e4e.pth
    100.0%i      | 
    fastapi      | INFO:     Started server process [1]
    fastapi      | INFO:     Waiting for application startup.
    fastapi      | INFO:     Application startup complete.
    fastapi      | INFO:     Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
    fastapi      | INFO:     172.19.0.1:51794 - "GET / HTTP/1.1" 404 Not Found
    
    opened by slowglow 1
  • Bump pillow from 8.3.2 to 9.0.0 in /fastapi

    Bump pillow from 8.3.2 to 9.0.0 in /fastapi

    Bumps pillow from 8.3.2 to 9.0.0.

    Release notes

    Sourced from pillow's releases.

    9.0.0

    https://pillow.readthedocs.io/en/stable/releasenotes/9.0.0.html

    Changes

    ... (truncated)

    Changelog

    Sourced from pillow's changelog.

    9.0.0 (2022-01-02)

    • Restrict builtins for ImageMath.eval(). CVE-2022-22817 #5923 [radarhere]

    • Ensure JpegImagePlugin stops at the end of a truncated file #5921 [radarhere]

    • Fixed ImagePath.Path array handling. CVE-2022-22815, CVE-2022-22816 #5920 [radarhere]

    • Remove consecutive duplicate tiles that only differ by their offset #5919 [radarhere]

    • Improved I;16 operations on big endian #5901 [radarhere]

    • Limit quantized palette to number of colors #5879 [radarhere]

    • Fixed palette index for zeroed color in FASTOCTREE quantize #5869 [radarhere]

    • When saving RGBA to GIF, make use of first transparent palette entry #5859 [radarhere]

    • Pass SAMPLEFORMAT to libtiff #5848 [radarhere]

    • Added rounding when converting P and PA #5824 [radarhere]

    • Improved putdata() documentation and data handling #5910 [radarhere]

    • Exclude carriage return in PDF regex to help prevent ReDoS #5912 [hugovk]

    • Fixed freeing pointer in ImageDraw.Outline.transform #5909 [radarhere]

    • Added ImageShow support for xdg-open #5897 [m-shinder, radarhere]

    • Support 16-bit grayscale ImageQt conversion #5856 [cmbruns, radarhere]

    • Convert subsequent GIF frames to RGB or RGBA #5857 [radarhere]

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 1
  • Bump pillow from 7.1.2 to 8.1.1 in /fastapi

    Bump pillow from 7.1.2 to 8.1.1 in /fastapi

    Bumps pillow from 7.1.2 to 8.1.1.

    Release notes

    Sourced from pillow's releases.

    8.1.1

    https://pillow.readthedocs.io/en/stable/releasenotes/8.1.1.html

    8.1.0

    https://pillow.readthedocs.io/en/stable/releasenotes/8.1.0.html

    Changes

    Dependencies

    Deprecations

    ... (truncated)

    Changelog

    Sourced from pillow's changelog.

    8.1.1 (2021-03-01)

    • Use more specific regex chars to prevent ReDoS. CVE-2021-25292 [hugovk]

    • Fix OOB Read in TiffDecode.c, and check the tile validity before reading. CVE-2021-25291 [wiredfool]

    • Fix negative size read in TiffDecode.c. CVE-2021-25290 [wiredfool]

    • Fix OOB read in SgiRleDecode.c. CVE-2021-25293 [wiredfool]

    • Incorrect error code checking in TiffDecode.c. CVE-2021-25289 [wiredfool]

    • PyModule_AddObject fix for Python 3.10 #5194 [radarhere]

    8.1.0 (2021-01-02)

    • Fix TIFF OOB Write error. CVE-2020-35654 #5175 [wiredfool]

    • Fix for Read Overflow in PCX Decoding. CVE-2020-35653 #5174 [wiredfool, radarhere]

    • Fix for SGI Decode buffer overrun. CVE-2020-35655 #5173 [wiredfool, radarhere]

    • Fix OOB Read when saving GIF of xsize=1 #5149 [wiredfool]

    • Makefile updates #5159 [wiredfool, radarhere]

    • Add support for PySide6 #5161 [hugovk]

    • Use disposal settings from previous frame in APNG #5126 [radarhere]

    • Added exception explaining that repr_png saves to PNG #5139 [radarhere]

    • Use previous disposal method in GIF load_end #5125 [radarhere]

    ... (truncated)

    Commits
    • 741d874 8.1.1 version bump
    • 179cd1c Added 8.1.1 release notes to index
    • 7d29665 Update CHANGES.rst [ci skip]
    • d25036f Credits
    • 973a4c3 Release notes for 8.1.1
    • 521dab9 Use more specific regex chars to prevent ReDoS
    • 8b8076b Fix for CVE-2021-25291
    • e25be1e Fix negative size read in TiffDecode.c
    • f891baa Fix OOB read in SgiRleDecode.c
    • cbfdde7 Incorrect error code checking in TiffDecode.c
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 1
  • url is hardcoded to http://fastapi:8000 but how to handle not using docker compose?

    url is hardcoded to http://fastapi:8000 but how to handle not using docker compose?

    The current approach of hardcoding http://fastapi:8000 requires the use of docker compose, but how do we also handle the case that users are running the containers seperately? A situation where this occurs might be if you want to run the pytorch model on a dedicate GPU machine, and have this resource shared by multiple services (e.g.a web UI, some analytics tools). One option I used here is to pass the machine IP in via an environment variable like:

        environment: 
          - DEEPSTACK_IP=deepstack
    

    Anyway I raise this in the hope you have an even better suggestion. It would be great to identify the optimum solutions and share this back with the community :-)

    opened by robmarkcole 1
  • Fix issues when running streamlit

    Fix issues when running streamlit

    It looks like bumping up streamlit requirements may solve https://github.com/davidefiocco/streamlit-fastapi-model-serving/issues/21 as older versions may be impacted by this problem: https://stackoverflow.com/questions/61871050/filenotfounderror-errno-2-no-such-file-or-directory-sudo-sudo

    I tested this locally and it seems a viable fix.

    opened by davidefiocco 0
  • Bump pillow from 8.3.2 to 9.0.1 in /fastapi

    Bump pillow from 8.3.2 to 9.0.1 in /fastapi

    Bumps pillow from 8.3.2 to 9.0.1.

    Release notes

    Sourced from pillow's releases.

    9.0.1

    https://pillow.readthedocs.io/en/stable/releasenotes/9.0.1.html

    Changes

    • In show_file, use os.remove to remove temporary images. CVE-2022-24303 #6010 [@​radarhere, @​hugovk]
    • Restrict builtins within lambdas for ImageMath.eval. CVE-2022-22817 #6009 [radarhere]

    9.0.0

    https://pillow.readthedocs.io/en/stable/releasenotes/9.0.0.html

    Changes

    ... (truncated)

    Changelog

    Sourced from pillow's changelog.

    9.0.1 (2022-02-03)

    • In show_file, use os.remove to remove temporary images. CVE-2022-24303 #6010 [radarhere, hugovk]

    • Restrict builtins within lambdas for ImageMath.eval. CVE-2022-22817 #6009 [radarhere]

    9.0.0 (2022-01-02)

    • Restrict builtins for ImageMath.eval(). CVE-2022-22817 #5923 [radarhere]

    • Ensure JpegImagePlugin stops at the end of a truncated file #5921 [radarhere]

    • Fixed ImagePath.Path array handling. CVE-2022-22815, CVE-2022-22816 #5920 [radarhere]

    • Remove consecutive duplicate tiles that only differ by their offset #5919 [radarhere]

    • Improved I;16 operations on big endian #5901 [radarhere]

    • Limit quantized palette to number of colors #5879 [radarhere]

    • Fixed palette index for zeroed color in FASTOCTREE quantize #5869 [radarhere]

    • When saving RGBA to GIF, make use of first transparent palette entry #5859 [radarhere]

    • Pass SAMPLEFORMAT to libtiff #5848 [radarhere]

    • Added rounding when converting P and PA #5824 [radarhere]

    • Improved putdata() documentation and data handling #5910 [radarhere]

    • Exclude carriage return in PDF regex to help prevent ReDoS #5912 [hugovk]

    • Fixed freeing pointer in ImageDraw.Outline.transform #5909 [radarhere]

    ... (truncated)

    Commits
    • 6deac9e 9.0.1 version bump
    • c04d812 Update CHANGES.rst [ci skip]
    • 4fabec3 Added release notes for 9.0.1
    • 02affaa Added delay after opening image with xdg-open
    • ca0b585 Updated formatting
    • 427221e In show_file, use os.remove to remove temporary images
    • c930be0 Restrict builtins within lambdas for ImageMath.eval
    • 75b69dd Dont need to pin for GHA
    • cd938a7 Autolink CWE numbers with sphinx-issues
    • 2e9c461 Add CVE IDs
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump pillow from 8.2.0 to 8.3.2 in /fastapi

    Bump pillow from 8.2.0 to 8.3.2 in /fastapi

    Bumps pillow from 8.2.0 to 8.3.2.

    Release notes

    Sourced from pillow's releases.

    8.3.2

    https://pillow.readthedocs.io/en/stable/releasenotes/8.3.2.html

    Security

    • CVE-2021-23437 Raise ValueError if color specifier is too long [hugovk, radarhere]

    • Fix 6-byte OOB read in FliDecode [wiredfool]

    Python 3.10 wheels

    • Add support for Python 3.10 #5569, #5570 [hugovk, radarhere]

    Fixed regressions

    • Ensure TIFF RowsPerStrip is multiple of 8 for JPEG compression #5588 [kmilos, radarhere]

    • Updates for ImagePalette channel order #5599 [radarhere]

    • Hide FriBiDi shim symbols to avoid conflict with real FriBiDi library #5651 [nulano]

    8.3.1

    https://pillow.readthedocs.io/en/stable/releasenotes/8.3.1.html

    Changes

    8.3.0

    https://pillow.readthedocs.io/en/stable/releasenotes/8.3.0.html

    Changes

    ... (truncated)

    Changelog

    Sourced from pillow's changelog.

    8.3.2 (2021-09-02)

    • CVE-2021-23437 Raise ValueError if color specifier is too long [hugovk, radarhere]

    • Fix 6-byte OOB read in FliDecode [wiredfool]

    • Add support for Python 3.10 #5569, #5570 [hugovk, radarhere]

    • Ensure TIFF RowsPerStrip is multiple of 8 for JPEG compression #5588 [kmilos, radarhere]

    • Updates for ImagePalette channel order #5599 [radarhere]

    • Hide FriBiDi shim symbols to avoid conflict with real FriBiDi library #5651 [nulano]

    8.3.1 (2021-07-06)

    • Catch OSError when checking if fp is sys.stdout #5585 [radarhere]

    • Handle removing orientation from alternate types of EXIF data #5584 [radarhere]

    • Make Image.array take optional dtype argument #5572 [t-vi, radarhere]

    8.3.0 (2021-07-01)

    • Use snprintf instead of sprintf. CVE-2021-34552 #5567 [radarhere]

    • Limit TIFF strip size when saving with LibTIFF #5514 [kmilos]

    • Allow ICNS save on all operating systems #4526 [baletu, radarhere, newpanjing, hugovk]

    • De-zigzag JPEG's DQT when loading; deprecate convert_dict_qtables #4989 [gofr, radarhere]

    • Replaced xml.etree.ElementTree #5565 [radarhere]

    ... (truncated)

    Commits
    • 8013f13 8.3.2 version bump
    • 23c7ca8 Update CHANGES.rst
    • 8450366 Update release notes
    • a0afe89 Update test case
    • 9e08eb8 Raise ValueError if color specifier is too long
    • bd5cf7d FLI tests for Oss-fuzz crash.
    • 94a0cf1 Fix 6-byte OOB read in FliDecode
    • cece64f Add 8.3.2 (2021-09-02) [CI skip]
    • e422386 Add release notes for Pillow 8.3.2
    • 08dcbb8 Pillow 8.3.2 supports Python 3.10 [ci skip]
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump fastapi from 0.60.1 to 0.65.2 in /fastapi

    Bump fastapi from 0.60.1 to 0.65.2 in /fastapi

    Bumps fastapi from 0.60.1 to 0.65.2.

    Release notes

    Sourced from fastapi's releases.

    0.65.2

    Security fixes

    This change fixes a CSRF security vulnerability when using cookies for authentication in path operations with JSON payloads sent by browsers.

    In versions lower than 0.65.2, FastAPI would try to read the request payload as JSON even if the content-type header sent was not set to application/json or a compatible JSON media type (e.g. application/geo+json).

    So, a request with a content type of text/plain containing JSON data would be accepted and the JSON data would be extracted.

    But requests with content type text/plain are exempt from CORS preflights, for being considered Simple requests. So, the browser would execute them right away including cookies, and the text content could be a JSON string that would be parsed and accepted by the FastAPI application.

    See CVE-2021-32677 for more details.

    Thanks to Dima Boger for the security report! 🙇🔒

    Internal

    0.65.1

    Security fixes

    0.65.0

    Breaking Changes - Upgrade

    • ⬆️ Upgrade Starlette to 0.14.2, including internal UJSONResponse migrated from Starlette. This includes several bug fixes and features from Starlette. PR #2335 by @​hanneskuettner.

    Translations

    Internal

    0.64.0

    Features

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump pillow from 9.0.1 to 9.3.0 in /fastapi

    Bump pillow from 9.0.1 to 9.3.0 in /fastapi

    Bumps pillow from 9.0.1 to 9.3.0.

    Release notes

    Sourced from pillow's releases.

    9.3.0

    https://pillow.readthedocs.io/en/stable/releasenotes/9.3.0.html

    Changes

    ... (truncated)

    Changelog

    Sourced from pillow's changelog.

    9.3.0 (2022-10-29)

    • Limit SAMPLESPERPIXEL to avoid runtime DOS #6700 [wiredfool]

    • Initialize libtiff buffer when saving #6699 [radarhere]

    • Inline fname2char to fix memory leak #6329 [nulano]

    • Fix memory leaks related to text features #6330 [nulano]

    • Use double quotes for version check on old CPython on Windows #6695 [hugovk]

    • Remove backup implementation of Round for Windows platforms #6693 [cgohlke]

    • Fixed set_variation_by_name offset #6445 [radarhere]

    • Fix malloc in _imagingft.c:font_setvaraxes #6690 [cgohlke]

    • Release Python GIL when converting images using matrix operations #6418 [hmaarrfk]

    • Added ExifTags enums #6630 [radarhere]

    • Do not modify previous frame when calculating delta in PNG #6683 [radarhere]

    • Added support for reading BMP images with RLE4 compression #6674 [npjg, radarhere]

    • Decode JPEG compressed BLP1 data in original mode #6678 [radarhere]

    • Added GPS TIFF tag info #6661 [radarhere]

    • Added conversion between RGB/RGBA/RGBX and LAB #6647 [radarhere]

    • Do not attempt normalization if mode is already normal #6644 [radarhere]

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump streamlit from 1.10.0 to 1.11.1 in /streamlit

    Bump streamlit from 1.10.0 to 1.11.1 in /streamlit

    Bumps streamlit from 1.10.0 to 1.11.1.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Streamlit requests may fail if FastAPI backend hasn't initialized yet

    Streamlit requests may fail if FastAPI backend hasn't initialized yet

    As the app is started with docker-compose up, the streamlit service is likely the fastest to come online (the fastapi service needs to do the PyTorch model load). If the user visits the streamlit page and fires a call, the result may be

    image

    because the fastapi service is not responding yet.

    The user should just wait a bit and then results should be returned OK, but it would be better to implement some sort of healthcheck so that streamlit requests can be handled more gracefully.

    bug help wanted 
    opened by davidefiocco 2
A minimal Streamlit app showing how to launch and stop a FastAPI process on demand

Simple Streamlit + FastAPI Integration A minimal Streamlit app showing how to launch and stop a FastAPI process on demand. The FastAPI /run route simu

Arvindra 18 Jan 2, 2023
CLI and Streamlit applications to create APIs from Excel data files within seconds, using FastAPI

FastAPI-Wrapper CLI & APIness Streamlit App Arvindra Sehmi, Oxford Economics Ltd. | Website | LinkedIn (Updated: 21 April, 2021) fastapi-wrapper is mo

Arvindra 49 Dec 3, 2022
Flask-vs-FastAPI - Understanding Flask vs FastAPI Web Framework. A comparison of two different RestAPI frameworks.

Flask-vs-FastAPI Understanding Flask vs FastAPI Web Framework. A comparison of two different RestAPI frameworks. IntroductionIn Flask is a popular mic

Mithlesh Navlakhe 1 Jan 1, 2022
Simple example of FastAPI + Celery + Triton for benchmarking

You can see the previous work from: https://github.com/Curt-Park/producer-consumer-fastapi-celery https://github.com/Curt-Park/triton-inference-server

Jinwoo Park (Curt) 37 Dec 29, 2022
Github timeline htmx based web app rewritten from Common Lisp to Python FastAPI

python-fastapi-github-timeline Rewrite of Common Lisp htmx app _cl-github-timeline into Python using FastAPI. This project tries to prove, that with h

Jan Vlčinský 4 Mar 25, 2022
FastAPI-Amis-Admin is a high-performance, efficient and easily extensible FastAPI admin framework. Inspired by django-admin, and has as many powerful functions as django-admin.

简体中文 | English 项目介绍 FastAPI-Amis-Admin fastapi-amis-admin是一个拥有高性能,高效率,易拓展的fastapi管理后台框架. 启发自Django-Admin,并且拥有不逊色于Django-Admin的强大功能. 源码 · 在线演示 · 文档 · 文

AmisAdmin 318 Dec 31, 2022
fastapi-admin2 is an upgraded fastapi-admin, that supports ORM dialects, true Dependency Injection and extendability

FastAPI2 Admin Introduction fastapi-admin2 is an upgraded fastapi-admin, that supports ORM dialects, true Dependency Injection and extendability. Now

Glib 14 Dec 5, 2022
:rocket: CLI tool for FastAPI. Generating new FastAPI projects & boilerplates made easy.

Project generator and manager for FastAPI. Source Code: View it on Github Features ?? Creates customizable project boilerplate. Creates customizable a

Yagiz Degirmenci 1k Jan 2, 2023
Пример использования GraphQL Ariadne с FastAPI и сравнение его с GraphQL Graphene FastAPI

FastAPI Ariadne Example Пример использования GraphQL Ariadne с FastAPI и сравнение его с GraphQL Graphene FastAPI - GitHub ###Запуск на локальном окру

ZeBrains Team 9 Nov 10, 2022
FastAPI Server Session is a dependency-based extension for FastAPI that adds support for server-sided session management

FastAPI Server-sided Session FastAPI Server Session is a dependency-based extension for FastAPI that adds support for server-sided session management.

DevGuyAhnaf 5 Dec 23, 2022
Code Specialist 27 Oct 16, 2022
Fastapi-ml-template - Fastapi ml template with python

FastAPI ML Template Run Web API Local $ sh run.sh # poetry run uvicorn app.mai

Yuki Okuda 29 Nov 20, 2022
Full stack, modern web application generator. Using FastAPI, PostgreSQL as database, Docker, automatic HTTPS and more.

Full Stack FastAPI and PostgreSQL - Base Project Generator Generate a backend and frontend stack using Python, including interactive API documentation

Sebastián Ramírez 10.8k Jan 8, 2023
This code generator creates FastAPI app from an openapi file.

fastapi-code-generator This code generator creates FastAPI app from an openapi file. This project is an experimental phase. fastapi-code-generator use

Koudai Aono 632 Jan 5, 2023
Easily integrate socket.io with your FastAPI app 🚀

fastapi-socketio Easly integrate socket.io with your FastAPI app. Installation Install this plugin using pip: $ pip install fastapi-socketio Usage To

Srdjan Stankovic 210 Dec 23, 2022
Instrument your FastAPI app

Prometheus FastAPI Instrumentator A configurable and modular Prometheus Instrumentator for your FastAPI. Install prometheus-fastapi-instrumentator fro

Tim Schwenke 441 Jan 5, 2023
Easily integrate socket.io with your FastAPI app 🚀

fastapi-socketio Easly integrate socket.io with your FastAPI app. Installation Install this plugin using pip: $ pip install fastapi-socketio Usage To

Srdjan Stankovic 37 Feb 12, 2021
Instrument your FastAPI app

Prometheus FastAPI Instrumentator A configurable and modular Prometheus Instrumentator for your FastAPI. Install prometheus-fastapi-instrumentator fro

Tim Schwenke 55 Feb 17, 2021
FastAPI Skeleton App to serve machine learning models production-ready.

FastAPI Model Server Skeleton Serving machine learning models production-ready, fast, easy and secure powered by the great FastAPI by Sebastián Ramíre

null 268 Jan 1, 2023