Giter Site home page Giter Site logo

andrewwgordon / ddd-northwind-api Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 1.0 16 KB

This project is an example Domain-Driven Design, Microservice supporting OpenAPI .The purpose of the project is an education "toy" application to articulate DDD and Microservice best practices.

License: MIT License

Python 99.59% Batchfile 0.41%
domain-driven-design microservices cqrs openapi3 repository-pattern python connexion

ddd-northwind-api's Introduction

Domain-Driven Design CQRS Microservice OpenAPI Demo

Overview

This project is an example Domain-Driven Design Microservice supporting OpenAPI. The purpose of the project is an education "toy" application to articulate DDD and Microservice best practices.

The project is built upon the Connexion OpenAPI framework, itself leveraging Flask. Waitress is configured as the default WSGI HTTP Server and is suitable for production deployment.

Quick Start

Prequisites

Python >= 3.7

Install

Clone this repo.

git clone https://github.com/andrewwgordon/ddd-northwind-api.git

Create a Python virtual environment and activate it.

python -m venv venv
.\venv\Scripts\activate (Windows)
./venv/bin/activate (Linux)

Install dependencies

python -m pip install -r requirements.txt

Deploy the Northwind SQLite Database

Download the SQLite3 Northwind database, unpack the archive and deploy to ./northwind/resources/database/Northwind.sqlite.

Configure Logging

Note: You also may need to create a ./log/ directory in the root of the application directory. Logging path can be configured in ./northwind/resources/logging.conf.

Run the Test Suite

python -m pytest -s -v

Note: The current e2e REST API test spins up a Flask App instance as a OS sub process. It attempts to terminate it on test completion, but you may need to kill the process.

Start the Service

Start the service

python app.py

Navigate to the Swagger UI via your browser

http://localhost:8098/v1/ui

Note: The default port for the HTTP Server is 8098. You can change this setting in the northwind.properties file in ./northwind/resources/.

Basic authentication is enabled and a username / password has to be supplied for any REST API service to respond. Current implementation does not verify credentials and can accept any username and password.

ddd-northwind-api's People

Contributors

andrewwgordon avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

webclinic017

ddd-northwind-api's Issues

Add ProductSalesAnalytics endpoint

Implement ProductSalesAnalytics endpoint that provides the ability to run an analytical aggregrate query with user specified facts / mesaures, dimensions and aggrregate functions (e.g. sum, max,avg etc.)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.