Simple Flask application with two requests: GET and POST
curl -X GET http://localhost:9999/clients
curl -X POST http://localhost:9999/clients \
-H "Content-Type: application/json" \
-d '{"first_name":"Jane", "last_name":"Doe", "email":"jdoe@example.com", "gender":"Female", "id":"101"}'
- Create 'get by id' method
- Create 'delete by id' method
- Create 'update by id' method
- (*) Add database support
- Go to Downloads Page
- Select your OS (Windows, Linux or MacOS)
- Download Community Edition
- Follow Installation Instructions (on the left, under the big PyCharm logo)
Click 'Create new project' and select path
- Note: if you got 'ModuleNotFoundError: No module named 'distutils.core''
$ sudo apt-get install python3-distutils
- File -> Settings -> Project: -> Project Interpreter
- Click the Gear button in top right corner
- Add -> Virtualenv Environment -> New environment
- Location -> path to virual environment, by default - in the root of the project
- Base Interpreter - path to python interpreter script; here you can set python version if possible
- Click 'OK'. You should have 'pip' and 'setuptools' installed
Used like this:
$ pip install <package-name>
To install list of packages from file (which is ussually called 'requirements.txt'):
pip install -r <path-to-file>
- File -> Settings -> Project: -> Project Interpreter -> '+' button on the right side
- Type the name of package
- Choose the package in the list below
- Click 'Install package'
- Right-click the project name
- New -> Python File
- Type the file name (without .py)
- Click 'OK'