seven-technologies-cloud / pythonrest

Creative Commons Zero v1.0 Universal
10 stars 4 forks source link

PythonREST CLI

Logo

PythonREST is the ultimate full API generator for Python language. Based on the best performing frameworks and software development best practices, PythonREST can create an entire CRUD API in minutes or seconds based on your relational database on a single CLI command. This allows you to create your APIs from scratch and update your current API previously created with our tool to always match your latest database definitions.

THIS WILL SAVE YOU MONTHS OF DEVELOPMENT TIME, GUARANTEED!

Your new generated API will have full CRUD compatibility with your mapped database and full swagger documentation and specs available. With your new API in hand, you will be able to containerize or serverless deploy it to any local, private and public cloud providers of your choice and use it at will! If you're interested in taking your API to the next level and don't know how, please inquiry us on the email below for consultancies.

This project is under active enhancement and we have several open GitHub issues so we can improve it even further, if you're an Open Source enthusiast and wish to contribute, we'd be more than happy to have you on our team! Get in touch via admin@seventechnologies if you have any doubts or suggestions and don't forget to star rate our repo!

If you like our solution, please consider donating on our Patreon campaign!


How Is PythonREST good for Developers?

PythonREST allows you to have an entire CRUD API ready in minutes or seconds to fully manipulate your relational database. This will allow you to only need to write code specifically for functions that require third party integration or have super complex business rules. These are the project possibilities our project can provide you:

How Is PythonREST good for your Business?

PythonREST allows you to create Web, Mobile Apps, SaaS products or simply manage data transactions from your database in an easy and automated way. This will empower your teams and make your product lifecycles smoother and cleaner and will enable your to launch faster and more reliable products:

Key features

Installation

To begin working with PythonREST, you can visit our website's download page and download the installer for your system or if you're more familiar with package managers, we have options for that below.

Chocolatey

choco install pythonrest

Pip

pip install pythonrest3

⚠️ Disclaimer for Mac users

As of now, pythonrest may fail on installation or present some errors when trying to use it, showing issues with the pymssql library, this is due to the latter having some issues to install on Mac machines, sometimes the library is installed but presents some errors on usage and other times it does not even complete installation. So, if you have issues with it to install/run pythonrest, follow the below steps to fix pymssql:

pip uninstall pymssql
brew install FreeTDS
brew install openssl
pip install --upgrade pip setuptools
pip install cython --upgrade
pip install wheel --upgrade
pip install pip --upgrade
export CFLAGS="-I$(brew --prefix openssl)/include"
export LDFLAGS="-L$(brew --prefix openssl)/lib -L/usr/local/opt/openssl/lib"
export CPPFLAGS="-I$(brew --prefix openssl)/include"
pip install --pre --no-binary :all: pymssql --no-cache

After a successful installation of pymssql, you can then proceed with the installation of pythonrest using pip or the download on the website

Prerequisites

To use PythonREST, you must have Python 3.11 installed on your machine. You'll also need credentials that can connect to your desired database so that the generator can access it and create your API. If you're not familiar with creating and connecting to relational databases, you can check these articles written by us at Seven Technologies on how to create local databases (MySQL, PostgreSQL, SQLServer and MariaDB) using Docker and connect to it.

Usage

Here are some pythonrest usage examples:

Check version:

pythonrest version

Generate APIs based on MySQL databases:

pythonrest generate --mysql-connection-string mysql://<USER>:<PASSWORD>@<ENDPOINT>:<PORT>/<SCHEMA>

Generate APIs based on Postgres databases:

pythonrest generate --postgres-connection-string postgresql://<USER>:<PASSWORD>@<ENDPOINT>:<PORT>/<DATABASE_NAME>?options=-c%20search_path=<SCHEMA>,public

Generate APIs based on SQLServer databases:

pythonrest generate --sqlserver-connection-string mssql://<USER>:<PASSWORD>@<ENDPOINT>:<PORT>/<SCHEMA>

Generate APIs based on MariaDB databases:

pythonrest generate --mariadb-connection-string mariadb://<USER>:<PASSWORD>@<ENDPOINT>:<PORT>/<SCHEMA>

Generate APIs based on Aurora MySQL databases:

pythonrest generate --mysql-connection-string mysql://<USER>:<PASSWORD>@<ENDPOINT>:<PORT>/<SCHEMA>

Generate APIs based on Aurora Postgres databases:

