Sign inSign up

pythonicshahdev/fastapi-app-reusable

By pythonicshahdev

•Updated 5 months ago

Image
0

920

pythonicshahdev/fastapi-app-reusable repository overview

⁠Boomi Demo Accelerator — Reusable FastAPI Templates

A production-grade, multi-domain REST API image built for Boomi solution engineers. Provides realistic source system data across 7 business domains — Customer, Product, Orders, HR, Student, Faculty, and Payments — all accessible via a single container. Use it as a mock source system for Boomi integration demos, DataHub MDM showcases, and API management walkthroughs.

Docker Pulls Image Size FastAPI Python Platform


⁠Quick Start

docker run -d --name boomi_fastapi -p 4005:4005 pythonicshahdev/fastapi-app-reusable:latest

Interactive API docs available immediately at http://localhost:4005/docs⁠


⁠Domains & Endpoints

Every domain follows a consistent CRUD pattern with full OpenAPI documentation, standardised error responses, and optional filtering.

⁠👤 Customer 360

200 pre-seeded customers with realistic commercial profiles

MethodEndpointDescription
GET/customersList all customers. Filter by ?status= or ?segment=
GET/customers/{customer_id}Get customer by ID (e.g. CUST-000001)
POST/customersCreate a customer
PUT/customers/{customer_id}Update a customer
DELETE/customers/{customer_id}Delete a customer

Key fields: customer_id, email, phone, address, customer_segment, account_type, credit_limit, payment_terms, currency, sales_org, industry, lifetime_value, preferred_channel, status


⁠📦 Product 360

200 pre-seeded SAP-style material records

MethodEndpointDescription
GET/productsList all products. Filter by ?status= or ?material_type=
GET/products/{material_number}Get product by material number (e.g. MAT-000001)
POST/productsCreate a product
PUT/products/{material_number}Update a product
DELETE/products/{material_number}Delete a product

Key fields: material_number, material_description, material_type (FERT/HALB/ROH/etc.), material_group, base_unit_of_measure, gross_weight, ean_upc, brand, division, sales_org, price, currency, status


⁠🛒 Orders

775 pre-seeded orders distributed across customers with realistic buying patterns

MethodEndpointDescription
GET/ordersList all orders. Filter by ?customer_id=
POST/orders/simulateGenerate N new orders in memory. Use ?count=N (1–500)

Key fields: order_id, customer_id, product_id, order_date, amount, customer_email

The simulate endpoint creates new orders in the in-memory store — ideal for live demo moments where you want to show data flowing in real time.


⁠👥 HR 360
MethodEndpointDescription
GET/employeesList all employees
GET/employees/{employee_id}Get employee by ID
POST/employeesCreate an employee
PUT/employees/{employee_id}Update an employee
DELETE/employees/{employee_id}Delete an employee

Key fields: employee_id, first_name, last_name, email, department, job_title, hire_date, salary, employment_status


⁠🎓 Student 360
MethodEndpointDescription
GET/studentsList all students
GET/students/{student_id}Get student by ID
POST/studentsCreate a student
PUT/students/{student_id}Update a student
DELETE/students/{student_id}Delete a student

Key fields: student_id, first_name, last_name, email, major, gpa, enrollment_status, degree_type, advisor_id, credits_earned


⁠🧑‍🏫 Faculty 360
MethodEndpointDescription
GET/facultyList all faculty members
GET/faculty/{faculty_id}Get faculty member by ID
POST/facultyCreate a faculty member
PUT/faculty/{faculty_id}Update a faculty member
DELETE/faculty/{faculty_id}Delete a faculty member

Key fields: faculty_id, first_name, last_name, email, department, academic_rank, tenure_status, publications_count, research_grants, salary


⁠💳 Payments
MethodEndpointDescription
GET/paymentsList all payments
GET/payments/{payment_id}Get payment by ID
POST/paymentsCreate a payment
PUT/payments/{payment_id}Update a payment
DELETE/payments/{payment_id}Delete a payment

⁠🏓 Health Check
GET /ping   →  { "status": "UP" }

⁠API Design

All endpoints share a consistent contract:

Standardised error response on all failure paths:

{
  "errorCode": "404",
  "errorMessage": "Customer 'CUST-999999' was not found",
  "transactionId": "dd960082-abbf-47c2-8c65-f18eeb35848b",
  "timeStamp": "2026-06-18T14:32:11Z"
}

Optional x-correlation-id header on all endpoints for request tracing.

Full OpenAPI spec auto-generated at /docs (Swagger UI) and /redoc.


⁠Architecture

CSV seed files (baked into image)
    Customer360.csv  →  /customers   (200 records)
    Product360.csv   →  /products    (200 records)
    Orders.csv       →  /orders      (775 records)
    Student360.csv   →  /students
    Faculty360.csv   →  /faculty

In-memory store (loaded at startup, lost on restart)
    All data lives in Python memory — no external DB required
    Simulate endpoint writes to in-memory store for live demo use

Note: Data is loaded from CSVs at startup and held in memory. Mutations (POST/PUT/DELETE) update the in-memory store but are not persisted to disk. Restart the container to reset to the original seed data.


⁠Environment Variables

VariableDefaultDescription
(none required)—Container runs with zero configuration

Port is fixed at 4005 internally. Map to any host port:

docker run -d -p 4006:4005 pythonicshahdev/fastapi-app-reusable:latest

⁠With Docker Compose

services:
  fastapi:
    image: pythonicshahdev/fastapi-app-reusable:latest
    container_name: boomi_fastapi
    ports:
      - "4005:4005"
    restart: unless-stopped

⁠Use Cases

  • Boomi Integration demos — pre-built REST source for showcasing HTTP Client, REST connector, and data transformation patterns
  • Boomi DataHub / MDM demos — Customer 360 and Product 360 as commercial source systems feeding golden records
  • Boomi API Management demos — expose these endpoints through the Boomi API Gateway
  • Event Streams demos — use POST /orders/simulate to trigger live event flow during a demo
  • Training environments — realistic multi-domain data for Boomi University labs

ImagePurpose
pythonicshahdev/fastapi-app-reusable:latestGeneral-purpose multi-domain API (this image)
pythonicshahdev/datahub-mysql:latestAcademic SIS source — MySQL, pre-seeded

⁠Source & Contact

Built and maintained by Shah

Tag summary

Content type

Image

Digest

sha256:a9d56cd61…

Size

126.2 MB

Last updated

5 months ago

docker pull pythonicshahdev/fastapi-app-reusable