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

Heroku Flask Setup

Heroku Flask Setup

Abhimanyu Haralukallu 0 Dec 07, 2021
A nice anonymous messaging api (Uses Flask's restful api)

anonymous-message-api A nice anonymous message api (Uses Flask's restful api) How it works: 1. The user send a put request to your api server: Require

6 Nov 07, 2021
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
Flask app for deploying DigitalOcean droplet using Pulumi.

Droplet Deployer Simple Flask app which deploys a droplet onto Digital ocean. Behind the scenes there's Pulumi being used. Background I have been Terr

Ahmed Sajid 1 Oct 30, 2021
A template for Flask APIs.

FlaskAPITempate A template for a Flask API. Why tho? I just wanted an easy way to create a Flask API. How to setup First, use the template. You can do

TechStudent10 1 Dec 28, 2021
Brandnew-flask is a CLI tool used to generate a powerful and mordern flask-app that supports the production environment.

Brandnew-flask is still in the initial stage and needs to be updated and improved continuously. Everyone is welcome to maintain and improve this CLI.

brandonye 4 Jul 17, 2022
Flask Multiple Database Login

Flask Multiple Database Login Handle login with flask using two diferent databases: UE | European; BR | Brazilian; These databases are separed to resp

Jose Pedro 1 Dec 16, 2021
Simple flask api. Countdown to next train for each station in the subway system.

Simple flask api. Countdown to next train for each station in the subway system.

Kalyani Subbiah 0 Apr 17, 2022
A web application for a fake pizza store, built in Python with Flask and PostgreSQL.

✨ Pizza Pizza - Pizza Store ✨ A web application for a fake Pizza Store, the app let you create an account and order pizza, complements or drinks. Buil

Bonnie Fave 6 Dec 18, 2022
A basic JSON-RPC implementation for your Flask-powered sites

Flask JSON-RPC A basic JSON-RPC implementation for your Flask-powered sites. Some reasons you might want to use: Simple, powerful, flexible and python

Cenobit Technologies 272 Jan 04, 2023
Implement Instagram with flask

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

3 Apr 07, 2022
Track requests to your Flask website with Matomo

Flask-Matomo Flask-Matomo is a library which lets you track the requests of your Flask website using Matomo (Piwik). Installation pip install flask-ma

Lucas Hild 13 Jul 14, 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
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
Flask Sitemapper is a small Python 3 package that generates XML sitemaps for Flask applications.

Flask Sitemapper Flask Sitemapper is a small Python 3 package that generates XML sitemaps for Flask applications. This allows you to create a nice and

6 Jan 06, 2023
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
Lightweight library for providing filtering mechanism for your APIs using SQLAlchemy

sqlalchemy-filters-plus is a light-weight extendable library for filtering queries with sqlalchemy. Install pip install sqlalchemy-fitlers-plus Usage

Karami El Mehdi 38 Oct 05, 2022
Pf-flask-rest-com - Flask REST API Common Implementation by Problem Fighter Library

In the name of God, the Most Gracious, the Most Merciful. PF-Flask-Rest-Com Docu

Problem Fighter 3 Jan 15, 2022
Quick and simple security for Flask applications

Note This project is non maintained anymore. Consider the Flask-Security-Too project as an alternative. Flask-Security It quickly adds security featur

Matt Wright 1.6k Dec 19, 2022
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