pythonrest generate --postgres-connection-string postgresql://<USER>:<PASSWORD>@<ENDPOINT>:<PORT>/<DATABASE_NAME>?options=-c%20search_path=<SCHEMA>,public

Use authentications

- SSH Password

Generate MySQL database-based APIs with ssh password authentication:

pythonrest generate --mysql-connection-string mysql://<USER>:<PASSWORD>@<ENDPOINT>:<PORT>/<SCHEMA> --ssh-password-authenticatio-string ssh://<USER>:<PASSWORD>@<ENDPOINT>:<PORT>?local_bind_port=<LOCAL_BIND_PORT>

Generate MariaDB database-based APIs with ssh password authentication:

pythonrest generate --mariadb-connection-string mariadb://<USER>:<PASSWORD>@<ENDPOINT>:<PORT>/<SCHEMA> --ssh-password-authenticatio-string ssh://<USER>:<PASSWORD>@<ENDPOINT>:<PORT>?local_bind_port=<LOCAL_BIND_PORT>

Generate SQLServer database-based APIs with ssh password authentication:

pythonrest generate --sqlserver-connection-string mssql://<USER>:<PASSWORD>@<ENDPOINT>:<PORT>/<SCHEMA> --ssh-password-authenticatio-string ssh://<USER>:<PASSWORD>@<ENDPOINT>:<PORT>?local_bind_port=<LOCAL_BIND_PORT>

Generate Postgres database-based APIs with ssh password authentication:

pythonrest generate --postgres-connection-string postgresql://<USER>:<PASSWORD>@<ENDPOINT>:<PORT>/<DATABASE_NAME>?options=-c%20search_path=<SCHEMA>,public --ssh-password-authenticatio-string ssh://<USER>:<PASSWORD>@<ENDPOINT>:<PORT>?local_bind_port=<LOCAL_BIND_PORT>

- SSH Public Key

Generate MySQL database-based APIs with ssh public key authentication:

pythonrest generate --mysql-connection-string mysql://<USER>:<PASSWORD>@<ENDPOINT>:<PORT>/<SCHEMA> --ssh-publickey-authentication-string ssh://<USER>:<PASSWORD>@<ENDPOINT>:<PORT>?key_path=/path/your/public/key/id_rsa

Generate MariaDB database-based APIs with ssh public key authentication:

pythonrest generate --mariadb-connection-string mariadb://<USER>:<PASSWORD>@<ENDPOINT>:<PORT>/<SCHEMA> --ssh-publickey-authentication-string ssh://<USER>:<PASSWORD>@<ENDPOINT>:<PORT>?key_path=/path/your/public/key/id_rsa

Generate SQLServer database-based APIs with ssh public key authentication:

pythonrest generate --sqlserver-connection-string mssql://<USER>:<PASSWORD>@<ENDPOINT>:<PORT>/<SCHEMA> --ssh-publickey-authentication-string ssh://<USER>:<PASSWORD>@<ENDPOINT>:<PORT>?key_path=/path/your/public/key/id_rsa

Generate Postgres database-based APIs with ssh public key authentication:

pythonrest generate --postgres-connection-string postgresql://<USER>:<PASSWORD>@<ENDPOINT>:<PORT>/<DATABASE_NAME>?options=-c%20search_path=<SCHEMA>,public --ssh-publickey-authentication-string ssh://<USER>:<PASSWORD>@<ENDPOINT>:<PORT>?key_path=/path/your/public/key/id_rsa

- SSL

Generate MySQL database-based APIs with ssl authentication:

pythonrest generate --mysql-connection-string mysql://<USER>:<PASSWORD>@<ENDPOINT>:<PORT>/<SCHEMA> --ssl-authentication-string ssl://ssl_ca=./path/your/ssl/ca-cert.pem?ssl_cert=./path/your/ssl/server-cert.pem?ssl_key=./path/your/ssl/server-key.pem?hostname=<HOST>

Generate MariaDB database-based APIs with ssl authentication:

pythonrest generate --mariadb-connection-string mariadb://<USER>:<PASSWORD>@<ENDPOINT>:<PORT>/<SCHEMA> --ssl-authentication-string ssl://ssl_ca=./path/your/ssl/ca-cert.pem?ssl_cert=./path/your/ssl/server-cert.pem?ssl_key=./path/your/ssl/server-key.pem?hostname=<HOST>

