CLI and SDK tools for interacting with the Shaped API.
Project description
Shaped CLI
CLI for interactions with the Shaped API.
For full documentation, see docs.shaped.ai.
Installing the Shaped CLI
pip install shaped
Initialize
shaped init --api-key <API_KEY> [--env <ENV>]
The --env option defaults to prod and can be set to other environments like dev or staging.
Engine API
Create Engine
shaped create-engine --file <PATH_TO_FILE>
Or pipe from stdin:
cat <PATH_TO_FILE> | shaped create-engine
Update Engine
shaped update-engine --file <PATH_TO_FILE>
Or pipe from stdin:
cat <PATH_TO_FILE> | shaped update-engine
List Engines
shaped list-engines
View Engine
shaped view-engine --engine-name <ENGINE_NAME>
Delete Engine
shaped delete-engine --engine-name <ENGINE_NAME>
Table API
Create Table
shaped create-table --file <PATH_TO_FILE>
Or pipe from stdin:
cat <PATH_TO_FILE> | shaped create-table
Create Table from URI
Create a table and automatically insert data from a file:
shaped create-table-from-uri --name <TABLE_NAME> --path <PATH_TO_FILE> --type <FILE_TYPE>
Supported file types: parquet, csv, tsv, json, jsonl
List Tables
shaped list-tables
Table Insert
Insert data into an existing table:
shaped table-insert --table-name <TABLE_NAME> --file <DATAFRAME_FILE> --type <FILE_TYPE>
Supported file types: parquet, csv, tsv, json, jsonl
View Table
shaped view-table --table-name <TABLE_NAME>
Update Table
shaped update-table --file <PATH_TO_FILE>
Or pipe from stdin:
cat <PATH_TO_FILE> | shaped update-table
Delete Table
shaped delete-table --table-name <TABLE_NAME>
View API
Create View
shaped create-view --file <PATH_TO_FILE>
Or pipe from stdin:
cat <PATH_TO_FILE> | shaped create-view
List Views
shaped list-views
View View
shaped view-view --view-name <VIEW_NAME>
Update View
shaped update-view --file <PATH_TO_FILE>
Or pipe from stdin:
cat <PATH_TO_FILE> | shaped update-view
Delete View
shaped delete-view --view-name <VIEW_NAME>
Query API
Execute Query
Execute an ad-hoc query against an engine. The query can be provided in three ways:
From a file:
shaped query --engine-name <ENGINE_NAME> --query-file <PATH_TO_FILE>
As a JSON string:
shaped query --engine-name <ENGINE_NAME> --query '{"sql": "SELECT * FROM table"}'
From stdin:
cat <PATH_TO_FILE> | shaped query --engine-name <ENGINE_NAME>
Execute Saved Query
Execute a previously saved query by name:
shaped execute-saved-query --engine-name <ENGINE_NAME> --query-name <QUERY_NAME>
List Saved Queries
List all saved queries for an engine:
shaped list-saved-queries --engine-name <ENGINE_NAME>
View Saved Query
View the definition of a saved query:
shaped view-saved-query --engine-name <ENGINE_NAME> --query-name <QUERY_NAME>
Python SDK
Installation
Pip Installation
pip install shaped
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 shaped-2.0.1.tar.gz.
File metadata
- Download URL: shaped-2.0.1.tar.gz
- Upload date:
- Size: 57.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2bcd60012416288239de7af4daf29ca8a7da869ed5a9e5bb1483df023a854684
|
|
| MD5 |
b23654a6389a014237df13e902260d25
|
|
| BLAKE2b-256 |
e9963f552927633ff64f46fe6fc913154568d326e106453d62ea9d6a4899047f
|
File details
Details for the file shaped-2.0.1-py3-none-any.whl.
File metadata
- Download URL: shaped-2.0.1-py3-none-any.whl
- Upload date:
- Size: 165.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c9d44d174f57b9b633b1985d6cfa1189a3682388681c0d0df183cd829cb37491
|
|
| MD5 |
cf7fff1a2a4aaff2a649365cd70d127a
|
|
| BLAKE2b-256 |
1028350bb6bbd79cdd830f238a68ed1e82429e760b3fdb35b7b072cb1155ed2f
|