Skip to content

About

Python REST API Project

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

15 Commits

Folders and files

Repository files navigation

Python REST API Project

This project demonstrates Python REST API capabilities.

Install Dependencies

  1. Install uv
  2. From the project root, create the .venv folder and install the locked dependencies (Python 3.14 is downloaded automatically if missing)
    uv sync
    
  3. Add or remove libraries with uv add <package> / uv remove <package>, then regenerate requirements.txt
    uv export --format requirements-txt --no-hashes -o requirements.txt
    

Without uv (pip)

  1. Create and activate a virtual environment with Python 3.14
    python3.14 -m venv .venv
    source .venv/bin/activate
    
  2. Install the pinned dependencies
    pip install -r requirements.txt
    
  3. Run the project with python -m com.demo.web.CustomersController instead of uv run ...

Set up DB

  1. Configure DB credentials here
  2. And create database employees and table customers with the following commands
create database if not exists employees;
create table if not exists employees.customers
(
	name varchar(40) null,
	address varchar(200) null
);

Run project

  1. Run com/demo/web/CustomersController.py from the project root
    uv run python -m com.demo.web.CustomersController
    
  2. Go to http://127.0.0.1:5000 to see list of customers
  3. Create new customer using the URL http://127.0.0.1:5000/create

About

Python REST API Project

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages