Giter Site home page Giter Site logo

fastapi's Introduction

A Simple Demo Application

This web application is developed using a Svelte client framework, deployed using Axios. The user interface communicates with a Python script using FastAPI and is deployed with Uvicorn.

Backend Deployment

Plans are in place to implement a relational database of some sort. But for a working case, the data is currently stored a json formatted file.

Requirements

  • Python 3
    Install according to your OS. You may want to install py pip install py
  • FastAPI
    pip install fastapi
    
  • Uvicorn
    pip install uvicorn[standard]
    

Once the requirements are installed run python ./api.py from the commandline in the project's API directory to start the API service. Visit http://127.0.0.1:8001/docs to view the available endpoints and to test the API.

Frontend Deployment

Right now, the UI only demonstrates a simple [GET] call to the API, returning a list of recordsets. As development progresses, a full CRUD stack will be implemented. If you are forking this project, you should be able to npm install within the ui directory without further configuration.

Requirements

  • Node
    Install according to your OS
  • Svelte
    npm install svelte
    
  • degit
    npx degit sveltejs/template my-svelte-project
    npm install
    
  • Axios
    npm install axios
    

Once all the pacakages are installed, start the service using npm run dev. The default deployment location is http://127.0.0.1:5000.

Additional notes

Rollup Config

The default rollup.config.js presented issues using a vanilla install of Axios. Line 7 and Line 11 were added in the document to prevent the JSON errors.

.gitignore

GitHub has a great resource for .gitignore templates. If you plan on further expanding to other environments, it is recommended to look through them. This project implements the Node.gitignore template.

fastapi's People

Contributors

ianmeinert avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.