Skip to content

Latest commit

 

History

History
48 lines (35 loc) · 923 Bytes

File metadata and controls

48 lines (35 loc) · 923 Bytes

Skir Python example

Example showing how to use skir's Python code generator in a project.

Build and run the example

# Download this repository
git clone https://github.com/gepheum/skir-python-example.git

cd skir-python-example

# Install dependencies
pip install -r requirements.txt

# Run Skir-to-Python codegen
npx skir gen

python snippets.py

Start a SkirRPC service

The example includes three different framework implementations. Choose one:

Flask

From one process, run:

python start_service_flask.py

FastAPI

From one process, run:

uvicorn start_service_fastapi:app --host localhost --port 8787

Litestar

From one process, run:

litestar --app start_service_starlite:app run --host localhost --port 8787

Call the service

From another process, run:

python call_service.py