https://github.com/kubex-ecosystem/timecraft

A powerful toolkit designed to simplify time series analysis, streamline database integration, and automate routine data tasks with ease and flexibility

https://github.com/kubex-ecosystem/timecraft

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (16.3%) to scientific vocabulary
Last synced: 6 months ago · JSON representation

Repository

A powerful toolkit designed to simplify time series analysis, streamline database integration, and automate routine data tasks with ease and flexibility

Basic Info
Statistics
  • Stars: 3
  • Watchers: 1
  • Forks: 1
  • Open Issues: 0
  • Releases: 1
Created 10 months ago · Last pushed 7 months ago
Metadata Files
Readme Funding License Support Authors Notice

README.md

TimeCraft Banner


An advanced solution for time series analysis, database integration, and task automation, with dynamic notifications and a powerful CLI.


Build License: MIT Python Version PyPI Releases


Table of Contents

  1. About the Project
  2. Features
  3. Installation
  4. Usage
  5. Scheduled Execution
  6. Webhook Notifications
  7. Roadmap
  8. Contributing
  9. Contact

About the Project

TimeCraft is a flexible and powerful solution for time series analysis, database integration, and task automation. Developed in Python, it offers webhook notification support, scheduled model execution, and an intuitive CLI to streamline data workflows.

Why TimeCraft?

  • Advanced Analysis: Robust scripts for modeling, forecasting, and evaluating temporal data.
  • Simple Integration: Tools to connect and query multiple database systems.
  • Automation & Notifications: Modules to automate data workflows and send alerts.

Features

Plug-and-Play Models:

  • ARIMA, Prophet, LSTM, and other ready-to-use models.
  • Easy customization and extension.

Database Integration:

  • Efficient connection to different database systems.
  • Scripts for data import and querying.

Scheduled Execution:

  • Schedule automatic model runs (cronjob-like).
  • CLI and Python API for scheduling.

Dynamic Notifications:

  • Send notifications via Webhook (Slack, Discord, custom APIs).
  • Customizable payloads for each platform.

Powerful CLI:

  • Simple commands to run models, schedule executions, and monitor tasks.
  • Extensible for new workflows.

Installation

Quick Installation (Recommended)

```bash

Install TimeCraft with core features

pip install timecraft

Or install with all features (AI, Web Server)

pip install timecraft[all] ```

Development Installation

```bash

Clone the repository

git clone https://github.com/rafa-mori/timecraft.git cd timecraft

Quick setup with development script

./dev.sh setup

Or manual setup

python3 -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate pip install -e . ```

Optional Features

```bash

AI features (voice, chatbot, audio processing)

pip install timecraft[ai]

Web server and API features

pip install timecraft[web]

Database connectors (PostgreSQL, MySQL, etc.)

pip install timecraft[db]

Development tools

pip install timecraft[dev] ```


Usage

Python Usage (Recommended)

```python import timecraft

Check available features

print(f"AI available: {timecraft.AIAVAILABLE}") print(f"Version: {timecraft.version_}")

Create and use TimeCraft model

model = timecraft.TimeCraftAI() data = model.loaddata("data/histcambio.csv") forecasts = model.forecast(data, periods=30)

If AI features are available

if timecraft.AIAVAILABLE: chatbot = timecraft.ChatbotActions() response = chatbot.processquery("Analyze my data") ```

CLI Usage

```bash

Run quick test

python examples/quick_test.py

Run demo

python examples/demo_basic.py

Development mode

./dev.sh test ```

Advanced Examples

```python import timecraft

Database connection

db = timecraft.DatabaseConnector() data = db.query("SELECT * FROM timeseries_data")

Machine learning models

lr = timecraft.LinearRegression() lr.fit(Xtrain, ytrain)

Forecasting with Prophet (if available)

model = timecraft.TimeCraftAI() forecasts = model.forecast_prophet(data) ```


Command and Flag Descriptions

  • --data: Path to the data file.
  • --date_column: Name of the date column.
  • --value_columns: Value columns to analyze.
  • --is_csv: Indicates if the file is CSV.
  • --model: Model type (timecraft, classifier, regression).

Configuration

TimeCraft can be configured via command-line arguments or directly in Python code. For advanced configurations, see the examples in the /tutorials folder.


Scheduled Execution

TimeCraft allows you to schedule automatic model runs, similar to a cronjob.

Via CLI:

bash python -m timecraft_ai schedule <interval_seconds> <model>

  • <interval_seconds>: interval between executions (e.g., 600 for 10 minutes)
  • <model>: model type (timecraft, classifier, regression)

Via Python:

python from timecraft_ai import run_scheduled run_scheduled(model.run, interval_seconds=600)

The scheduler runs in the background and can be stopped with Ctrl+C.


Webhook Notifications

TimeCraft supports sending notifications to webhooks after model runs or analyses. Ideal for automation, monitoring, or integration with other systems (Slack, Discord, custom APIs).

How it works

  • Pass the webhook_url parameter to the run or run_analysis methods.
  • When finished, a POST with a JSON payload is sent to the URL.
  • Extra fields can be added via webhook_payload_extra.

Example:

python model.run(webhook_url="https://your-webhook.com/webhook")

With extra payload:

python model.run( webhook_url="https://your-webhook.com/webhook", webhook_payload_extra={"user": "rafa", "run_type": "nightly"} )

Slack:

python model.run( webhook_url="https://hooks.slack.com/services/XXX/YYY/ZZZ", webhook_payload_extra={"text": "TimeCraft finished!"} )

Discord:

python model.run( webhook_url="https://discord.com/api/webhooks/XXX/YYY", webhook_payload_extra={"content": "TimeCraft finished!"} )

The payload can be customized for each platform using webhook_payload_extra.


Roadmap

Upcoming Features:

  • Support for cloud data sources (BigQuery, Snowflake)
  • Email notification system
  • Dashboard for result visualization

Contributing

Contributions are welcome! See the Contributing Guide for details.


Contact

Developer:
Rafael Mori rafa-mori/timecraft on GitHub LinkedIn: Rafa Mori

Owner

  • Name: Kubex Ecosystem
  • Login: kubex-ecosystem
  • Kind: organization
  • Email: faelmori@gmail.com
  • Location: Brazil

With over ten years of continuous work experience in software development, DevOps, and distributed architecture-related affairs, ....

GitHub Events

Total
Last Year

Dependencies

.github/workflows/publish.yml actions
  • actions/checkout v4 composite
  • actions/setup-python v4 composite
src/pyproject.toml pypi
  • jinja2 *
  • kaleido *
  • matplotlib >=3.4.0
  • mysql-connector-python *
  • numpy >=1.21.0
  • pandas >=1.3.0
  • plotly *
  • prophet *
  • pymongo *
  • pyodbc *
  • requests *
  • scikit-learn *
  • seaborn *
  • sqlalchemy *
  • xarray *
src/timecraft_ai/requirements.txt pypi
  • cx_Oracle *
  • jinja2 *
  • jupyter *
  • kaleido *
  • matplotlib *
  • mysql-connector-python *
  • notebook *
  • numpy *
  • pandas *
  • plotly *
  • prophet *
  • pymongo *
  • pyodbc *
  • requests *
  • scikit-learn *
  • seaborn *
  • sqlalchemy *
  • xarray *