Integrations
title: AMSDAL Integrations
AMSDAL allows you to easily integrate existing internally managed or third-party applications.
ORM Integration¶
Using AMSDAL Integrations you can integrate AMSDAL with the ORM of your existing application so that your application can continue to work uninterupted, while any data that you create/modify, including models' schemas changes, will be replicated in your AMSDAL application, that you run either on the same machine or the dedicated one.
The AMSDAL application is run in parallel, and will automatically store the entire history of your data in the AMSDAL Lakehouse, including schemas of models. Allowing you to recreate AMSDAL models at any time that will correspond to the actual models' state at this time. Then, using AMSDAL ORM you will be able to queries the Lakehouse across your data and its history.
Built-in Integrations¶
Coming soon:
ORM | Supported | Comming soon |
---|---|---|
sqlalchemy | ||
Django |
AMSDAL Integrations¶
AMSDAL Integrations is a tiny python package that implements core interfaces and functionality to integrate your application with AMSDAL application.
AMSDAL Integrations is simple and extendable, which allows you to easily implement your own client implementation or extend existing one by adding for example custom authorization mechanism or changing the protocol of communication between Integrations and AMSDAL Application.
The client is built on top of httpx
package, so it provides you ability to use AMSDAL Integrations in both async and sync modes. Also,
it provides you ability to use any built-in features of httpx
.
AMSDAL Integrations integrates directly with the code of your application and communicates by default with the AMSDAL application directly which can affect the performance of your application. To avoid these performance affects, AMSDAL provides a system agent that can be run as a separate process (usually as a service/daemon) on your machine that will collect all data and send it to the AMSDAL application in the background.
Database integrations¶
Note
Coming soon!
Examples¶
Basic auth¶
from amsdal_integrations.core import AmsdalIntegration
from amsdal_integrations.data_classes import IntegrationConfig
config = IntegrationConfig(
amsdal_host='http://localhost:8000', # host of AMSDAL Application API
amsdal_auth=('username', 'password'), # Basic auth
)
amsdal_sdk = AmsdalIntegration(
config=config,
)
Custom client¶
from amsdal_integrations.core import AmsdalIntegration
from amsdal_integrations.data_classes import IntegrationConfig
from amsdal_integrations.clients.base import BaseClient
class MyClient(BaseClient):
...
amsdal_sdk = AmsdalIntegration(
config=IntegrationConfig(amsdal_host='http://localhost:8000'),
client_class=MyClient,
)
Using proxy¶
from amsdal_integrations.core import AmsdalIntegration
from amsdal_integrations.data_classes import IntegrationConfig
config = IntegrationConfig(
amsdal_host='http://localhost:8000',
client_extra={
'proxies': 'http://localhost:8030',
},
)
amsdal_sdk = AmsdalIntegration(config=config)
See other available options of httpx
here: https://www.python-httpx.org/advanced/