Utils for fastapi based services.

Overview

coverage PyPI version fury.io PyPI pyversions Documentation Status MIT License Powered by Dephell

Installation

    pip install fastapi-serviceutils

Usage

For more details and usage see: readthedocs

Development

Getting started

After cloning the repository initialize the development environment using:

    make init

This will create the dev environment exampleservice/dev. Activate it using:

    poetry shell

Note:

Make sure to always activate the environment when you start working on the project in a new terminal using

    poetry shell

ATTENTION: the environment should also be activated before using make.

Updating dependencies

After each change in dependencies defined at pyproject.toml run the following to ensure the environment-definition and lock-file are up to date:

    make update

Checking with linters and checkers

To run all pre-commit-hooks manually run:

    make check

Info about project-state

To show summary about project run:

    make info

Documentation

The project's developer documentation is written using Sphinx.

The documentation sources can be found in the docs subdirectory.

The API-documentation is auto-generated from the docstrings of modules, classes, and functions. We're using the Google docstring standard.

To generate the documentation, run:

    make docs

The output for generated HTML files is in the docs/_build directory.

Tests

For testing we use pytest, for details see Pytest Docs. To run all tests:

    make tests
You might also like...
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

🐞 A debug toolbar for FastAPI based on the original django-debug-toolbar. 🐞

Debug Toolbar 🐞 A debug toolbar for FastAPI based on the original django-debug-toolbar. 🐞 Swagger UI & GraphQL are supported. Documentation: https:/

Github timeline htmx based web app rewritten from Common Lisp to Python FastAPI
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

Basic fastapi blockchain - An api based blockchain with full functionality

Basic fastapi blockchain - An api based blockchain with full functionality

Redis-based rate-limiting for FastAPI

Redis-based rate-limiting for FastAPI

A dynamic FastAPI router that automatically creates CRUD routes for your models
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

Adds simple SQLAlchemy support to FastAPI

FastAPI-SQLAlchemy FastAPI-SQLAlchemy provides a simple integration between FastAPI and SQLAlchemy in your application. It gives access to useful help

Opinionated set of utilities on top of FastAPI

FastAPI Contrib Opinionated set of utilities on top of FastAPI Free software: MIT license Documentation: https://fastapi-contrib.readthedocs.io. Featu

Reusable utilities for FastAPI

Reusable utilities for FastAPI Documentation: https://fastapi-utils.davidmontague.xyz Source Code: https://github.com/dmontagu/fastapi-utils FastAPI i

