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
Ansible Inventory Plugin, created to get hosts from HTTP API.

ansible-ws-inventory-plugin Ansible Inventory Plugin, created to get hosts from HTTP API. Features: Database compatible with MongoDB and Filesystem (J

Carlos Neto 0 Feb 05, 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
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
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
Simple web app example serving a PyTorch model using streamlit and FastAPI

streamlit-fastapi-model-serving Simple example of usage of streamlit and FastAPI for ML model serving described on this blogpost and PyConES 2020 vide

Davide Fiocco 291 Jan 06, 2023
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
Stac-fastapi built on Tile38 and Redis to support caching

stac-fastapi-caching Stac-fastapi built on Tile38 to support caching. This code is built on top of stac-fastapi-elasticsearch 0.1.0 with pyle38, a Pyt

Jonathan Healy 4 Apr 11, 2022
Qwerkey is a social media platform for connecting and learning more about mechanical keyboards built on React and Redux in the frontend and Flask in the backend on top of a PostgreSQL database.

Flask React Project This is the backend for the Flask React project. Getting started Clone this repository (only this branch) git clone https://github

Peter Mai 22 Dec 20, 2022
Cube-CRUD is a simple example of a REST API CRUD in a context of rubik's cube review service.

Cube-CRUD is a simple example of a REST API CRUD in a context of rubik's cube review service. It uses Sqlalchemy ORM to manage the connection and database operations.

Sebastian Andrade 1 Dec 11, 2021
implementation of deta base for FastAPIUsers

FastAPI Users - Database adapter for Deta Base Ready-to-use and customizable users management for FastAPI Documentation: https://fastapi-users.github.

2 Aug 15, 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
Opinionated authorization package for FastAPI

FastAPI Authorization Installation pip install fastapi-authorization Usage Currently, there are two models available: RBAC: Role-based Access Control

Marcelo Trylesinski 18 Jul 04, 2022
Cookiecutter template for FastAPI projects using: Machine Learning, Poetry, Azure Pipelines and Pytests

cookiecutter-fastapi In order to create a template to FastAPI projects. 🚀 Important To use this project you don't need fork it. Just run cookiecutter

Arthur Henrique 225 Dec 28, 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 01, 2022
FastAPI CRUD template using Deta Base

Deta Base FastAPI CRUD FastAPI CRUD template using Deta Base Setup Install the requirements for the CRUD: pip3 install -r requirements.txt Add your D

Sebastian Ponce 2 Dec 15, 2021
Minecraft biome tile server writing on Python using FastAPI

Blocktile Minecraft biome tile server writing on Python using FastAPI Usage https://blocktile.herokuapp.com/overworld/{seed}/{zoom}/{col}/{row}.png s

Vladimir 2 Aug 31, 2022
Practice-python is a simple Fast api project for dealing with modern rest api technologies.

Practice Python Practice-python is a simple Fast api project for dealing with modern rest api technologies. Deployment with docker Go to the project r

0 Sep 19, 2022
Hook Slinger acts as a simple service that lets you send, retry, and manage event-triggered POST requests, aka webhooks

Hook Slinger acts as a simple service that lets you send, retry, and manage event-triggered POST requests, aka webhooks. It provides a fully self-contained docker image that is easy to orchestrate, m

Redowan Delowar 96 Jan 02, 2023
Пример использования GraphQL Ariadne с FastAPI и сравнение его с GraphQL Graphene FastAPI

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

ZeBrains Team 9 Nov 10, 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