Skip to main content

Foxcross

Code style: black License Build Status Build status PyPI codecov

AsyncIO serving for data science models built on Starlette

Requirements: Python 3.6+

Quick Start

Installation using pip:

pip install foxcross

Create some test data and a simple model in the same directory to be served:

directory structure

.
+-- data.json
+-- models.py

data.json

[1,2,3,4,5]

models.py

from foxcross.serving import ModelServing, run_model_serving

class AddOneModel(ModelServing):
    test_data_path = "data.json"

    def predict(self, data):
        return [x + 1 for x in data]

if __name__ == "__main__":
    run_model_serving()

Run the model locally

python models.py

Navigate to localhost:8000/predict-test/ in your web browser, and you should see the list incremented by 1. You can visit localhost:8000/ to see all the available endpoints for your model.

Why does this package exist?

Currently, some of the most popular data science model building frameworks such as PyTorch and Scikit-Learn do not come with a built in serving library similar to TensorFlow Serving.

To fill this gap, people create Flask applications to serve their model. This can be error prone, and the implementation can differ between each model. Additionally, Flask is a WSGI web framework whereas Foxcross is built on Starlette, a more performant ASGI web framework.

Foxcross aims to be the serving library for data science models built with frameworks that do not come with their own serving library. Using Foxcross enables consistent and testable serving of data science models.

Security

If you believe you've found a bug with security implications, please do not disclose this issue in a public forum.

Email us at support@laac.dev

Metadata

Release files for foxcross 0.7.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for foxcross 0.7.1
File Size Uploaded
foxcross-0.7.1.tar.gz 10.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for foxcross 0.7.1
File Interpreter ABI Platform
foxcross-0.7.1-py3-none-any.whl Python 3 none any Details

Total release size: 23.8 kB

Release files / foxcross-0.7.1.tar.gz

Download URL foxcross-0.7.1.tar.gz
Size 10.9 kB
Tags Source
SHA-256 checksum
How to use checksums
e8f8038bb4d2c14d39f19d8ff41aa373f4df18cdaa63f5fa1b3eeae1d7f22da6
BLAKE2b-256 checksum
How to use checksums
0e0d8d960696a88a004083ed09bd433f96132dc8e2723fbd4d14f319a22765aa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/0.12.16 CPython/3.7.1 Linux/4.15.0-1028-gcp

Release files / foxcross-0.7.1-py3-none-any.whl

Download URL foxcross-0.7.1-py3-none-any.whl
Size 12.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cafdd6147b9dae1ecaf1b3076d05b7c3bd5052642a86ad24b304e5b48fb48340
BLAKE2b-256 checksum
How to use checksums
ea2614eaaef5f64fe3d0c9a7d60d8ab2dae98d32cb52a285c8c71eaea2e93216
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/0.12.16 CPython/3.7.1 Linux/4.15.0-1028-gcp

Release history Release notifications | RSS feed

0.9.0

2 release files

0.8.0

2 release files

This release

0.7.1 This release

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page