Alasco
Introduction
This package is an SDK for python
to facilitate interaction with the Alasco API.
The official documentation from Alasco can be found here.
How to install it
Run the following command in your terminal:
pip install alasco
Get started
Import the alasco module and then instantiate the client like this:
from alasco import Alasco
from dotenv import load_dotenv, find_dotenv
_ = load_dotenv(find_dotenv(raise_error_if_not_found=True))
token = os.environ["token"]
key = os.environ["key"]
alasco = Alasco(token=token, key=key, verbose=True)
Example 1 : fetch all DataFrames
dfs = alasco.data_fetcher.get_all_df()
dfs["properties"].head(2)
Output:
Example 2 : Batch download documents
Download all documents (contracts, invoices, change orders) for a particular property locally.
This can be useful for backup purposes.
property_name = "YOUR_PROPERTY_NAME"
dfs = alasco.data_fetcher.get_all_df(property_name = property_name)
alasco.document_downloader.batch_download_documents(dfs=dfs, property_name = property_name)