You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2019/12/22 21:37:14 UTC

[GitHub] [airflow] mik-laj commented on a change in pull request #6863: [AIRFLOW-XXX] add docs showing usage of `Connection.get_uri`

mik-laj commented on a change in pull request #6863: [AIRFLOW-XXX] add docs showing usage of `Connection.get_uri`
URL: https://github.com/apache/airflow/pull/6863#discussion_r360730191
 
 

 ##########
 File path: docs/howto/connection/index.rst
 ##########
 @@ -81,6 +81,38 @@ in the scheme part of URI, so it must be changed to a hyphen character
 (e.g. ``google-compute-platform`` if ``conn_type`` is ``google_compute_platform``).
 Query parameters are parsed to one-dimensional dict and then used to fill extra.
 
+Generating a connection URI
+^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Building the URI for a connection can be tricky.  To make it easier, the
+:py:class:`~airflow.models.connection.Connection` class has a convenience method
+:py:meth:`~airflow.models.connection.Connection.get_uri`.  It can be used like so:
+
+.. code-block:: python
 
 Review comment:
   ```suggestion
   .. code-block:: pycon
   ```
   Reference: https://pygments.org/docs/lexers/#pygments.lexers.python.PythonConsoleLexer

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services