iloveflask is a Python library to collect functions that help a flask developer generate reports, config files and repeat code.

Related tags

FlaskIloveFlask
Overview

I Love Flask

iloveflask is a Python library to collect functions that help a flask developer generate reports, config files and repeat code.

Installation

Use the package manager pip to install Iloveflask.

pip install iloveflask

Usage

from iloveflask import main

# create requirements.txt
main.generate_requirements()

# create Dockerfile
main.generate_dockerfile(port, host)

# create docx report for API
main.generate_report(pathfile)

To use this lib run one or more of the following functions in the root of your flask project:

  • generate_requirements() : This is a simple function that allows you to create the requirements.txt file based on the libs installed in your development environment.

    main.generate_requirements()
    
  • generate_dockerfile(port, host) : It allows you to create a Docker file to deploy your API. It takes two parameters as input which are the port and the host.

    port: it's an integer that indicates the port of the API.

    host: it's a string that indicates the IP of the Host.

    main.generate_dockerfile(5000, "0.0.0.0")
    
  • genrate_report(pathtofile.py) : This function allows you to generate a .docx report for your API based on comments in your API.

    main.generate_report("path/to/file.py")
    

    So it is necessary to respect a certain type of comments here is an example of file APP.py which contains the code of the API plus the necessary comments :

      # flask_web/app.py
    
      # madeby:: The creators of the API separate by virgule
      '''
       desc:: This is the description of API:
        * L1 
        * L2
        * L3
       '''
      from flask import Flask
      app = Flask(__name__)
    
      @app.route('/hello')
      def hello_world():
        '''
         :fn: This is description of function
         :param p1: this is description of p1
         :param p2: this is description of p2
         :return: this is description of return
         '''
         return 'Hey!'
    
      @app.route('/hello/oldd')
      def hello_world():
        '''
        :fn: This is description of function
        :param p1: this is description of p1
        :return: this is description of return
        '''
         return 'Hey, we have  oldd!'
     if __name == '__main__':
        app.run()

TODO

  • Add CRUD generation code
  • Add generation of other config files
  • Add generation of Auth jwt code
  • ... your ideas

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

Please update the readme also when you add or modify a function.

License

MIT

Made with love by Sidi Mohamed Hicham ❤️ ❤️ ❤️

Flask-Rebar combines flask, marshmallow, and swagger for robust REST services.

Flask-Rebar Flask-Rebar combines flask, marshmallow, and swagger for robust REST services. Features Request and Response Validation - Flask-Rebar reli

PlanGrid 223 Dec 19, 2022
OpenTracing instrumentation for the Flask microframework

Flask-OpenTracing This package enables distributed tracing in Flask applications via The OpenTracing Project. Once a production system contends with r

3rd-Party OpenTracing API Contributions 133 Dec 19, 2022
Small flask based opds catalog designed to serve a directory via OPDS

teenyopds Small flask based opds catalog designed to serve a directory via OPDS, it has currently only been verified to work with KyBook 3 on iOS but

Adam Furbee 4 Jul 14, 2022
flask extension for integration with the awesome pydantic package

Flask-Pydantic Flask extension for integration of the awesome pydantic package with Flask. Installation python3 -m pip install Flask-Pydantic Basics v

249 Jan 06, 2023
A basic CRUD application built in flask using postgres as database

flask-postgres-CRUD A basic CRUD application built in flask using postgres as database Taks list Dockerfile Initial docker-compose - It is working Dat

Pablo Emídio S.S 9 Sep 25, 2022
A simple barcode and QR code generator built in Python with Flask.

✨ Komi - Barcode & QR Generator ✨ A simple barcode and QR code generator built in Python with Flask. 📑 Table of Contents Usage Installation Contribut

Bonnie Fave 2 Nov 04, 2021
5 Flask Projects To Get Started

5 Flask Projects Projects Made By Using Flask Projects List Rock Paper Scissor Game - A Simple Game Weather App - A OpenWeatherMap Scraper Task List -

Root_Arch 59 Dec 18, 2022
Flask webassets integration.

Integrates the webassets library with Flask, adding support for merging, minifying and compiling CSS and Javascript files. Documentation: https://flas

Michael Elsdörfer 433 Dec 29, 2022
A simple FastAPI web service + Vue.js based UI over a rclip-style clip embedding database.

Explore CLIP Embeddings in a rclip database A simple FastAPI web service + Vue.js based UI over a rclip-style clip embedding database. A live demo of

18 Oct 15, 2022
A Python chat app built with Flask that runs in the browser.

A Python chat app built with Flask that runs in the browser. Designed for local area networks that are not connected to the Internet.

Leonard Kleber 1 Dec 23, 2021
A simple demo of using aiogram + async sqlalchemy 1.4+

aiogram-and-sqlalchemy-demo A simple demo of using aiogram + async sqlalchemy 1.4+ Used tech: aiogram SQLAlchemy 1.4+ PostgreSQL as database asyncpg a

Aleksandr 68 Dec 31, 2022
Implement Instagram with flask

Blue club The place where manly men live and breathe. Move to Notion Move to Fig

3 Apr 07, 2022
A YouTube webscraper made with flask.

YouTube Webscraper This website is for you to check all the stats on your favorite Youtube video! Technologies Python Flask HTML CSS Pafy Contributing

Proconsulates 3 Nov 25, 2021
A Flask application for Subdomain Enumeration

subdomainer-flask A Flask application for Subdomain Enumeration steps to be done git clone https://github.com/gokulapap/subdomainer-flask pip3 install

GOKUL A.P 7 Sep 22, 2022
HTTP security headers for Flask

Talisman: HTTP security headers for Flask Talisman is a small Flask extension that handles setting HTTP headers that can help protect against a few co

Google Cloud Platform 853 Dec 19, 2022
Flask extension that takes care of API representation and authentication.

Flask-API-Utils Flask-API-Utils helps you to create APIs. It makes responses in appropriate formats, for instance, JSON. All you need to do is to retu

Marsel Mavletkulov 55 Aug 28, 2022
Adds Injector support to Flask.

Flask-Injector Adds Injector support to Flask, this way there's no need to use global Flask objects, which makes testing simpler. Injector is a depend

Alec Thomas 246 Dec 28, 2022
Boilerplate code for basic flask web apps

Flask Boilerplate This repository contains boilerplate code to start a project instantly It's mainly for projects which you plan to ship in less than

Abhishek 6 Sep 27, 2021
Forum written for learning purposes in flask and sqlalchemy

Flask-forum forum written for learning purposes using SQLalchemy and flask How to install install requirements pip install sqlalchemy flask clone repo

Kamil 0 May 23, 2022
SeCl - A really easy to deploy and use made-on Flask API to manage your files remotely from Terminal

SeCl SeCl it's a really easy to deploy and use made-on Flask API to manage your

ZSendokame 3 Jan 15, 2022