Skip to main content

Chronulus AI Python SDK

Project description

Chronulus SDK for Python

AI Forecasting & Prediction Agents

Install

pip install chronulus

Example Usage

Import packages

# python imports
from typing import List
from pydantic import BaseModel, Field
from datetime import datetime

# chronulus sdk imports
from chronulus import Session
from chronulus.estimator import NormalizedForecaster
from chronulus_core.types.attribute import ImageFromUrl

Describe the Use Case

chronulus_session = Session(
    name="ASIN Prediction",
    situation="""Amazon is the largest ecommerce retailer with extensive forecasting capability, but it does not yet have
    the ability to forecast demand for new products that lack a sufficient history of sales. 
    """,
    task="""We would like to forecast the demand for an ASIN, which is Amazon's name for a SKU. A unique ASIN is assigned
    to individual products, to product variants, and to product bundles. We would like to predict seasonal demand for 
    an ASIN in the US Marketplace. 
    """,
    env=dict(
        CHRONULUS_API_KEY="<YOUR-CHRONULUS-API-KEY>",
    )
)

Describe a prediction input

class Item(BaseModel):
    brand: str = Field(description="The brand of the product")
    product_name: str = Field(description="The name of the product. This may include the brand and other descriptive info")
    product_details: str = Field(description="A long form description of the product and its characteristics / features")
    price: float = Field(description="The price of the ASIN in USD")
    product_images: List[ImageFromUrl] = Field(default=[], description="A list of image urls associated with this product")

Create a forecasting agent

nf_agent = NormalizedForecaster(
    session=chronulus_session,
    input_type=Item
)

Project details


Download files

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

Source Distribution

chronulus-0.0.5.post13.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

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

chronulus-0.0.5.post13-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

Details for the file chronulus-0.0.5.post13.tar.gz.

File metadata

  • Download URL: chronulus-0.0.5.post13.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for chronulus-0.0.5.post13.tar.gz
Algorithm Hash digest
SHA256 a89215dc4cc30ead3391b5095f4d0de46853946be81e432b389eb6ae93114fa2
MD5 f1482aa44bd0b530ef4612dbc24ce2fe
BLAKE2b-256 ff5a23e0f7defb254b6ebd3424111f772cd34488cda4f295760872017db76c04

See more details on using hashes here.

File details

Details for the file chronulus-0.0.5.post13-py3-none-any.whl.

File metadata

File hashes

Hashes for chronulus-0.0.5.post13-py3-none-any.whl
Algorithm Hash digest
SHA256 89987b1d33a3c95880e3debaf4008b0e253388598e0cca2d952c96e8ef277573
MD5 9349499fb9c73b6de5ccd7391d37cf9b
BLAKE2b-256 f100c970019d04829f9b64ebc3818d5c3f9bb58ebfec9b7034da4e545bc7bb50

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