Giter Site home page Giter Site logo

fission-fastapi's Introduction

fission-fastapi

It's an environment based in FastAPI to be used with a fission platform.

Docker hub: https://hub.docker.com/r/rafegal/fission-fastapi
Last FasAPI version: 0.63.0

To pull:

docker pull rafegal/fission-fastapi:0.63.0

To create your fission environment:

fission env create --name fastapi --image rafegal/fission-fastapi:0.63.0

After you created a fission environment based on this image, you need to create a function in the correct format, for it you need to look at the "function_fastapi.py", it's a perfect example for you to use as a template.

But first you may want to test if your new FastAPI environment is ok, you can use the "test_fastapi.py" function for it. This function is more simple and efficient to test if your environment is ok.

Creating the function test-fastapi

fission function create --env <YOUR-FASTAPI-ENV>--name test-fastapi --code test_fastapi.py

Testing the function test-fastapi

fission function test --name test-fastapi

The "test_fastapi.py" function is not a good example of how to mount its function correctly with the FastAPI environment, it is only useful as a test. Therefore, to use the "function_fastapi.py" function you should follow the steps below:

Creating the function

fission function create --env <YOUR-FASTAPI-ENV> --url /function-fastapi/  --name function-fastapi --code function_fastapi.py

To test you can use the "get" http method, an error of 400 should appear. For a perfect test you need to follow the documentation of the function, to access it you must access the address below:

http://<YOUR-FISSION-HOST>/function-fastapi/?docs_func=1

fission-fastapi's People

Contributors

rafegal 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.