Skip to main content

A Framework for creating progress based applications, like machine learning algroithms

Project description

pyPhases

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

The main princible of the framework are Phases.

Architecure

arch

Project

A Project is the composition of phases and the backend.

Phase

A Phase has a main Method and can export data.

Stage

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

Decorators

Compontents

Storage and Exporters

Storage

You can add diffrent storage-engines to your project, with project.addStorage(Engine()). A storage you be inherited from pyPhases.storage.Storage 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).

Exporter

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.

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).

example:

seq

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.

example:

get-data

example

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

Project details


Release history Release notifications | RSS feed

This version

0.1.1

Download files

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

Source Distribution

pyPhases-0.1.1.tar.gz (8.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyPhases-0.1.1-py3-none-any.whl (13.3 kB view details)

Uploaded Python 3

File details

Details for the file pyPhases-0.1.1.tar.gz.

File metadata

  • Download URL: pyPhases-0.1.1.tar.gz
  • Upload date:
  • Size: 8.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.5 CPython/3.7.6 Windows/10

File hashes

Hashes for pyPhases-0.1.1.tar.gz
Algorithm Hash digest
SHA256 ff32e1a25e5c70161a06746718f9b2c5a625391cc725c316597f96e832aa67de
MD5 030b6146ccfa7c1f862cb020cc1845a4
BLAKE2b-256 4556083fea6ae76882f21a17192bf7e59872c8b5456dad9aae04abe084021cf2

See more details on using hashes here.

File details

Details for the file pyPhases-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: pyPhases-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 13.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.5 CPython/3.7.6 Windows/10

File hashes

Hashes for pyPhases-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 58264902be0514a381d5b02eb067801027375c1a31adf7b4e083d181a9bd235f
MD5 8b4f8bd84302e09c94d03355fef63fff
BLAKE2b-256 f1789c8b6bd8c17e82cde8d9694f7033ce2213fb76acf2ca47c4ac3834b27e14

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page