Generate SQLServer database-based APIs with ssl authentication:

pythonrest generate --sqlserver-connection-string mssql://<USER>:<PASSWORD>@<ENDPOINT>:<PORT>/<SCHEMA> --ssl-authentication-string ssl://ssl_ca=./path/your/ssl/ca-cert.pem?ssl_cert=./path/your/ssl/server-cert.pem?ssl_key=./path/your/ssl/server-key.pem?hostname=<HOST>

Generate Postgres database-based APIs with ssl authentication:

pythonrest generate --postgres-connection-string postgresql://<USER>:<PASSWORD>@<ENDPOINT>:<PORT>/<DATABASE_NAME>?options=-c%20search_path=<SCHEMA>,public --ssl-authentication-string ssl://ssl_ca=./path/your/ssl/ca-cert.pem?ssl_cert=./path/your/ssl/server-cert.pem?ssl_key=./path/your/ssl/server-key.pem?hostname=<HOST>

Custom options

--result-path:

By default, PythonREST will generate the API on your current directory under a PythonRestAPI folder. To define a custom path to your generated API please follow the example below:

pythonrest generate --mysql-connection-string <mysql_connection_string> --result-path C:\<YOUR_DESIRED_PATH_HERE>

The above will generate your API on the provided path, and if the folder does not exist the generator will create it. The following folders/files will be modified(content deleted and recreated) if a PythonREST project is already in place:

--use-pascal-case:

This option creates the Python Domain Classes with PascalCase pattern for their names, if this option is provided as --no-use-pascal-case, you will be prompted to provide a name of python class for each table of your database:

pythonrest generate --mysql-connection-string <MYSQL_CONNECTION_STRING> --no-use-pascal-case

--us-datetime:

If you have a database with datetime formatted to the us pattern of mm-dd-yyyy, you can use this option so that the api will also respect that pattern when validating requests and responses:

pythonrest generate --mysql-connection-string <MYSQL_CONNECTION_STRING> --us-datetime

This behavior can be modified on the project's environment variables file(src/e_Infra/g_Environment/EnvironmentVariables.py), modifying the date_valid_masks variable. Some valid values are(more options and details on the API Environment Variables section below):

--project-name:

This options allows the user to define a custom name for his project, which will be displayed on the Swagger and Redoc pages. If not defined, the default value for this parameter is PythonREST:

pythonrest generate --postgres-connection-string <POSTGRES_CONNECTION_STRING> --project-name MarketPlaceAPI

--uid-type:

This options allows the user to define if the Unique Identifier generation of the API will generate a UUIDv7 or a ULID. the allowed values are uuid and ulid. If not defined, the default value for this parameter is uuid:

pythonrest generate --sqlserver-connection-string <SQLSERVER_CONNECTION_STRING> --uid-type ulid

How to Run Generated API

After generating your API, you may open it on your preferred IDE(VSCode, PyCharm, etc) or even the bash/cmd if you wish to, from there you may build your venv like below to run the project.

How to Run with venv (Python virtual environment)

This project was initially built to run using a Python virtual environment, below we'll provide how to install the virtual environment and run the project on different systems:

Windows(CMD/Powershell):

  1. Create the venv First of all, you should open this project on your terminal, from now on all the commands will be run from the root folder of the project. Below is the command to create a python venv:
python -m venv venv
  1. Activate the virtual environment The below command is how to activate your venv for use on your current terminal session:
.\venv\Scripts\activate

The above command works fine for CMD or Powershell. If you are using GitBash to run these commands, the only change would be running the below command instead of the above one:

source venv/Scripts/activate
  1. Install required libraries for API to run This project needs a number of libraries stored on PyPi to run, these are all listed on the requirements.txt file on the root folder of the generated project and to be installed you run the below command:
pip install -r requirements.txt
  1. Run app.py After the libraries installation is complete, you can use the below command to run the project:
python app.py

From there you can access the URL localhost:5000, which is the base endpoint to go to the project routes and make requests following the API Usage Examples section on this readme, our blog and documentation at readthedocs

Linux/Mac(Bash/Zsh):

  1. Create the venv: On Debian/Ubuntu systems, you need to have the python3-venv package installed, which you can do with the following commands:
apt-get update
apt install python3.8-venv

And then you can create the venv with the following:

python3 -m venv venv
  1. Activate the virtual environment The below command is how to activate your venv for use on your current terminal session:
