GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - tern-tools/tern-rest-api: Code for Tern's REST API

BranchesTags
Open more actions menu

Latest commit

 

History

7 Commits
7 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
docs
docs
 
 
tern_api
tern_api
 
 
tests
tests
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
Pipfile
Pipfile
 
 
Pipfile.lock
Pipfile.lock
 
 
README.md
README.md
 
 
app.py
app.py
 
 
requirements-dev.txt
requirements-dev.txt
 
 
requirements.txt
requirements.txt
 
 
setup.py
setup.py
 
 
tox.ini
tox.ini
 
 

Repository files navigation

Tern REST API


NOTE

This project still not functional. Please wait for the first functional release (0.0.1)


The Tern REST API is a RESTful API for Tern Project.

Currently, the API is not functional as it is still in the Specification development and project structure phase.

The specification is available at Tern REST API Offline Swagger, and contributions are welcome.

Mainly the API is implemented asynchronously on the server-side as the tern reports can take a while to be generated.

  sequenceDiagram
    participant User
    participant API
    participant Tern
    User->>API: GET /api/v1/version
    API-->>User: 200 OK, JSON with version data
    User->>API: POST /api/v1/reports with JSON payload
    API-->>User: 200 OK, JSON with request id
    User->>API: POST /api/v1/reports/status with JSON payload
    API-->>User: 200 OK, JSON with status RUNNING
    API->>Tern: Process the request calling asynchronous
    Tern->>Tern: Processing
    loop
    User->>API: POST /api/v1/reports/status with JSON payload
    Tern->>Tern: Processing
    API-->>User: 200 OK, JSON with status RUNNING or UNKOWN
    end
    Tern->>API: Provides the answer for the id
    User->>API: POST /api/v1/reports/status with JSON payload
    API-->>User: 200 OK, JSON with status FAILED with error or DONE with report
Loading

Development

This repository has the requirements.txt and the requirements-dev.txt files to help build your virtual environment.

We also recommend using Pipenv to manage your virtual environment.

$ Pip install pipenv
$ pipenv shell

Install development requirements

$ pipenv install -d

Running the development Tern REST API

Runing the API locally

$ flask run --reload

Open http://localhost:5000/ in your browser.

Tests

We use Tox to manage running the tests.

Running tests

$ tox

Managing the requirements

Installing new requirements

$ pipenv install {package}

Development requirements

$ pipenv install -d {package}

Updating packages

$ pipenv update

Updating the requirements.txt and requirements-dev.txt

$ pipenv lock -r > requirements.txt
$ pipenv lock -r -d > requirements-dev.txt

About

Code for Tern's REST API

Resources

Readme
BSD-2-Clause license
Activity
Custom properties

Stars

1 star

Watchers

3 watching

Forks

3 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.