Create a Serverless service in Git hosting
Project description
GitFx - Create a Serverless service in Git hosting
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
Built Distribution
File details
Details for the file GitFx-0.0.5.tar.gz
.
File metadata
- Download URL: GitFx-0.0.5.tar.gz
- Upload date:
- Size: 10.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.17.1 CPython/3.6.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2ba955e3eaad170f70f294644a3de7b217905643fcf96d5ba5a29f4325201aa1 |
|
MD5 | 533a6f009c400ce1dd5f305500d9e46e |
|
BLAKE2b-256 | 6fc9733a2eaedd0e8ef4eaff98f8e25e31f152b513ae90255f71fb2d9eabad4f |
File details
Details for the file GitFx-0.0.5-py3-none-any.whl
.
File metadata
- Download URL: GitFx-0.0.5-py3-none-any.whl
- Upload date:
- Size: 10.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.17.1 CPython/3.6.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ee38f97784cbfb09db3632124547e61a5ddf9c51e59ffa930dcb62636bc7da09 |
|
MD5 | 65b82076500ab751ece9cf0ea63d8e33 |
|
BLAKE2b-256 | 10c8abd9893e9689295cb8927238fc19b8e2f95a7c184f6610e9e2b11d94cdfd |