Skip to content

Commit

Permalink
Deploying to gh-pages from @ 733a7e0 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
plietar committed Nov 6, 2024
1 parent 5f63816 commit 0de240f
Show file tree
Hide file tree
Showing 20 changed files with 1,031 additions and 28 deletions.
Binary file modified .doctrees/autoapi/pyorderly/outpack/index.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified .doctrees/autoapi/pyorderly/outpack/util/index.doctree
Binary file not shown.
Binary file modified .doctrees/environment.pickle
Binary file not shown.
2 changes: 2 additions & 0 deletions _sources/autoapi/pyorderly/outpack/index.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ Submodules
/autoapi/pyorderly/outpack/init/index
/autoapi/pyorderly/outpack/location/index
/autoapi/pyorderly/outpack/location_driver/index
/autoapi/pyorderly/outpack/location_http/index
/autoapi/pyorderly/outpack/location_packit/index
/autoapi/pyorderly/outpack/location_path/index
/autoapi/pyorderly/outpack/location_pull/index
/autoapi/pyorderly/outpack/location_ssh/index
Expand Down
130 changes: 130 additions & 0 deletions _sources/autoapi/pyorderly/outpack/location_http/index.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
pyorderly.outpack.location_http
===============================

.. py:module:: pyorderly.outpack.location_http
Classes
-------

.. autoapisummary::

pyorderly.outpack.location_http.OutpackHTTPClient
pyorderly.outpack.location_http.OutpackLocationHTTP


Functions
---------

.. autoapisummary::

pyorderly.outpack.location_http.raise_http_error


Module Contents
---------------

.. py:function:: raise_http_error(response: requests.Response)
.. py:class:: OutpackHTTPClient(url: str, authentication=None)
Bases: :py:obj:`requests.Session`


A Requests session.

Provides cookie persistence, connection-pooling, and configuration.

Basic Usage::

>>> import requests
>>> s = requests.Session()
>>> s.get('https://httpbin.org/get')
<Response [200]>

Or as a context manager::

>>> with requests.Session() as s:
... s.get('https://httpbin.org/get')
<Response [200]>


.. py:method:: request(method, path, *args, **kwargs)
Constructs a :class:`Request <Request>`, prepares it and sends it.
Returns :class:`Response <Response>` object.

:param method: method for the new :class:`Request` object.
:param url: URL for the new :class:`Request` object.
:param params: (optional) Dictionary or bytes to be sent in the query
string for the :class:`Request`.
:param data: (optional) Dictionary, list of tuples, bytes, or file-like
object to send in the body of the :class:`Request`.
:param json: (optional) json to send in the body of the
:class:`Request`.
:param headers: (optional) Dictionary of HTTP Headers to send with the
:class:`Request`.
:param cookies: (optional) Dict or CookieJar object to send with the
:class:`Request`.
:param files: (optional) Dictionary of ``'filename': file-like-objects``
for multipart encoding upload.
:param auth: (optional) Auth tuple or callable to enable
Basic/Digest/Custom HTTP Auth.
:param timeout: (optional) How long to wait for the server to send
data before giving up, as a float, or a :ref:`(connect timeout,
read timeout) <timeouts>` tuple.
:type timeout: float or tuple
:param allow_redirects: (optional) Set to True by default.
:type allow_redirects: bool
:param proxies: (optional) Dictionary mapping protocol or protocol and
hostname to the URL of the proxy.
:param hooks: (optional) Dictionary mapping hook name to one event or
list of events, event must be callable.
:param stream: (optional) whether to immediately download the response
content. Defaults to ``False``.
:param verify: (optional) Either a boolean, in which case it controls whether we verify
the server's TLS certificate, or a string, in which case it must be a path
to a CA bundle to use. Defaults to ``True``. When set to
``False``, requests will accept any TLS certificate presented by
the server, and will ignore hostname mismatches and/or expired
certificates, which will make your application vulnerable to
man-in-the-middle (MitM) attacks. Setting verify to ``False``
may be useful during local development or testing.
:param cert: (optional) if String, path to ssl client cert file (.pem).
If Tuple, ('cert', 'key') pair.
:rtype: requests.Response



.. py:class:: OutpackLocationHTTP(url: str, authentication=None)
Bases: :py:obj:`pyorderly.outpack.location_driver.LocationDriver`


A location implementation.

The driver object is treated as a context manager and is entered and exited
before and after its methods are called.


