Skip to content

Latest commit

 

History

History
144 lines (102 loc) · 4.73 KB

README.md

File metadata and controls

144 lines (102 loc) · 4.73 KB

openapi-client

The API documentation of the backend.

Access to definition group public is unrestricted. To access group provider you need extra permissions and group private isn't made available publicly.

This Python package is automatically generated by the OpenAPI Generator project:

  • API version: v1
  • Package version: 1.0.0
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen

Requirements.

Python >= 3.6

Installation & Usage

pip install

If the python package is hosted on a repository, you can install directly using:

pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git)

Then import the package:

import py4envi_py4envi_openapi_client

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import py4envi_py4envi_openapi_client

Getting Started

Please follow the installation procedure and then run the following:

import time
import py4envi_py4envi_openapi_client
from pprint import pprint
from py4envi_py4envi_openapi_client.api import auth_api
from py4envi_py4envi_openapi_client.model.login_request import LoginRequest
from py4envi_py4envi_openapi_client.model.token_response import TokenResponse
# Defining the host is optional and defaults to https://dane.sat4envi.imgw.pl
# See configuration.py for a list of all supported configuration parameters.
configuration = py4envi_py4envi_openapi_client.Configuration(
    host = "https://dane.sat4envi.imgw.pl"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization (JWT): bearer-token
configuration = py4envi_py4envi_openapi_client.Configuration(
    access_token = 'YOUR_BEARER_TOKEN'
)


# Enter a context with an instance of the API client
with py4envi_py4envi_openapi_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = auth_api.AuthApi(api_client)
    login_request = LoginRequest(
        email="email_example",
        password="password_example",
    ) # LoginRequest | 

    try:
        # Get authorization token
        api_response = api_instance.token(login_request)
        pprint(api_response)
    except py4envi_py4envi_openapi_client.ApiException as e:
        print("Exception when calling AuthApi->token: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to https://dane.sat4envi.imgw.pl

Class Method HTTP request Description
AuthApi token POST /api/v1/token Get authorization token
ProductApi get_products GET /api/v1/products View a list of products
SceneApi generate_download_link GET /api/v1/scenes/{id}/download/{artifactName} Redirect to a presigned download url for a scene's artifact
SearchApi get_count GET /api/v1/search/count Get count of total scene results
SearchApi get_scenes GET /api/v1/search Search for scenes

Documentation For Models

Documentation For Authorization

bearer-token

  • Type: Bearer authentication (JWT)

Author

Notes for Large OpenAPI documents

If the OpenAPI document is large, imports in py4envi_py4envi_openapi_client.apis and py4envi_py4envi_openapi_client.models may fail with a RecursionError indicating the maximum recursion limit has been exceeded. In that case, there are a couple of solutions:

Solution 1: Use specific imports for apis and models like:

  • from py4envi_py4envi_openapi_client.api.default_api import DefaultApi
  • from py4envi_py4envi_openapi_client.model.pet import Pet

Solution 2: Before importing the package, adjust the maximum recursion limit as shown below:

import sys
sys.setrecursionlimit(1500)
import py4envi_py4envi_openapi_client
from py4envi_py4envi_openapi_client.apis import *
from py4envi_py4envi_openapi_client.models import *