Skip to content

Latest commit

 

History

History
42 lines (26 loc) · 1.02 KB

File metadata and controls

42 lines (26 loc) · 1.02 KB

PostgREST Python Client

This repository provides a generic python REST client for any PostgREST server with a PostgreSQL database behind it.

This client implements the following features:

  • Login
  • JWT Auth
  • HTTP GET
  • Pagination of result sets based on Content-Range header

PostgREST installation and configuration is beyond the scope of this document.

See http://postgrest.com/ for more information.

Installation and configuration

  1. Clone this repository

     git clone https://github.com/davidthewatson/postgrest_python_requests_client.git
    
  2. Install requirements

     pip install -r requirements.txt
    
  3. Copy config.in to config.py

     cp config.in config.py
    
  4. Edit credentials and urls in config.in to suit

     vi config.py
    
  5. Save config.py

     [esc]:wq
    
  6. Run

     python client.py
    

The example above uses python 3.5. You may have to edit the source to accommodate python versions < 3.5. For instance:

from __future__ import print_function

david watson