Skip to content

Latest commit

 

History

History
49 lines (34 loc) · 785 Bytes

File metadata and controls

49 lines (34 loc) · 785 Bytes

Python API

Simple API written in Python language. For usage with SQL databases.

Current version: 0.3.2

Available Endpoints

  • POST /login - get auth token
  • GET /user/{id} - get user
  • POST /user - createuser

Installation

pip install -r requirements.txt

Default setup uses two mySQL databases (schema name 'python_api' for app and 'python_api_test' for unit tests).

To change this, check out config.py file

Usage

Run app

portal manage.py runserver

Create database tables

portal manage.py create_db_tables

Create admin user

portal manage.py create_admin

Testing

portal manage.py test [-m module_name]

or, for tests with coverage

portal manage.py cov [-m module_name]