A CLI tool for Techtonique API
Project description
CLI for Techtonique
This a Command Line Interface (CLI) for Techtonique's API. Working on all operating systems (Windows, MacOS, Linux). You may find these resources useful:
- https://jeroenjanssens.com/dsatcl/chapter-5-scrubbing-data
- https://jeroenjanssens.com/dsatcl/chapter-7-exploring-data
1 - Installation
In a virtual environment, run the following command:
pip install techtonique_cli
First, get a token from techtonique.net/token. If you want to avoid providing a token each time you run the CLI, you can set the TECHTONIQUE_API_TOKEN environment variable (for 60 minutes). That is, either:
- set the
TECHTONIQUE_API_TOKENenvironment variable by replacing theTOKENvalue below with your token.
export TECHTONIQUE_API_TOKEN=TOKEN
- put the token in a
.envfile in the current directory, asTECHTONIQUE_API_TOKEN=TOKEN.
All the datasets used in the examples below are available in Techtonique/datasets repository.
2 - Examples
2 - 1 - General usage
At the command line, type:
techtonique --help
techtonique forecasting --help
techtonique forecasting univariate --help
techtonique ml --help
techtonique ml classification --help
techtonique reserving --help
techtonique survival --help
# Univariate forecasting
techtonique forecasting univariate /Users/t/Documents/datasets/time_series/univariate/a10.csv --base_model RidgeCV --h 3
# Multivariate forecasting
techtonique forecasting multivariate /Users/t/Documents/datasets/time_series/multivariate/ice_cream_vs_heater.csv --lags 25 --h 10
# Regression
techtonique ml regression /Users/t/Documents/datasets/tabular/regression/mtcars2.csv --base_model ElasticNet
2 - 2 - Interacting with output files
Then, either:
- provide the token as a command line argument.
- set the
TECHTONIQUE_API_TOKENenvironment variable by replacing theTOKENvalue below with your token.
export TECHTONIQUE_API_TOKEN=TOKEN
- put the token in a
.envfile in the current directory.
Here's how to export results to a JSON file:
techtonique forecasting univariate /Users/t/Documents/datasets/time_series/univariate/a10.csv --base_model RidgeCV --h 10 > forecast.json
Here's how to export results to a CSV file with selected columns:
techtonique forecasting univariate /Users/t/Documents/datasets/time_series/univariate/a10.csv --base_model RidgeCV --h 10 --select "lower, upper, mean" --to-csv forecast.csv
2 - 3 - Plotting
# Display plot interactively
techtonique forecasting univariate /Users/t/Documents/datasets/time_series/univariate/a10.csv --h 10 --plot
# Create forecast and save plot
techtonique forecasting univariate /Users/t/Documents/datasets/time_series/univariate/a10.csv --h 10 --plot-file forecast.png
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file techtonique_cli-0.3.1.tar.gz.
File metadata
- Download URL: techtonique_cli-0.3.1.tar.gz
- Upload date:
- Size: 7.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cb7b425c24c901b26edc62ff22744c61ded0de562e18f7092884622ce8a1524f
|
|
| MD5 |
05ece123ccf7e704950c031371a1438e
|
|
| BLAKE2b-256 |
e6b741efcc0dd2f56700420817601e2bcad4f0c307a64144b98e7c57093f2429
|
File details
Details for the file techtonique_cli-0.3.1-py3-none-any.whl.
File metadata
- Download URL: techtonique_cli-0.3.1-py3-none-any.whl
- Upload date:
- Size: 6.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
36be0286ef1a956c44f474141de4ac8d215152f7d9ae4d2196ac2275da2731cd
|
|
| MD5 |
9a09c836f8e58672d23862bb602cce2b
|
|
| BLAKE2b-256 |
64ee5fda1dcc69b21e467be5714233fd310ee6e4569240357e58892780b3d02e
|