<p>OK fine, found useful information on READme.md generated by OpenAPI-generator itself</p>
<p>and tried <code>pdoc</code> to get html document of my OpenAPI-generator generated client Module</p>
<p>Moreover on stackoverflow <a href="https://stackoverflow.com/questions/59727169/how-to-generate-api-documentation-using-openapi-generator">How to generate API Documentation using openapi-generator?</a> you can find how OpenApi Generator can do generation of html documentation from your yaml or json definition of your API.</p>
<p>For openAPI json api specification I found <a href="https://mrin9.github.io/RapiPdf/" rel="nofollow noreferrer">RapiPDF</a> too : Web Component to generate PDF from OpenAPI Spec (json yml file).</p>

CC BY-SA 4.0
2021-01-04T18:31:10.880Z
2021-01-04T18:31:10.880Z
pippo1980
<p>Trying to learn a little bit of Python and Biopython I ended up figuring out what a Rest API is when the <a href="https://data.rcsb.org/#data-api" rel="nofollow noreferrer">RCSB PDB repository</a> released its new Rest API.</p>
<p>I tried to retrieve info from the PDB repository using python3 requests,</p>
<p>then I managed to use <a href="https://openapi-generator.tech/" rel="nofollow noreferrer">OpenAPI-generator</a> to generate what they call a 'Python3 Client'.</p>
<p>Now I am at loss I have this ApiClient class:</p>
<pre><code>print dir(): 

 ['NATIVE_TYPES_MAPPING', 'PRIMITIVE_TYPES', '_ApiClient__call_api',
  '_ApiClient__deserialize', '_ApiClient__deserialize_date',
  '_ApiClient__deserialize_datetime', '_ApiClient__deserialize_file',
  '_ApiClient__deserialize_model', '_ApiClient__deserialize_object',
  '_ApiClient__deserialize_primitive', '__class__', '__delattr__',
  '__dict__', '__dir__', '__doc__', '__enter__', '__eq__', '__exit__',
  '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__',
  '__init__', '__init_subclass__', '__le__', '__lt__', '__module__',
  '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__',
  '__setattr__', '__sizeof__', '__str__', '__subclasshook__',
  '__weakref__', '_pool', 'call_api', 'client_side_validation',
  'close', 'configuration', 'cookie', 'default_headers',
  'deserialize', 'files_parameters', 'parameters_to_tuples',
  'pool', 'pool_threads', 'request', 'rest_client',
  'sanitize_for_serialization', 'select_header_accept',
  'select_header_content_type', 'set_default_header',
  'update_params_for_auth', 'user_agent']
</code></pre>
<p>and don't know how to use it. Googling for examples or searching for info on the OpenAPI-generator website doesn't seem to work for me, I find plenty of tutorials and examples on how to generate the client but none about how to use it.</p>
<p>The generated client class should help to better interact with the server as I understood (I could be wrong here). I am asking for helps and hints here because the OpenAPI webpage under Community points to stackoverflow under [openapi-generator] tag. Any tutorial, easy documentation that could help me understand the output of the generator?</p>

<python><public-databases><pdb><api>
OpenAPI-Generator Python Client Instructions Examples
# OpenAPI-Generator Python Client Instructions Examples

(Asked by: username_0 on 2020-12-20)

Trying to learn a little bit of Python and Biopython I ended up figuring out what a Rest API is when the RCSB PDB repository released its new Rest API.
I tried to retrieve info from the PDB repository using python3 requests,
then I managed to use OpenAPI-generator to generate what they call a 'Python3 Client'.
Now I am at loss I have this ApiClient class:
print dir(): 

 ['NATIVE_TYPES_MAPPING', 'PRIMITIVE_TYPES', '_ApiClient__call_api',
  '_ApiClient__deserialize', '_ApiClient__deserialize_date',
  '_ApiClient__deserialize_datetime', '_ApiClient__deserialize_file',
  '_ApiClient__deserialize_model', '_ApiClient__deserialize_object',
  '_ApiClient__deserialize_primitive', '__class__', '__delattr__',
  '__dict__', '__dir__', '__doc__', '__enter__', '__eq__', '__exit__',
  '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__',
  '__init__', '__init_subclass__', '__le__', '__lt__', '__module__',
  '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__',
  '__setattr__', '__sizeof__', '__str__', '__subclasshook__',
  '__weakref__', '_pool', 'call_api', 'client_side_validation',
  'close', 'configuration', 'cookie', 'default_headers',
  'deserialize', 'files_parameters', 'parameters_to_tuples',
  'pool', 'pool_threads', 'request', 'rest_client',
  'sanitize_for_serialization', 'select_header_accept',
  'select_header_content_type', 'set_default_header',
  'update_params_for_auth', 'user_agent']

and don't know how to use it. Googling for examples or searching for info on the OpenAPI-generator website doesn't seem to work for me, I find plenty of tutorials and examples on how to generate the client but none about how to use it.
The generated client class should help to better interact with the server as I understood (I could be wrong here). I am asking for helps and hints here because the OpenAPI webpage under Community points to stackoverflow under [openapi-generator] tag. Any tutorial, easy documentation that could help me understand the output of the generator?

**Tags:** python, public-databases, pdb, api

---

## 1 answers

### Answer by username_0 on 2021-01-04. Score: 1 | Accepted answer

OK fine, found useful information on READme.md generated by OpenAPI-generator itself

and tried `pdoc` to get html document of my OpenAPI-generator generated client Module

Moreover on stackoverflow [How to generate API Documentation using openapi-generator?](https://stackoverflow.com/questions/59727169/how-to-generate-api-documentation-using-openapi-generator) you can find how OpenApi Generator can do generation of html documentation from your yaml or json definition of your API.

For openAPI json api specification I found [RapiPDF](https://mrin9.github.io/RapiPdf/) too : Web Component to generate PDF from OpenAPI Spec (json yml file).


---

