For the complete documentation index, see llms.txt. This page is also available as Markdown.

Example Bank

Installation of Example Bank Simulator on a developer machine

Developers can set up and run the G2P Bridge Example Bank Simulator on their local machines. This guide outlines the steps to install the same on a Linux-based laptop or desktop.

Prerequisites

  • Python3

  • Git

  • PostgreSQL

  • Redis

  • Celery

Installation of Example Bank Simulator

1. Update system packages

  • Log in to your Linux server using SSH and update the package list and upgrade the existing packages:

sudo apt update
sudo apt upgrade -y

2. Install dependencies

sudo apt install -y python3-pip python3-dev build-essential

3. Install and configure PostgreSQL

  • G2P Bridge requires PostgreSQL as the database engine. Install PostgreSQL (if not already installed) and create a new database user for G2P Bridge.

4. Clone the G2P Bridge Repository

  • Clone the consolidated g2p-bridge monorepo to your local machine. The Example Bank now lives under its example-bank/ folder.

The Example Bank Python packages are not published to PyPI — install them from local source (editable installs) out of the cloned repo, as shown below. Only openg2p-fastapi-common / openg2p-fastapi-auth come from PyPI.

5. Install Python Libraries and G2P Bridge Components

Setting up the Bridge API

  • Make a new Python virtual environment.

  • Activate the virtual environment.

  • Use pip to install the required Python packages, including the core libraries for the G2P Bridge.

  • Create a .env file

  • Migrate the database schema

  • Run the API server on 127.0.0.1:8000

Setting up the Example Bank Celery

  • Make a new Python virtual environment.

  • Activate the virtual environment.

  • Use pip to install the required Python packages, including the core libraries for the G2P Bridge.

  • Run redis-server (if not already started)

  • Create a .env file

  • Run the celery beat and worker

Last updated

Was this helpful?