Comments
  • ERROR InstallationError: Invalid requirement: 'app/main.py'

    ERROR InstallationError: Invalid requirement: 'app/main.py'

    Bootstrapped example app with following results

    dephell inspect venv
    

    results in:

    {
      "activate": "/Users/<devcomp>/.local/share/dephell/venvs/<my_app>-IrrL/main/bin/activate.fish",
      "bin": "/Users/<devcomp>/.local/share/dephell/venvs/<my_app>-IrrL/main/bin",
      "exists": true,
      "lib": "/Users/<devcomp>/.local/share/dephell/venvs/<my_app>-IrrL/main/lib/python3.7/site-packages",
      "lib_size": "9.87Mb",
      "project": "/Users/<devcomp>/<Apps Dir>/<my_app>",
      "python": "/Users/<devcomp>/.local/share/dephell/venvs/<my_app>-IrrL/main/bin/python",
      "venv": "/Users/<devcomp>/.local/share/dephell/venvs/<my_app>-IrrL/main"
    }
    

    issue is as follows:

    dephell venv run app/main.py
    WARNING executable is not found in venv, trying to install... (executable=app/main.py)
    ERROR InstallationError: Invalid requirement: 'app/main.py' (from line 1 of /var/folders/mr/3ctw8jvj4jdfk_sznlwnhv7m0000gn/T/tmphv2x_qlu)
    Hint: It looks like a path. File 'app/main.py' does not exist. 
    
    opened by phyxavier 7
  • create_service command git error

    create_service command git error

    after installing fastapi_serviceutils I try running the following command,

    create_service -n exampleservice -p 9999 -a "John Doe" -e [email protected] -ep example -o /Documents 
    

    I get the following error message,

    [email protected] ~ % create_service -n exampleservice -p 9999 -a "John Doe" -e [email protected] -ep example -o /Documents 
    Traceback (most recent call last):
      File "/Library/Frameworks/Python.framework/Versions/3.9/bin/create_service", line 8, in <module>
        sys.exit(main())
      File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/fastapi_serviceutils/cli/create_service.py", line 107, in main
        filepath = clone(
      File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/cookiecutter/vcs.py", line 101, in clone
        subprocess.check_output(
      File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 424, in check_output
        return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
      File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/subprocess.py", line 528, in run
        raise CalledProcessError(retcode, process.args,
    subprocess.CalledProcessError: Command '['git', 'clone', 'ssh://[email protected]/skallfass/fastapi_serviceutils_template.git']' returned non-zero exit status 128.
    

    I simply followed up the following guideline https://fastapi-serviceutils.readthedocs.io/en/latest/exampleservice.html#creating-new-service

    could anyone please help resolving this issue? many thanks

    opened by ghost 0
  • Error: pg_config executable not found.

    Error: pg_config executable not found.

    Hi there, Great idea for providing all of this together, although I think it's possibly a little too opinionated for general use. But it's really well laid out. Nice job!

    Somewhere in the setup.py it expects the postgres binary to be available. I hit this error when it was not.

    Thanks!

    opened by philwinder 1
Releases(2.1.0)
Owner
Simon Kallfass
Simon Kallfass
A web application using [FastAPI + streamlit + Docker] Neural Style Transfer (NST) refers to a class of software algorithms that manipulate digital images

Neural Style Transfer Web App - [FastAPI + streamlit + Docker] NST - application based on the Perceptual Losses for Real-Time Style Transfer and Super

Roman Spiridonov 3 Dec 05, 2022
REST API with FastAPI and JSON file.

FastAPI RESTAPI with a JSON py 3.10 First, to install all dependencies, in ./src/: python -m pip install -r requirements.txt Second, into the ./src/

Luis Quiñones Requelme 1 Dec 15, 2021
A Sample App to Demonstrate React Native and FastAPI Integration

React Native - Service Integration with FastAPI Backend. A Sample App to Demonstrate React Native and FastAPI Integration UI Based on NativeBase toolk

YongKi Kim 4 Nov 17, 2022
A utility that allows you to use DI in fastapi without Depends()

fastapi-better-di What is this ? fastapi-better-di is a utility that allows you to use DI in fastapi without Depends() Installation pip install fastap

Maxim 9 May 24, 2022
FastAPI with async for generating QR codes and bolt11 for Lightning Addresses

sendsats An API for getting QR codes and Bolt11 Invoices from Lightning Addresses. Share anywhere; as a link for tips on a twitter profile, or via mes

Bitkarrot 12 Jan 07, 2023
A server hosts a FastAPI application and multiple clients can be connected to it via SocketIO.

FastAPI_and_SocketIO A server hosts a FastAPI application and multiple clients can be connected to it via SocketIO. Executing server.py sets up the se

Ankit Rana 2 Mar 04, 2022
FastAPI Project Template

The base to start an openapi project featuring: SQLModel, Typer, FastAPI, JWT Token Auth, Interactive Shell, Management Commands.

A.Freud 4 Dec 05, 2022
FastAPI with Docker and Traefik

Dockerizing FastAPI with Postgres, Uvicorn, and Traefik Want to learn how to build this? Check out the post. Want to use this project? Development Bui

51 Jan 06, 2023
API Simples com python utilizando a biblioteca FastApi

api-fastapi-python API Simples com python utilizando a biblioteca FastApi Para rodar esse script são necessárias duas bibliotecas: Fastapi: Comando de

Leonardo Grava 0 Apr 29, 2022
A FastAPI Framework for things like Database, Redis, Logging, JWT Authentication and Rate Limits

A FastAPI Framework for things like Database, Redis, Logging, JWT Authentication and Rate Limits Install You can install this Library with: pip instal

Tert0 33 Nov 28, 2022
This is an API developed in python with the FastApi framework and putting into practice the recommendations of the book Clean Architecture in Python by Leonardo Giordani,

This is an API developed in python with the FastApi framework and putting into practice the recommendations of the book Clean Architecture in Python by Leonardo Giordani,

0 Sep 24, 2022
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
Utils for fastapi based services.

Installation pip install fastapi-serviceutils Usage For more details and usage see: readthedocs Development Getting started After cloning the repo

Simon Kallfass 31 Nov 25, 2022
A Flask extension that enables or disables features based on configuration.

Flask FeatureFlags This is a Flask extension that adds feature flagging to your applications. This lets you turn parts of your site on or off based on

Rachel Greenfield 131 Sep 26, 2022
Docker image with Uvicorn managed by Gunicorn for high-performance FastAPI web applications in Python 3.6 and above with performance auto-tuning. Optionally with Alpine Linux.

Supported tags and respective Dockerfile links python3.8, latest (Dockerfile) python3.7, (Dockerfile) python3.6 (Dockerfile) python3.8-slim (Dockerfil

Sebastián Ramírez 2.1k Dec 31, 2022
CURSO PROMETHEUS E GRAFANA: Observability in a real world

Curso de monitoração com o Prometheus Esse curso ensina como usar o Prometheus como uma ferramenta integrada de monitoração, entender seus conceitos,

Rafael Cirolini 318 Dec 23, 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
🚢 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
A simple example of deploying FastAPI as a Zeit Serverless Function

FastAPI Zeit Now Deploy a FastAPI app as a Zeit Serverless Function. This repo deploys the FastAPI SQL Databases Tutorial to demonstrate how a FastAPI

Paul Weidner 26 Dec 21, 2022
Basic fastapi blockchain - An api based blockchain with full functionality

Basic fastapi blockchain - An api based blockchain with full functionality

1 Nov 27, 2021