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
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

Michael Freeborn 465 Jan 07, 2023
Пример использования GraphQL Ariadne с FastAPI и сравнение его с GraphQL Graphene FastAPI

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

ZeBrains Team 9 Nov 10, 2022
An alternative implement of Imjad API | Imjad API 的开源替代

HibiAPI An alternative implement of Imjad API. Imjad API 的开源替代. 前言 由于Imjad API这是什么?使用人数过多, 致使调用超出限制, 所以本人希望提供一个开源替代来供社区进行自由的部署和使用, 从而减轻一部分该API的使用压力 优势

Mix Technology 450 Dec 29, 2022
A minimum reproducible repository for embedding panel in FastAPI

FastAPI-Panel A minimum reproducible repository for embedding panel in FastAPI Follow either This Tutorial or These steps below ↓↓↓ Clone the reposito

Tyler Houssian 15 Sep 22, 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
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 02, 2023
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
API for Submarino store

submarino-api API for the submarino e-commerce documentation read the documentation in: https://submarino-api.herokuapp.com/docs or in https://submari

Miguel 1 Oct 14, 2021
🚀 Cookiecutter Template for FastAPI + React Projects. Using PostgreSQL, SQLAlchemy, and Docker

FastAPI + React · A cookiecutter template for bootstrapping a FastAPI and React project using a modern stack. Features FastAPI (Python 3.8) JWT authen

Gabriel Abud 1.4k Jan 02, 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
Slack webhooks API served by FastAPI

Slackers Slack webhooks API served by FastAPI What is Slackers Slackers is a FastAPI implementation to handle Slack interactions and events. It serves

Niels van Huijstee 68 Jan 05, 2023
An extension library for FastAPI framework

FastLab An extension library for FastAPI framework Features Logging Models Utils Routers Installation use pip to install the package: pip install fast

Tezign Lab 10 Jul 11, 2022
Signalling for FastAPI.

fastapi-signals Signalling for FastAPI.

Henshal B 7 May 04, 2022
A RESTful API for creating and monitoring resource components of a hypothetical build system. Built with FastAPI and pydantic. Complete with testing and CI.

diskspace-monitor-CRUD Background The build system is part of a large environment with a multitude of different components. Many of the components hav

Nick Hopewell 67 Dec 14, 2022
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 05, 2023
Starlette middleware for Prerender

Prerender Python Starlette Starlette middleware for Prerender Documentation: https://BeeMyDesk.github.io/prerender-python-starlette/ Source Code: http

BeeMyDesk 14 May 02, 2021
Adds integration of the Chameleon template language to FastAPI.

fastapi-chameleon Adds integration of the Chameleon template language to FastAPI. If you are interested in Jinja instead, see the sister project: gith

Michael Kennedy 124 Nov 26, 2022
A Python framework to build Slack apps in a flash with the latest platform features.

Bolt for Python A Python framework to build Slack apps in a flash with the latest platform features. Read the getting started guide and look at our co

SlackAPI 684 Jan 09, 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
Fastapi performans monitoring

Fastapi-performans-monitoring This project is a simple performance monitoring for FastAPI. License This project is licensed under the terms of the MIT

bilal alpaslan 11 Dec 31, 2022