.. py:method:: __enter__()
Return `self` upon entering the runtime context.



.. py:method:: __exit__(*args)
Raise any exception triggered within the runtime context.



.. py:method:: list() -> Dict[str, pyorderly.outpack.metadata.PacketLocation]
.. py:method:: metadata(ids: List[str]) -> Dict[str, str]
.. py:method:: fetch_file(packet: pyorderly.outpack.metadata.MetadataCore, file: pyorderly.outpack.metadata.PacketFile, dest: str)
173 changes: 173 additions & 0 deletions _sources/autoapi/pyorderly/outpack/location_packit/index.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,173 @@
pyorderly.outpack.location_packit
=================================

.. py:module:: pyorderly.outpack.location_packit
Attributes
----------

.. autoapisummary::

pyorderly.outpack.location_packit.GITHUB_CLIENT_ID
pyorderly.outpack.location_packit.GITHUB_DEVICE_CODE_URL
pyorderly.outpack.location_packit.GITHUB_ACCESS_TOKEN_URL


Classes
-------

.. autoapisummary::

pyorderly.outpack.location_packit.DeviceAuthorizationResponse
pyorderly.outpack.location_packit.AccessTokenResponse
pyorderly.outpack.location_packit.ErrorResponse
pyorderly.outpack.location_packit.OAuthDeviceClient


Functions
---------

.. autoapisummary::

pyorderly.outpack.location_packit.packit_authorisation
pyorderly.outpack.location_packit.outpack_location_packit


Module Contents
---------------

.. py:data:: GITHUB_CLIENT_ID
:value: 'Ov23liUrbkR0qUtAO1zu'


.. py:data:: GITHUB_DEVICE_CODE_URL
:value: 'https://github.com/login/device/code'


.. py:data:: GITHUB_ACCESS_TOKEN_URL
:value: 'https://github.com/login/oauth/access_token'


.. py:class:: DeviceAuthorizationResponse
Bases: :py:obj:`dataclasses_json.DataClassJsonMixin`


DataClassJsonMixin is an ABC that functions as a Mixin.

As with other ABCs, it should not be instantiated directly.


.. py:attribute:: device_code
:type: str


.. py:attribute:: user_code
:type: str


.. py:attribute:: verification_uri
:type: str


.. py:attribute:: expires_in
:type: int


.. py:attribute:: interval
:type: Optional[int]
:value: None



.. py:class:: AccessTokenResponse
Bases: :py:obj:`dataclasses_json.DataClassJsonMixin`


DataClassJsonMixin is an ABC that functions as a Mixin.

As with other ABCs, it should not be instantiated directly.


.. py:attribute:: access_token
:type: str


.. py:attribute:: token_type
:type: str


.. py:attribute:: expires_in
:type: Optional[int]
:value: None



.. py:class:: ErrorResponse
Bases: :py:obj:`dataclasses_json.DataClassJsonMixin`


DataClassJsonMixin is an ABC that functions as a Mixin.

As with other ABCs, it should not be instantiated directly.


.. py:attribute:: error
:type: str


.. py:attribute:: error_description
:type: Optional[str]
:value: None



.. py:class:: OAuthDeviceClient(client_id: str, device_code_url: str, access_token_url: str)
.. py:method:: __enter__()
.. py:method:: __exit__(*args)
.. py:method:: authenticate(scope: str) -> AccessTokenResponse
.. py:method:: start_device_authorization(scope: str) -> DeviceAuthorizationResponse
Initiate the device authorization flow.

This function returns a user code and verification URI which should be
presented to the user. Additionally, it returns a device code which may
be used to poll the access token endpoint until the authentication flow
is complete.

https://datatracker.ietf.org/doc/html/rfc8628#section-3.1
https://datatracker.ietf.org/doc/html/rfc8628#section-3.2



.. py:method:: fetch_access_token(parameters: DeviceAuthorizationResponse) -> Union[AccessTokenResponse, ErrorResponse]
Fetch an access token from the authentication server.

If authentication succeeds, an AccessTokenResponse is returned.
Otherwise an ErrorResponse is returned. Depending on the error's code,
the caller may call this function again (after a delay) to poll for new
tokens.

https://datatracker.ietf.org/doc/html/rfc8628#section-3.4
https://datatracker.ietf.org/doc/html/rfc8628#section-3.5



