Skip to main content

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 project.

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)

# The space could also be 'group' or 'user'.
space = 'project'
# space_id could also be a group id or username, for group or user spaces, respectively.
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=space,
    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=space,
    space_id=space_id,
    path=path,
)
# Look in the HyperThought UI to see the uploaded file.

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

hyperthought-0.9.13.tar.gz (40.3 kB view details)

Uploaded Source

Built Distribution

hyperthought-0.9.13-py3-none-any.whl (50.5 kB view details)

Uploaded Python 3

File details

Details for the file hyperthought-0.9.13.tar.gz.

File metadata

  • Download URL: hyperthought-0.9.13.tar.gz
  • Upload date:
  • Size: 40.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.0 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.8

File hashes

Hashes for hyperthought-0.9.13.tar.gz
Algorithm Hash digest
SHA256 d700fdaa09e1a80db58e2d0c14e4765f085da73094980f95d8cd8404c4c5175c
MD5 463a01110ca98c3d9c9623055a9972f3
BLAKE2b-256 baa57380da7257a754020ce77e4b69d2fd2e3e491acf3f6ede36296705342a8c

See more details on using hashes here.

File details

Details for the file hyperthought-0.9.13-py3-none-any.whl.

File metadata

  • Download URL: hyperthought-0.9.13-py3-none-any.whl
  • Upload date:
  • Size: 50.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.0 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.8

File hashes

Hashes for hyperthought-0.9.13-py3-none-any.whl
Algorithm Hash digest
SHA256 fd8f00fb8e1a3d2dd0c23a561d250fdf38d4b4f28dc468ed682d4806c4dd8960
MD5 be788688f96ddb52b22889f1d0ee931b
BLAKE2b-256 f66f19f7d21f27cef2fe7e2c43603fcbf0662f907afccb3cd30b1f000aeac3f7

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page