Skip to main content

hub-rest-client 0.1.5

A client library for accessing Hub REST API

⚠️This SDK generated using 2021.1.13439 OpenAPI version by custom openapi-python-client which is under development. It may have some bugs. Use with caution.⚠️

If you find a bug or want to request a new feature, please create an issue in YouTrack.

Usage

First, create a client:

from hub_rest_client import Client

client = Client(hub_base_url="https://hub.jetbrains.com/api/rest")

If the endpoints you're going to hit require authentication, use AuthenticatedClient instead:

import os

from hub_rest_client import AuthenticatedClient


client = AuthenticatedClient(hub_base_url="https://hub.jetbrains.com/api/rest", token=os.getenv("HUB_TOKEN"))

Now call your endpoint and use your models:

from hub_rest_client.models import MyDataModel
from hub_rest_client.api.my_tag import get_my_data_model
from hub_rest_client.types import Response

my_data: MyDataModel = get_my_data_model.sync(client=client)
# or if you need more info (e.g. status_code)
response: Response[MyDataModel] = get_my_data_model.sync_detailed(client=client)

Or do the same thing with an async version:

from hub_rest_client.models import MyDataModel
from hub_rest_client.api.my_tag import get_my_data_model
from hub_rest_client.types import Response

my_data: MyDataModel = await get_my_data_model.asyncio(client=client)
response: Response[MyDataModel] = await get_my_data_model.asyncio_detailed(client=client)

Things to know:

  1. Every path/method combo becomes a Python module with four functions:
    1. sync: Blocking request that returns parsed data (if successful) or None
    2. sync_detailed: Blocking request that always returns a Request, optionally with parsed set if the request was successful.
    3. asyncio: Like sync but the async instead of blocking
    4. asyncio_detailed: Like sync_detailed by async instead of blocking
  2. All path/query params, and bodies become method arguments.
  3. If your endpoint had any tags on it, the first tag will be used as a module name for the function (my_tag above)
  4. Any endpoint which did not have a tag will be in hub_rest_client.api.default

Metadata

Release files for hub-rest-client 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hub-rest-client 0.1.5
File Size Uploaded Provenance Actions
hub-rest-client-0.1.5.tar.gz 125.2 kB Without provenance Details for hub-rest-client-0.1.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for hub-rest-client 0.1.5
File Interpreter ABI Platform Actions
hub_rest_client-0.1.5-py3-none-any.whl Python 3 none any Details for hub_rest_client-0.1.5-py3-none-any.whl

Total release size: 656.0 kB

Release files / hub-rest-client-0.1.5.tar.gz

Download URL hub-rest-client-0.1.5.tar.gz
Size 125.2 kB
Tags Source
SHA-256 checksum
How to use checksums
78845ea1969c857253bc50160ae987e04898717dbfb088637494215cff26ab8c
BLAKE2b-256 checksum
How to use checksums
09b40992e2f13476d592f1d6ac6f082b1b5dea90369f3373b32d67c7cba6c911
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.8 CPython/3.9.6 Windows/10

Release files / hub_rest_client-0.1.5-py3-none-any.whl

Download URL hub_rest_client-0.1.5-py3-none-any.whl
Size 530.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
726bc74673a719c61e99408ef63695529bd7cdddd6a5ee1c761c95029bc7a5c1
BLAKE2b-256 checksum
How to use checksums
07ba30880bccffe1fe5cf8a31ef520f273b9f8e9e6b66d2120bffff946d25340
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.8 CPython/3.9.6 Windows/10

Security for hub-rest-client 0.1.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page