1- # Dyspatch Python Client
1+ # dyspatch-python
22# Introduction
3- The Dyspatch API is based on the REST paradigm and features resource based URLs
4- with standard HTTP response codes to indicate errors.
53
6- We use standard HTTP authentication and request verbs and all responses are
7- JSON formatted. See our [ Implementation
8- Guide] ( https://docs.dyspatch.io/development/implementing_dyspatch/ ) for more
9- details on how to implement Dyspatch.
4+ The Dyspatch API is based on the REST paradigm, and features resource based URLs with standard HTTP response
5+ codes to indicate errors. We use standard HTTP authentication and request verbs, and all responses are JSON formatted.
6+ See our [ Implementation Guide] ( https://docs.dyspatch.io/development/implementing_dyspatch/ ) for more details on
7+ how to implement Dyspatch.
108
11- This Python package is automatically generated by the [ Swagger Codegen] ( https://github.com/swagger-api/swagger-codegen ) project:
9+ ## API Client Libraries
10+ Dyspatch provides API Clients for popular languages and web frameworks.
11+
12+ - [ Java] ( https://github.com/getdyspatch/dyspatch-java )
13+ - [ Javascript] ( https://github.com/getdyspatch/dyspatch-javascript )
14+ - [ Python] ( https://github.com/getdyspatch/dyspatch-python )
15+ - [ C#] ( https://github.com/getdyspatch/dyspatch-dotnet )
16+ - [ Go] ( https://github.com/getdyspatch/dyspatch-golang )
17+ - [ Ruby] ( https://github.com/getdyspatch/dyspatch-ruby )
18+
19+
20+ This Python package is automatically generated by the [ OpenAPI Generator] ( https://openapi-generator.tech ) project:
1221
1322- API version: 2020.04
14- - Package version: 5.0.0
15- - Build package: io.swagger .codegen.languages.PythonClientCodegen
23+ - Package version: 5.0.1
24+ - Build package: org.openapitools .codegen.languages.PythonClientCodegen
1625For more information, please visit [ https://docs.dyspatch.io ] ( https://docs.dyspatch.io )
1726
1827## Requirements.
@@ -22,9 +31,12 @@ Python 2.7 and 3.4+
2231## Installation & Usage
2332### pip install
2433
34+ If the python package is hosted on a repository, you can install directly using:
35+
2536``` sh
26- pip install dyspatch-python
37+ pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
2738```
39+ (you may need to run ` pip ` with root permission: ` sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git ` )
2840
2941Then import the package:
3042``` python
@@ -51,29 +63,48 @@ Please follow the [installation procedure](#installation--usage) and then run th
5163
5264``` python
5365from __future__ import print_function
66+
5467import time
5568import dyspatch_client
5669from dyspatch_client.rest import ApiException
5770from pprint import pprint
5871
72+ # Defining the host is optional and defaults to https://api.dyspatch.io
73+ # See configuration.py for a list of all supported configuration parameters.
74+ configuration = dyspatch_client.Configuration(
75+ host = " https://api.dyspatch.io"
76+ )
77+
78+ # The client must configure the authentication and authorization parameters
79+ # in accordance with the API server security policy.
80+ # Examples for each auth method are provided below, use the example that
81+ # satisfies your auth use case.
82+
5983# Configure API key authorization: Bearer
60- configuration = dyspatch_client.Configuration()
61- configuration.api_key[' Authorization' ] = ' YOUR_API_KEY'
84+ configuration = dyspatch_client.Configuration(
85+ host = " https://api.dyspatch.io" ,
86+ api_key = {
87+ ' Authorization' : ' YOUR_API_KEY'
88+ }
89+ )
6290# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
6391# configuration.api_key_prefix['Authorization'] = 'Bearer'
6492
65- # create an instance of the API class
66- api_instance = dyspatch_client.DraftsApi(dyspatch_client.ApiClient(configuration))
67- draft_id = ' draft_id_example' # str | A draft ID
68- target_language = ' target_language_example' # str | The type of templating language to compile as. Should only be used for visual templates.
69-
70- try :
71- # Get Draft by ID
72- api_response = api_instance.drafts_draft_id_get(draft_id, target_language)
73- pprint(api_response)
74- except ApiException as e:
75- print (" Exception when calling DraftsApi->drafts_draft_id_get: %s \n " % e)
7693
94+ # Enter a context with an instance of the API client
95+ with dyspatch_client.ApiClient(configuration) as api_client:
96+ # Create an instance of the API class
97+ api_instance = dyspatch_client.DraftsApi(api_client)
98+ draft_id = ' draft_id_example' # str | A draft ID
99+ language_id = ' language_id_example' # str | A language ID (eg: en-US)
100+ accept = ' accept_example' # str | A version of the API that should be used for the request. For example, to use version \"2020.04\", set the value to \"application/vnd.dyspatch.2020.04+json\"
101+
102+ try :
103+ # Remove a localization
104+ api_instance.delete_localization(draft_id, language_id, accept)
105+ except ApiException as e:
106+ print (" Exception when calling DraftsApi->delete_localization: %s \n " % e)
107+
77108```
78109
79110## Documentation for API Endpoints
@@ -125,3 +156,5 @@ Class | Method | HTTP request | Description
125156## Author
126157
127158support@dyspatch.io
159+
160+
0 commit comments