A simple FastAPI boilerplate for ML models

Serve machine learning models production-ready with FastAPI

# Summary

I’ve created a GitHub repository named “fastapi-ml-skeleton” to simplify the deployment of machine learning models into production. Utilizing FastAPI, this project offers a robust framework for serving models securely and efficiently. The repository includes a tested example using a regression model for demonstrating house price predictions, targeting Python 3.11+ environments and employing Poetry for dependency management.

FastAPI creates a OpenAPI documention which you can directly use in Postman or generate code from for your client consuming this boilerplate code. OpenAPI spec created by FastAPI

# Highlights

  • FastAPI Framework: Ensures fast, secure, and easy deployment.
  • Tested Sample Code: Includes a regression model to get you started quickly.
  • Comprehensive Documentation: Guides on installation, setup, and API usage.
  • Open Source: Available under the Apache-2.0 license.

# Usage

To use this skeleton, clone the repository and follow the setup instructions provided. It covers everything from installation and running the local server to API authentication. This framework is designed to be scalable, allowing for easy expansion and integration of various machine learning models.

For more details, visit the GitHub repository.

For feedback, issues and pull requests, please refer to the linked repository.

Disclaimer: The postings on this site are my own and don't necessarily represent IBM's positions, strategies or opinions.
Built with Hugo
Theme Stack designed by Jimmy