Skip to main content

Create a Serverless service in Git hosting

Project description

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
  • ✅ 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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

GitFx-0.0.7.tar.gz (9.9 kB view details)

Uploaded Source

Built Distribution

GitFx-0.0.7-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

Details for the file GitFx-0.0.7.tar.gz.

File metadata

  • Download URL: GitFx-0.0.7.tar.gz
  • Upload date:
  • Size: 9.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.11

File hashes

Hashes for GitFx-0.0.7.tar.gz
Algorithm Hash digest
SHA256 b0cdeccb5cc8af8ae26487a2b6bd726ee9f105e0f3d2551481b2c5352ad68410
MD5 2817c1af14f605988410544139766fbc
BLAKE2b-256 168bb45ce8856232c6eb9273e2f896506bfe77347a4c0bbc3aafc0d8a649ad70

See more details on using hashes here.

File details

Details for the file GitFx-0.0.7-py3-none-any.whl.

File metadata

  • Download URL: GitFx-0.0.7-py3-none-any.whl
  • Upload date:
  • Size: 10.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.11

File hashes

Hashes for GitFx-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 470963f24e97934aaed22a19b6dc2f8d9cb4c0227e84751f5cb8378bbe86d074
MD5 4bc4d98a985573487aa6c78c49bac9ec
BLAKE2b-256 0c0d4c882e4087ca92d850c4ceb36c9be83e355073791a17ab88dd1649083043

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page