Wrappers for HyperThought® API
Project description
Modules that encapsulate HyperThought API calls and make operations like authentication and file transfer (upload or download) easier to accomplish.
Description
Example usage:
Here is the code needed to upload a file to a HyperThought workspace.
from getpass import getpass
import hyperthought as ht
auth_info = getpass("Enter encoded auth info from your HyperThought profile page: ")
auth = ht.auth.Authorization(auth_info)
files_api = ht.api.files.FilesAPI(auth)
# space_id can be found in the url for the workspace
# e.g. https://www.hyperthought.io/workspace/<space_id>/detail
space_id = input("Enter destination project id (in url of project): ")
# Create a folder.
# Use default (root) path and don't specify any metadata for the folder.
# (See method docstring for info on unused parameters.)
folder_id = files_api.create_folder(
name="Tests",
space_id=space_id,
)
# Get a path for the file.
# Paths consist of comma-separated parent folder ids.
path = f",{folder_id},"
local_file_path = input("Enter path to local file: ")
files_api.upload(
local_path=local_file_path,
space_id=space_id,
path=path,
)
# Look in the HyperThought UI to see the uploaded file.
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
hyperthought-0.9.43.tar.gz
(62.7 kB
view details)
Built Distribution
File details
Details for the file hyperthought-0.9.43.tar.gz
.
File metadata
- Download URL: hyperthought-0.9.43.tar.gz
- Upload date:
- Size: 62.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 35c419bcfc910ca74f83d549c8d9d8f18520a047a58ad2df51986c6f1eac8e5c |
|
MD5 | 35d62ecf711a001167e1ac90ef78ec52 |
|
BLAKE2b-256 | 82f1a799db538f33d5da170073c78ae47ecfe6a7c325429a19fefef0d8b6cc00 |
File details
Details for the file hyperthought-0.9.43-py3-none-any.whl
.
File metadata
- Download URL: hyperthought-0.9.43-py3-none-any.whl
- Upload date:
- Size: 65.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 28fd2b8a654b9d67b0bf3bdc4490512e24259e6b8136cb704905995a82e8a990 |
|
MD5 | 4a573f66a44ffbf52f7514a52759f341 |
|
BLAKE2b-256 | 10c7ae5f4d911edd9e5046118f9061e6739c25bc60ada51e88ffffa331ba494e |