Package: de-diga
digaAPI zum DiGA-Verzeichnishttps://diga.bfarm.de/de/des Bundesinstituts für Arzneimittel und Medizinprodukte BfArM. Das Verzeichnis bietet eine Auswahl an digitalen Gesundheitsanwendungen (DiGA), die vom BfArM gemäß § 139e SGB V bewertet wurden.Anfragen sind als GET-requests zu stellen, wobei zur Authorisierung ein Bearer Token im Header "authorization" anzugeben ist, der wiederum einem GET-request anhttps://diga.bfarm.de/de/verzeichniszu entnehmen ist (Im contetn von meta name="host-app/config/environment" unter "APP"/"fhir"/"token").This Python package is automatically generated by theOpenAPI Generatorproject:API version: 2.0.0Package version: 0.1.0Build package: org.openapitools.codegen.languages.PythonClientCodegen
For more information, please visithttps://github.com/AndreasFischer1985/diga-apiRequirements.Python >= 3.6Installation & Usagepip installpipinstalldeutschland[diga]poetry installpoetryadddeutschland-EdigaSetuptoolsInstall viaSetuptools.pythonsetup.pyinstall--user(orsudo python setup.py installto install the package for all users)UsageImport the package:fromdeutschlandimportdigaGetting StartedPlease follow theinstallation procedureand then run the following:importtimefromdeutschlandimportdigafrompprintimportpprintfromdeutschland.diga.apiimportdefault_api# Defining the host is optional and defaults to https://diga.bfarm.de/api/fhir/v2.0# See configuration.py for a list of all supported configuration parameters.configuration=diga.Configuration(host="https://diga.bfarm.de/api/fhir/v2.0")# 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: bearerAuthconfiguration=diga.Configuration(access_token='YOUR_BEARER_TOKEN')# Enter a context with an instance of the API clientwithdiga.ApiClient(configuration)asapi_client:# Create an instance of the API classapi_instance=default_api.DefaultApi(api_client)count=1000# int |profile="https%3A%2F%2Ffhir.bfarm.de%2FStructureDefinition%2FHealthAppCatalogEntry"# str |try:# CatalogEntryapi_instance.catalog_entry_get(count,profile)exceptdiga.ApiExceptionase:print("Exception when calling DefaultApi->catalog_entry_get:%s\n"%e)Documentation for API EndpointsAll URIs are relative tohttps://diga.bfarm.de/api/fhir/v2.0ClassMethodHTTP requestDescriptionDefaultApicatalog_entry_getGET/CatalogEntryCatalogEntryDefaultApicharge_item_definition_getGET/ChargeItemDefinitionChargeItemDefinitionDefaultApidevice_definition_getGET/DeviceDefinitionDeviceDefinitionDefaultApiorganization_getGET/OrganizationOrganizationDefaultApiquestionnaire_getGET/QuestionnaireQuestionnaireDefaultApiquestionnaire_response_getGET/QuestionnaireResponseQuestionnaireDocumentation For ModelsDocumentation For AuthorizationbearerAuthType: Bearer authenticationAuthorandreasfischer1985@web.deNotes for Large OpenAPI documentsIf the OpenAPI document is large, imports in diga.apis and diga.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 deutschland.diga.api.default_api import DefaultApifrom deutschland.diga.model.pet import PetSolution 2:
Before importing the package, adjust the maximum recursion limit as shown below:import sys
sys.setrecursionlimit(1500)
from deutschland import diga
from deutschland.diga.apis import *
from deutschland.diga.models import *