Giter Club home page Giter Club logo

bsendpoint's Introduction

bsendpoint

Overview

The idea of this service is to show banners on different pages of a website. The management of banners as HTML snippets is done in a separate bsadmin service.

This service periodically fetches data from admin management system via HTTP, caches data in memory and then responses to all the incoming HTTP requests with the best suited banner.

Tech

  • Python 3.7
  • FastAPI
  • Pydantic
  • uvicorn
  • docker
  • docker-compose

Build

Repo contains Dockerfile and docker-compose.yml
There is no need for database or any other writable storage.

Dependencies are handled with pip-tools

Configuration

App is using starlette config module (https://www.starlette.io/config/)
All configuration happens via .env file or environment variables.

Supported environment variables:

Using docker compose

docker-compose up

Dev setup

As application has no needs for database and is only using packages from public PyPi it's very easy to setup locally for development.

Setup virtualenv

cd bsendpoint
python3 -m venv .venv
source .venv/bin/activate
pip install pip-tools
pip-compile requirements/test-requirements.in

API docs

FastAPI supports openapi out-of-the-box. Location of api docs in local development: http://127.0.0.1:8089/docs

bsendpoint's People

Contributors

abramovd avatar

Watchers

 avatar  avatar

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.