source venv/bin/activate
  1. Install required libraries for API to run This project needs a number of libraries stored on PyPi to run, these are all listed on the requirements.txt file on the root folder of the generated project and to be installed you run the below command:
pip install -r requirements.txt
  1. Run app.py After the libraries installation is complete, you can use the below command to run the project:
python app.py

From there you can access the URL localhost:5000, which is the base endpoint to go to the project routes and make requests following the API Usage Examples section on this readme, our blog and documentation at readthedocs

Add Environment Variables to use flask admin panel

To access the administration panel you have to add the two environment variables below:
```
os.environ['admin_panel_user'] = 'admin'
os.environ['admin_panel_password'] = 'admin'
```

Run and Debug using venv with VSCode

If you wish to go deep and debug the API, or simply wishes to run from VSCode Python extension, you'll want to configure a launch.json file for the API, to do that you'll go to the top bar of VSCode -> Run(if run is not visible, you may find it in the "..." on the title bar) -> Add Configuration. Doing that will generate your launch.json, in which you'll want to add a "python" key, similar to the example below:

{
  "version": "0.2.0",
  "configurations": [
    {
      "python": "${command:python.<full_path_to_your_venv_python_exe_file>}",
      "name": "Python: Current File",
      "type": "python",
      "request": "launch",
      "program": "${file}",
      "console": "integratedTerminal",
      "justMyCode": true
    }
  ]
}


API Usage Examples

After following the How to run section to its final steps, with your project running you can finally test the routes it creates, to follow the below examples, if you have a table named user, you would want to access localhost:5000/swagger/user to check the routes provided to that table.

Select All Table Entries


Starting with a basic use, you go to your swagger/, the first route is the get one, if you just hit "try it out" and then "execute", it will present you with a response equivalent to a SELECT * from query. If you wish to, you can use the available filters to select only the attributes that you want to retrieve, limit the number of results, paginate your results and so on. If you still did not have anything on your database to retrieve, it will just be an empty list, now we can get to our next use case to solve that!


Swagger Select all Users

Insert Table Entry


From the same swagger page we were in, the next route is the post /, in which when you hit "try it out" it will present you with a sample JSON body to insert an entry on your table. The JSON body sent on the request is a list, so if you wish to you can provide multiple entries at once on table with the same request, below is an example of a request inserting three entries on a simple pre-designed USER table with 'id_user', 'username' and 'date_joined' fields:


Swagger Insert User


Example JSON payload:

[
  {
    "id_user": 1,
    "username": "user1",
    "date_joined": "2000-01-01 12:00:00"
  },
  {
    "id_user": 2,
    "username": "user2",
    "date_joined": "2000-01-01 12:00:00"
  },
  {
    "id_user": 3,
    "username": "user3",
    "date_joined": "2000-01-01 12:00:00"
  }
]

Delete Table Entry


Now we're talking about the delete /user route, if you hit "try it out" it will also present you with a sample JSON body of a generic object of your table, you can then use that example, modify its values to suit an entry that exists on your database. Note that this is a delete by full match route, so you need to provide the correct values for all of the table collumns on your response, below is an example of JSON body to delete a user table entry that has 3 columns: id_user, username and date_joined:


Swagger Delete User


[
  {
    "id_user": 2,
    "username": "user2",
    "date_joined": "2000-01-01 12:00:00"
  }
]

For more detailed examples, please check our blog and documentation atreadthedocs

Swagger Overview

When running the API, it will provide you with a localhost url, then you have the following swagger pages accessible:

/swagger


That's the base route for viewing swagger, it contains the documentation of the SQL routes present on the application

Swagger Main Screen

/swagger/tablename


For each table on your database, PythonREST creates an openapi page documentation for it, in which you can make your database queries targetting each table. To access them, simply append to the swagger endpoint url your table name in flatcase (ALL WORDS TOGETHER IN LOWER CASE WITH NO SEPARATORS).

Swagger User Screen


Postman/cURL

If you're familiar with Postman or using cURL requests directly, you can make requests to the routes shown in the open api specification, using the examples of usage present on it to build your request. For example, a table user with id_user, username and date_joined fields would have a POST cURL request like:

curl -X 'POST' \
  'http://localhost:5000/user' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '[
  {
    "id_user": 1,
    "username": "first_user",
    "date_joined": "2024-01-01 12:00:00"
  }
]'


API Environment Variables