.. py:method:: poll_access_token(parameters: DeviceAuthorizationResponse) -> AccessTokenResponse
.. py:function:: packit_authorisation(url: str, token: Optional[str]) -> Dict[str, str]
.. py:function:: outpack_location_packit(url: str, token: Optional[str] = None) -> pyorderly.outpack.location_http.OutpackLocationHTTP
3 changes: 0 additions & 3 deletions _sources/autoapi/pyorderly/outpack/util/index.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ Functions
pyorderly.outpack.util.partition
pyorderly.outpack.util.openable_temporary_file
pyorderly.outpack.util.as_posix_path
pyorderly.outpack.util.removeprefix


Module Contents
Expand Down Expand Up @@ -84,5 +83,3 @@ Module Contents
produced packets are portable across platforms.


.. py:function:: removeprefix(s: str, prefix: str) -> str
2 changes: 2 additions & 0 deletions autoapi/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ <h1>API Reference<a class="headerlink" href="#api-reference" title="Link to this
<li class="toctree-l3"><a class="reference internal" href="pyorderly/outpack/init/index.html">pyorderly.outpack.init</a></li>
<li class="toctree-l3"><a class="reference internal" href="pyorderly/outpack/location/index.html">pyorderly.outpack.location</a></li>
<li class="toctree-l3"><a class="reference internal" href="pyorderly/outpack/location_driver/index.html">pyorderly.outpack.location_driver</a></li>
<li class="toctree-l3"><a class="reference internal" href="pyorderly/outpack/location_http/index.html">pyorderly.outpack.location_http</a></li>
<li class="toctree-l3"><a class="reference internal" href="pyorderly/outpack/location_packit/index.html">pyorderly.outpack.location_packit</a></li>
<li class="toctree-l3"><a class="reference internal" href="pyorderly/outpack/location_path/index.html">pyorderly.outpack.location_path</a></li>
<li class="toctree-l3"><a class="reference internal" href="pyorderly/outpack/location_pull/index.html">pyorderly.outpack.location_pull</a></li>
<li class="toctree-l3"><a class="reference internal" href="pyorderly/outpack/location_ssh/index.html">pyorderly.outpack.location_ssh</a></li>
Expand Down
2 changes: 2 additions & 0 deletions autoapi/pyorderly/outpack/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ <h2>Submodules<a class="headerlink" href="#submodules" title="Link to this headi
<li class="toctree-l1"><a class="reference internal" href="init/index.html">pyorderly.outpack.init</a></li>
<li class="toctree-l1"><a class="reference internal" href="location/index.html">pyorderly.outpack.location</a></li>
<li class="toctree-l1"><a class="reference internal" href="location_driver/index.html">pyorderly.outpack.location_driver</a></li>
<li class="toctree-l1"><a class="reference internal" href="location_http/index.html">pyorderly.outpack.location_http</a></li>
<li class="toctree-l1"><a class="reference internal" href="location_packit/index.html">pyorderly.outpack.location_packit</a></li>
<li class="toctree-l1"><a class="reference internal" href="location_path/index.html">pyorderly.outpack.location_path</a></li>
<li class="toctree-l1"><a class="reference internal" href="location_pull/index.html">pyorderly.outpack.location_pull</a></li>
<li class="toctree-l1"><a class="reference internal" href="location_ssh/index.html">pyorderly.outpack.location_ssh</a></li>
Expand Down
4 changes: 2 additions & 2 deletions autoapi/pyorderly/outpack/location_driver/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<script src="../../../../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../../../../genindex.html" />
<link rel="search" title="Search" href="../../../../search.html" />
<link rel="next" title="pyorderly.outpack.location_path" href="../location_path/index.html" />
<link rel="next" title="pyorderly.outpack.location_http" href="../location_http/index.html" />
<link rel="prev" title="pyorderly.outpack.location" href="../location/index.html" />
</head>

Expand Down Expand Up @@ -143,7 +143,7 @@ <h2>Module Contents<a class="headerlink" href="#module-contents" title="Link to
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="../location/index.html" class="btn btn-neutral float-left" title="pyorderly.outpack.location" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="../location_path/index.html" class="btn btn-neutral float-right" title="pyorderly.outpack.location_path" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
<a href="../location_http/index.html" class="btn btn-neutral float-right" title="pyorderly.outpack.location_http" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
</div>

<hr/>
Expand Down
Loading

0 comments on commit 0de240f

Please sign in to comment.