Skip to main content

Unofficial Client for Humanitec API

Based on generated client with swagger-codegen. Contains a few tweaks to tackle generation bugs from swagger-codegen. Full generated documentation of generated client.

This is for testing only. If you need to use a python-client in production, rather generate maintain one by yourself.

However, if you just need a python module ready to access Humanitec API, run:

pip install unofficial-humanitec-client

Official Humanitec API Documentation

See official documentation for information provided directly by Humanitec.

License

The original openapi specification is published under Apache 2 license. This generated client is published under EUROPEAN UNION PUBLIC LICENCE v. 1.2


Trouble Shooting

Authentication

Unfortunately, there is mix of missing security schemes in the original Humanitec specification (from version 0.24.1 on) and several bug in the swagger-codegen breaking the use of bearer authentication. As workaround use the folloying snippet:

configuration = Configuration()
configuration.api_key['Authorization']='<your humanitec api token>'
configuration.api_key_prefix['Authorization']='Bearer'
api_client = swagger_client.ApiClient(configuration=configuration)

Use that api_client as base client for every api_instance you create, i.e.

def get_all_apps(org_id: str):
    # Use api_client with bearer authentication configured
    api_instance = swagger_client.ApplicationApi(api_client=api_client)

    try:
        # List all Applications in an Organization.
        api_response = api_instance.orgs_org_id_apps_get(org_id)
        print(api_response)
    except ApiException as e:
        print("Exception when calling ApplicationApi->orgs_org_id_apps_get: %s\n" % e)

Invalid value for '', must not be 'None'

Some endpoints cannot deal with null values. On the one side nullable fields are missing from the original Humanitec specification (0.24.1), but even when added, swagger-codegen still makes all fields required.

Known endpoints running in to this bug are delta endpoints. In that case, you have to rely on reuests module, which begs the question why using a generated client at all...

Metadata

Release files for unofficial-humanitec-client 0.1.1

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

Source distribution (sdist)

Source distribution for unofficial-humanitec-client 0.1.1
File Size Uploaded
unofficial-humanitec-client-0.1.1.tar.gz 238.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for unofficial-humanitec-client 0.1.1
File Interpreter ABI Platform
unofficial_humanitec_client-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 1.4 MB

Release files / unofficial-humanitec-client-0.1.1.tar.gz

Download URL unofficial-humanitec-client-0.1.1.tar.gz
Size 238.5 kB
Tags Source
SHA-256 checksum
How to use checksums
eda42cbb37365ede2dbc483b18065a12688ab7f16e57dd83cef1c9e5c258e0ea
BLAKE2b-256 checksum
How to use checksums
7935fea0ae264aab5fc13d0fd5a6d6989a22e02eaaf314b2bbda2240fe592d19
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.6

Release files / unofficial_humanitec_client-0.1.1-py3-none-any.whl

Download URL unofficial_humanitec_client-0.1.1-py3-none-any.whl
Size 1.1 MB
Tags Python 3
SHA-256 checksum
How to use checksums
d491cdf2003d7c8c8c7983927df094df15567313b4ba30f3d3d188ab69680a26
BLAKE2b-256 checksum
How to use checksums
bb6fb90fa611f2ab2e49f808788f82ffb36023b0dcbf24e2520c1b50553e3653
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.6

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

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