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

SQLAlchemy database migrations for Flask applications using Alembic

Flask-Migrate Flask-Migrate is an extension that handles SQLAlchemy database migrations for Flask applications using Alembic. The database operations

Miguel Grinberg 2.2k Dec 28, 2022
flask-reactize is a boostrap to serve any React JS application via a Python back-end, using Flask as web framework.

flask-reactize Purpose Developing a ReactJS application requires to use nodejs as back end server. What if you want to consume external APIs: how are

Julien Chomarat 4 Jan 11, 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
Basic flask system for login, api, and status system

Flask Multi Site With Login This is a basic website login system with an uncomplete api system NOTICE : This is NOT complete and is made to be a bare

MrShoe 0 Feb 02, 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
Criando um Bot com PYAUTOGUI e utilizando o Flask para Interface para Usuário

Criando um Bot com PYAUTOGUI e utilizando o Flask para Interface para Usuário O pyautogui foi escolhido pela possibilidade de fazer a identificação do

Rodrigo Vital 2 Oct 20, 2021
retorna informações de pessoas que não existem

random-person-api API que entrega dados aleatórios sobre pessoas que (provavelmente) não existem. Como usar? Copie o link abaixo https://random-person

Miguel 3 Aug 09, 2022
Heroku Flask Setup

Heroku Flask Setup

Abhimanyu Haralukallu 0 Dec 07, 2021
Companion code to my O'Reilly book "Flask Web Development", second edition.

Flasky This repository contains the source code examples for the second edition of my O'Reilly book Flask Web Development. The commits and tags in thi

Miguel Grinberg 8k Dec 27, 2022
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
This is a repository for a playlist of videos where I teach building RESTful API with Flask and Flask extensions.

Build And Deploy A REST API with Flask This is code for a series of videos in which we look at the various concepts involved when building a REST API

Ssali Jonathan 10 Nov 24, 2022
Burp-UI is a web-ui for burp backup written in python with Flask and jQuery/Bootstrap

Burp-UI Contents Introduction Screenshots Demo What's that? Who are you? Documentation FAQ Community Notes See also Licenses Thanks Introduction Scree

Benjamin 84 Dec 20, 2022
Flask-Starter is a boilerplate starter template designed to help you quickstart your Flask web application development.

Flask-Starter Flask-Starter is a boilerplate starter template designed to help you quickstart your Flask web application development. It has all the r

Kundan Singh 259 Dec 26, 2022
A simple example using Flask inside a container

This is a simple example of how create a container for a Python Flask Web Application using Docker.

Fazt Web 8 Aug 30, 2022
A solid foundation for your flask app

Flask Foundation There is a cookiecutter version of this repo at https://github.com/JackStouffer/cookiecutter-Flask-Foundation. Documentation is locat

Jack Stouffer 1.3k Dec 11, 2022
Adds GraphQL support to your Flask application.

Flask-GraphQL Adds GraphQL support to your Flask application. Usage Just use the GraphQLView view from flask_graphql from flask import Flask from flas

GraphQL Python 1.3k Jan 03, 2023
Sample Dockerized flask app deployed on Kubernetes on Azure using AKS

Sample Dockerized flask app deployed on Kubernetes on Azure using AKS

Ahmed khémiri 22 Sep 08, 2021
A Flask web application that manages student entries in a SQL database

Student Database App This is a Flask web application that manages student entries in a SQL database. Users can upload a CSV into the SQL database, mak

rebecca 1 Oct 20, 2021
Browsable web APIs for Flask.

Flask API Browsable web APIs for Flask. Status: This project is in maintenance mode. The original author (Tom Christie) has shifted his focus to API S

Flask API 1.3k Jan 05, 2023