Skip to content

Latest commit

 

History

History
34 lines (20 loc) · 1.34 KB

README.rst

File metadata and controls

34 lines (20 loc) · 1.34 KB

SAFRS: Python OpenAPI & JSON:API Framework

Please check the GitHub Readme for documentation.

Overview

SAFRS is an acronym for SqlAlchemy Flask-Restful Swagger. The purpose of this framework is to help python developers create a self-documenting JSON API for sqlalchemy database objects and relationships. These objects can be serialized to JSON and can be created, retrieved, updated and deleted through the JSON API. Optionally, custom resource object methods can be exposed and invoked using JSON. Class and method descriptions and examples can be provided in yaml syntax in the code comments. The description is parsed and shown in the swagger web interface.

The result is an easy-to-use swagger/OpenAPI and JSON:API compliant API specification.

Installation

SAFRS can be installed as a pip package or by downloading the latest version from github, for example:

git clone https://github.com/thomaxxl/safrs
cd safrs
pip3 install -r requirements.txt --user
python3 setup.py install --user

The examples can then be started with

python3 examples/demo_relationship.py "your-interface-ip"