Generated API environment variables can be found on src/e_Infra/g_Environment/EnvironmentVariables.py and each one has the following utility:

Generated API Directory Structure

The generated API has a structure of a number of directories with sub-directories. This section will explain that division in order to enlighten the project for debugging and feature implementations. Taking from the root of the generated project, we have:

Requirements

Already listed within ./requirements.txt

To run and build this project, you need to have the above libraries installed on your machine, which you can do running the below command on the project root directory:

Windows

pip install -r requirements.txt

Linux/Mac

sudo pip install -r requirements.txt



For Contributors: How to run this project on terminal and VSCode

To run using the command line, you need to open this project root folder on the terminal and run the project startup file (pythonrest.py) with Python, that way you can test any modifications you made to the project without needing to build the binary everytime, just run the command below, remembering to replace the test database properties on it:

python pythonrest.py generate --mysql-connection-string mysql://<user_name>:<password>@<endpoint>:<port>/<schema>

Also, if you wish to debug this project, and you usually use VSCode with Microsoft's Python extension, you can create a launch configuration and put a structure similar to the below, only replacing the test database properties:

{
  "version": "0.2.0",
  "configurations": [
    {
      "name": "Python: Current File",
      "type": "debugpy",
      "request": "launch",
      "program": "pythonrest.py",
      "args": [
        "generate",
        "--mysql-connection-string",
        "mysql://<user_name>:<password>@<endpoint>:<port>/<schema>"
      ],
      "console": "integratedTerminal",
      "justMyCode": true
    }
  ]
}



For Contributors: How to Build Your Own Binaries and Installers

It is very important that you have all of the libraries used by the project (listed on requirements.txt) installed on your machine or on venv, because pyinstaller uses the versions of the libraries installed on your machine to build the binaries.

Windows

Building the CLI exe

Run from the root folder:

pyinstaller --onefile ^
    --add-data "pythonrest.py;." ^
    --add-data "databaseconnector;databaseconnector" ^
    --add-data 'domaingenerator;domaingenerator' ^
    --add-data 'apigenerator;apigenerator' ^
    --collect-submodules typing ^
    --collect-submodules re ^
    --collect-submodules typer ^
    --collect-submodules yaml ^
    --collect-submodules parse ^
    --collect-submodules mergedeep ^
    --collect-submodules site ^
    --collect-submodules pymysql ^
    --collect-submodules rsa ^
    --collect-submodules cryptography ^
    --collect-submodules cffi ^
    --collect-submodules pycparser ^
    --collect-submodules pyasn1 ^
    --collect-submodules psycopg2 ^
    --collect-submodules psycopg2-binary ^
    --collect-submodules pymssql ^
    --icon=pythonrestlogo.ico ^
    pythonrest.py

it will generate a dist folder with the pythonrest.exe file

Known Issues: When using pyinstaller with typing installed it generates the following error:

The 'typing' package is an obsolete backport of a standard library package and is incompatible with PyInstaller. Please remove this package

Just removing the package and retrying fixes that error.

Building the Installer exe

Move the pythonrest.exe file from the generated dist/ folder to the windowsinstaller/ folder and run from the latter folder:

pyinstaller ^
--onefile ^
--add-data "pythonrest.exe;." ^
--add-data "install_pythonrest.py;." ^
--add-data "addpythonresttouserpath.ps1;." ^
--icon=../pythonrestlogo.ico ^
--name PythonRESTInstaller install_pythonrest.py

Building the Uninstaller exe

Run from the windowsinstaller folder:

pyinstaller ^
--onefile ^
--add-data "uninstall_pythonrest.py;." ^
--add-data "removepythonrestfromuserpath.ps1;." ^
--icon=../pythonrestlogo.ico ^
--name PythonRESTUninstaller uninstall_pythonrest.py

Build exe, installer and uninstaller

run from windowsinstaller/ folder:

.\generate_pythonrest_executables.ps1

This will take care of running the above pyinstaller commands and it will generate both installer and uninstaller executables on PythonRestExecutables/ directory, which you can then run to install and/or uninstall the cli on your machine.

Linux/Mac

Building the CLI binary

Run from the root folder:

pyinstaller --onefile \
    --add-data "pythonrest.py:." \
    --add-data "databaseconnector:databaseconnector" \
    --add-data 'domaingenerator:domaingenerator' \
    --add-data 'apigenerator:apigenerator' \
    --collect-submodules typing \
    --collect-submodules re \
    --collect-submodules typer \
    --collect-submodules yaml \
    --collect-submodules parse \
    --collect-submodules mergedeep \
    --collect-submodules site \
    --collect-submodules pymysql \
    --collect-submodules rsa \
    --collect-submodules cryptography \
    --collect-submodules cffi \
    --collect-submodules pycparser \
    --collect-submodules pyasn1 \
    --collect-submodules psycopg2 \
    --collect-submodules psycopg2-binary \
    --collect-submodules pymssql \
    pythonrest.py

it will generate a dist folder with the pythonrest file

Known Issues: When using pyinstaller with typing installed it generates the following error:

The 'typing' package is an obsolete backport of a standard library package and is incompatible with PyInstaller. Please remove this package

Just removing the package and retrying fixes that error.

Building the Installer binary

Move the pythonrest file from the generated dist/ folder to the linuxinstaller/ or macinstaller/ folder and run from it:

pyinstaller \
    --onefile \
    --add-data "pythonrest:." \
    --add-data "install_pythonrest.py:." \
    --add-data "addpythonresttouserpath.sh:." \
    --name PythonRESTInstaller install_pythonrest.py

Building the Uninstaller binary

Run from the linuxinstaller/ or macinstaller/ folder:

pyinstaller \
    --onefile \
    --add-data "uninstall_pythonrest.py:." \
    --add-data "removepythonrestfromuserpath.sh:." \
    --name PythonRESTUninstaller uninstall_pythonrest.py

Build pythonrest, installer and uninstaller

Go to linuxinstaller/ or macinstaller/ folder and from it add execute permission on the script:

chmod +x ./generate_pythonrest_executables.sh

Execute the script:

./generate_pythonrest_executables.sh

This will take care of running the above pyinstaller commands, and it will generate both installer and uninstaller binaries on PythonRestExecutables/ directory, which you can then run to install and/or uninstall the cli on your machine, like below:

./PythonRESTInstaller
./PythonRESTUninstaller

Known Issues: When executing ./generate_pythonrest_executables.sh, there is a possibility that something like this issue occurs:

./generate_pythonrest_executables.sh: line 2: $'\r': command not found
./generate_pythonrest_executables.sh: line 3: syntax error near unexpected token `$'{\r''
'/generate_pythonrest_executables.sh: line 3: `function write_log() {

That issue is due to a difference in line endings between Windows (CRLF - Carriage Return and Line Feed) and Linux/Unix (LF - Line Feed) systems. When you transfer or use scripts created on Windows in a Linux environment, these line ending characters can cause issues. To fix it you can install and run dos2unix in all of the sh files of the linuxinstaller folder:

sudo apt-get update
sudo apt-get install dos2unix
dos2unix generate_pythonrest_executables.sh
dos2unix addpythonresttouserpath.sh
dos2unix removepythonrestfromuserpath.sh

Build and install pythonrest local pip package

Run from the root folder:

python setup.py sdist

This will use the setup.py from the root folder to build a tar.gz version of the library on a dist folder, from there you can install the library with:

pip install dist/pythonrest3-<VERSION>.tar.gz

replace the with the one on the setup.py file.

One thing worth noting is that if you need to add a new folder to the project, e.g. apigenerator/c_NewFolder you need to add a new entry to the list of the packages property in the setup.py, like this:

'pythonrest.apigenerator.c_NewFolder',

And if that folder has files that are not of .py extension, e.g. apigenerator/c_NewFolder/new.yaml and apigenerator/c_NewFolder/new2.yaml, you need to add a new entry to the list of the package_data property in the setup.py, like this:

'pythonrest.apigenerator.c_NewFolder': ['new.yaml', 'new2.yaml'],

All of this must be done to successfully add those files to the pip generated and installed library To uninstall the local pip package, you can just use a common pip uninstall command:

pip uninstall pythonrest3

When reinstalling the local pip package for tests, make sure to delete any of the following folders: build, dist and *.egg.info generated on the root folder of the project, as retaining those can lead to the project being built using that folder and not catching any changes you made to the project files.



If you find our solution helpful, consider donating on our Patreon campaign!

Thank you for riding with us! Feel free to use and contribute to our project. PythonREST CLI Tool generates a COMPLETE API for a relational database based on a connection string. It reduces your API development time by 40-60% and it's OPEN SOURCE!

Don't forget to star rate this repo if you like our job!