Coder Social home page Coder Social logo

gitfx / gitfx Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 1.0 40 KB

Create a Serverless service in Git hosting.

Home Page: https://pypi.org/project/GitFx/

License: Apache License 2.0

Python 88.47% Elixir 0.44% Go 1.99% Haskell 0.68% JavaScript 1.03% PHP 0.58% Perl 0.65% Ruby 1.97% Shell 1.36% Rust 0.58% Makefile 1.79% TypeScript 0.46%
faas gitops gitops-toolkit learn-to-code learning low-code lowcode python ruby serverless

gitfx's Introduction

GitFx - Create a Serverless service in Git hosting

GitFx Testing GitFx Lint

GitFx can be used to run some functions and serve the output as a service in a Git hosting.

GitFx is a Python lib extracted from an action ActionServerless. And now the action uses this lib as a dependency to do the real job, you can run the lib locally in a same way as in the action.

Prerequisites

  • Python 3.5+
  • Docker

Install

pip3 install gitfx

# or
python3 -m pip install gitfx

Note: Python 2 is not supported

Usage

Let's start with a Python code that'll be used to create a Serverless service:

# function.py
import json

# GET /api/py_hello.json

print(json.dumps({"hello": "world"}))

put the program to a path under current directory, for example, test folder and run:

python3 -m gitfx test/
# you can pass more folders if you have

then the program's output is written to a file located in api/py_hello.json that you defined as a route in the comment.

You can use the ActionServerless to run functions in GitHub, and also you can run locally as above example then push the generated files to the remote.

more languages' examples you can find here.

Languages supported

Language Dependency Installation Version Management Example code
Python requirements.txt .python-version pyenv See
Ruby Gemfile .ruby-version rvm/rbenv See
Node.js package.json .nvmrc nvm See
Perl cpanfile .perl-version plenv See
PHP composer.json .phpenv-version phpenv See
Golang ⬜️ ⬜️ See
Haskell ⬜️ ⬜️ See
Elixir ⬜️ ⬜️ See
Bash -- -- See
Rust ⬜️ ⬜️ See
Deno -- ⬜️ See
  • ✅ Feature supported
  • ⬜ Feature not supported yet
  • -- N/A

Documents

Real world examples

Contributions

Contributions are welcome! You may check the following features in case you'd like to contribute but no idea what to do:

  • Support to add your favorite languages
  • Support dependency installation to the existing languages
  • Use this action to create an application and share it

gitfx's People

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

syllogy

gitfx's Issues

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.