Coder Social home page Coder Social logo

sepio-classifier's Introduction


Sepio Classifier

Asset classifier API microservice project


Architecture

general architecture
Full view: Figma

Access the Deployed API

Description

Sepio Classifier is a API microservice built using FastAPI, Pydantic and Clean Architecture with Firebase and Redis for persistence. The knowledge base was imported from the json file using a script to take it to the firestore, where the overrides are also stored in a different collection. Redis is used as a event stream, in this case for reporting inserts on the Override collection. The commits to the main branch will automatically trigger the CD Pipeline and, using Azure container registry, will deploy the container aplication to a Azure Web App. Through Sepio Classifier you can check the Classification and Vendor for a given mac address. To run the application its simple with Uvicorn or Docker, just follow the instructions below. (You'll need a provided .env file)

Project Structure

general architecture

Running the app

  1. Clone the repo or download the ZIP.

  2. Place the provided .env file in the root of the project (Where the Dockerfile is).

Option 1 using Docker

You'll need docker installed to run the application.

  1. Confirm that you are in the root of the project (/sepio-classifier/.) where the Dockerfile file is and build the image:
docker build -t sepio-classifier .

And wait for the build to finish.

  1. Run the app with docker.
docker run --env-file .env -p 8000:8000 sepio-classifier

Option 2 using Poetry and Uvicorn

  1. Install the packages described at pyproject.toml
poetry install
  1. Activate Poetry's environment
poetry shell
  1. Run the API using Uvicorn
uvicorn src.main:app

These commands will start the API that will be available on your machine's ports 8000 (The port needs to be free for the application to run). Now just open your browser of choice and go to http://localhost:8000/docs to test the API. Test with any of the mac addresses in the Knowledge Base json file. And don't forget to test the Override feature! documentation

sepio-classifier's People

Contributors

thisbra avatar

Stargazers

Juan Lessa avatar

Watchers

 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.