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.2.tar.gz (26.0 kB view details)

Uploaded Source

Built Distribution

hyperthought-0.2-py3-none-any.whl (31.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: hyperthought-0.2.tar.gz
  • Upload date:
  • Size: 26.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.1 pkginfo/1.7.0 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.2

File hashes

Hashes for hyperthought-0.2.tar.gz
Algorithm Hash digest
SHA256 9810ef7f82504597c0aaa67a5317d24da3d96b8a687a468daaf7d9774600388f
MD5 0a12bfce067e19d93efb0845bfd03000
BLAKE2b-256 d18d8036e5cb5078a21c9926877f6711125d5aff931c4b994165f99497511ea1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: hyperthought-0.2-py3-none-any.whl
  • Upload date:
  • Size: 31.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.1 pkginfo/1.7.0 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.2

File hashes

Hashes for hyperthought-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4a93b542e81db0724e0e590f74be23c1b639cf6cfe599e65a17a20c610a09cc1
MD5 6f0810b81b2daeb8bdf16484c98fe9f5
BLAKE2b-256 7652f7179ab071c54f84d8794a5f9627944925e02220b61102e084d91dab2faf

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