Skip to main content

client for the arkitekt_next platform

Project description

arkitekt_next

codecov PyPI version Maintenance Maintainer PyPI pyversions PyPI status

streaming analysis for mikroscopy

Idea

arkitekt_next is the python client for the arkitekt_next platform. It allows you to utilize the full extent of the platform from your python code. To understand the idea behind arkitekt_next, you need to understand the idea behind the arkitekt_next platform. (More on this in the documentation)

Features

  • Host your python functions and make them to your team
  • Use functions from your team in your code
  • Interact with and store data in a secure and scalable way on the platform
  • Use the platform as a central storage for your data

Install

pip install arkitekt_next[all]

This installs all dependencies for the arkitekt_next platform, inlcuding the arkitekt_next CLI, which can be used to develop and create apps, containerize them and deploy t

arkitekt_next is relying heavily on asyncio patters and therfore supports python 3.8 and above. It also relies on the pydantic stack for serialization.

App

You can use the cli to create python based apps for the arkitekt_next platform, profiting from a battery of features like easy GUI creation based on type annotations, orchestration of real-time (in memoery) workflows, data hosting, easy packaging and distribution in docker containers, etc...

To get started create a directory and run

arkitekt_next init

Which will lead you throught an app creation process. Apps can simply registered functions, through the register decorator

from arkitekt_next import register

@register()
def rpc_function(x: int, name: str) -> str
    """
    A rpc function that we can
    simple call from anywhere

    ""

And then connected to a local or remote server by running

Run example:

arkitekt_next run dev

For more details on how to create an app follow the tutorials on https://arkitekt_next.live.

Usage with complex Datastructures

ArkitektNext takes care of serialization and documentation of standard python datastructures

  • str
  • bool
  • int
  • float
  • Enum
  • Dict
  • List

To increase performance and reduce latency it is not possible to serialize complex python objects like numpy arrays into the messages. These are best transformed into immutable objects on a centrally accessible storage and then only the reference is passed.

ArkitektNext does not impose any rules on how you handle this storage (see mikro for ideas), it provides however a simple api.

class ComplexStructure:
    id: str # A reference for this structure on central storage

    async def shrink(self):
        return self.id

    @classmethod
    async def expand(cls, value):
        return cls.load_from_server(value)

by providing two functions:

  • shrink
  • expand

You can now use this Structure with simple typehints and arkitekt_next will automaticall shrink (serialize) and expand (deserialize) the structure on calling.

def complex_call(x: ComplexStrucuture) -> int:
    return x.max()

Check out the arkitekt_next documentation for usage of this libary

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

arkitekt_next-0.7.53.tar.gz (588.5 kB view details)

Uploaded Source

Built Distribution

arkitekt_next-0.7.53-py3-none-any.whl (636.7 kB view details)

Uploaded Python 3

File details

Details for the file arkitekt_next-0.7.53.tar.gz.

File metadata

  • Download URL: arkitekt_next-0.7.53.tar.gz
  • Upload date:
  • Size: 588.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.12.3 Linux/6.8.0-39-generic

File hashes

Hashes for arkitekt_next-0.7.53.tar.gz
Algorithm Hash digest
SHA256 87218d0d64dbefbd8ee48bce885eafbca62885cccee529eaf1b8b7e013804bfa
MD5 4d3d2365e8fd1564c9dd1359ef739c16
BLAKE2b-256 9c00027c1f0cd5ef37121630354049771070b21ded130648d4e7415c6d62d59f

See more details on using hashes here.

File details

Details for the file arkitekt_next-0.7.53-py3-none-any.whl.

File metadata

  • Download URL: arkitekt_next-0.7.53-py3-none-any.whl
  • Upload date:
  • Size: 636.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.12.3 Linux/6.8.0-39-generic

File hashes

Hashes for arkitekt_next-0.7.53-py3-none-any.whl
Algorithm Hash digest
SHA256 52fd9ee66e83429765a44a0395e63a64514ae599473f362aa3c2fddcffc0bc20
MD5 4dacfb2429f4c13af2a6567af41beec7
BLAKE2b-256 3d25347e621a8d85cc0a9c437b91fc189a50a8a8c4436a3aeafc13eb6d6f9715

See more details on using hashes here.

Supported by

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