Skip to main content

A Framework for creating a boilerplate template for ai projects that are ready for MLOps

Project description


A small framework for python projects that are mainly progress based.

The main princible of the framework are Phases.




A Project is the composition of phases and the backend.


A Phase has a main Method and can export data.


A stage is a group of Phases and only have a name. A Stage can be run seperatly with"stagename")



Storage and Exporters


You can add diffrent storage-engines to your project, with project.addStorage(Engine()). A storage you be inherited from and implement the methods read(path: str) and write(path: str, data: bytes). The order is important and the Storages should be ordered from fast to slow.

By Default there is a memory storage, that will save the data in the project, but is not persitent. The default persistent data layer is the filesystem(storage.FileStorage).


An Exporter can be registered to transform an Instance or primitive type into a byte string (export(obj : MyObject): bytes) and vice versa (importData(bytes): MyObject).

There is a default ObjectExporter, that is based on pyarror and is compatible with diffrent fromats like pandas Dataframes and numpy arrays. If the Defaultexporter is used, the numpy and pyarrow package need to be installed.

register Data

When a phase wants to register data (self.project.registerData("myDataId", myData) within the phase), the data is passed to an exporter. If an exporter is found the data will be passed to alle the storages. They will save the data somewhere (persitent or not).



reading the data

A phase can request data with self.project.getData("myDataId", MyDataType). The Data will be passed sequential to the storage layer and will pass the data from the first storage that is able to get it. If no storage can provide the data, the project will search for a phase that exports this data-id and run that specific phase.




This is a example data layer with 3 storages: memory, file, database (not default) data-layer



python sdist bdist_wheel


twine upload dist/*

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for pyPhases, version 0.4.16
Filename, size File type Python version Upload date Hashes
Filename, size pyPhases-0.4.16.tar.gz (15.9 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page