Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Send some filthy mail.


devel / comp.lang.python / Re: Generating documentation with Sphinx

SubjectAuthor
o Re: Generating documentation with SphinxJason Friedman

1
Re: Generating documentation with Sphinx

<mailman.255.1693251593.23016.python-list@python.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=23927&group=comp.lang.python#23927

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!3.eu.feeder.erje.net!feeder.erje.net!fu-berlin.de!uni-berlin.de!not-for-mail
From: jsf80...@gmail.com (Jason Friedman)
Newsgroups: comp.lang.python
Subject: Re: Generating documentation with Sphinx
Date: Mon, 28 Aug 2023 13:39:40 -0600
Lines: 37
Message-ID: <mailman.255.1693251593.23016.python-list@python.org>
References: <CANy1k1hh+z61DtrYUfZbtsYRdXTZmJ=hLqprfbd-mrEjM=NtNA@mail.gmail.com>
<CANy1k1j9dm+tr29MuyuUR67oTbu3w8wZD=taCjLfJtY1AoSB0A@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
X-Trace: news.uni-berlin.de l771MFwc9C2u/ETXSJB4EwWBlaIx9u47rsfjQ5UKSnCg==
Cancel-Lock: sha1:KVwnaJIrrocnodOnw60ZnrnYmOE= sha256:r//+m8LOQs/jThy4TojnhgBy3kZJmFP1e4VBxabmTSk=
Return-Path: <jsf80238@gmail.com>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=pass
reason="2048-bit key; unprotected key"
header.d=gmail.com header.i=@gmail.com header.b=sRfCule4;
dkim-adsp=pass; dkim-atps=neutral
X-Spam-Status: OK 0.008
X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'generated': 0.03;
'message:': 0.03; 'def': 0.04; '"""': 0.09; 'cc:addr:python-list':
0.09; 'construct': 0.09; 'page:': 0.09; '-&gt;': 0.16; 'endpoint':
0.16; 'received:mail-ej1-x635.google.com': 0.16;
'cc:addr:python.org': 0.20; 'stuff': 0.25; 'cc:2**0': 0.25;
'flask': 0.26; 'else': 0.27; 'function': 0.27; 'example,': 0.28;
'question': 0.32; 'message-id:@mail.gmail.com': 0.32; 'but': 0.32;
'header:In-Reply-To:1': 0.34; 'received:google.com': 0.34;
'subject:skip:d 10': 0.35; 'from:addr:gmail.com': 0.35; 'rest':
0.39; 'something': 0.40; 'in,': 0.60; 'to:none': 0.60; 'gives':
0.62; 'advertising': 0.64; '200': 0.65; '8bit%:7': 0.67; '500':
0.70; 'skip:1 30': 0.82
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20221208; t=1693251591; x=1693856391;
h=cc:subject:message-id:date:from:in-reply-to:references:mime-version
:from:to:cc:subject:date:message-id:reply-to;
bh=VS99wLoZNSuhdJtYHtn8g2y0TTSz3XohCxgwZ675qAA=;
b=sRfCule4taWqfZDsesvVRWWsFT8edObRENG402JVk1+/6aEu91ISZXdQD72WrLYKjS
gUfScVLNGAnloV74cn+3rs+w73WuaplwDBrSBuxn1S81n4pDsL66iVtxyKgBoIu4cdPW
BCOUkhNOe2/WIzAN9AHZxVZSAxUOs8ODWr15Ur/5v2AlN27itWoS5KFwj/ipbUzb5H/K
1pr5HxBC6qIEnPm0dWOKqpKr3FlM3sZVkcn95t+NW5OgRSxmxmaxs8vxoAyvkyCsMu9D
QHZ0+pxPNVFKej7JpMFkuIK6UbMJm8EBYu/Pcba0TIVdbRWw2sWNs5GdA0KUhNMvbatT
YlIA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20221208; t=1693251591; x=1693856391;
h=cc:subject:message-id:date:from:in-reply-to:references:mime-version
:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
bh=VS99wLoZNSuhdJtYHtn8g2y0TTSz3XohCxgwZ675qAA=;
b=bg240cB2hmDKWQfI44kNUXGMPVTdr6J/gYl+1FQuPukJ2QupPG69ZixwJXo4K2thOc
h5JlZwMBTsSsXL2RD0ceQlZnd49a1PmyBYy1QtG+0y3m/A/dY/LFd1LIo+7fxenI8XG5
43WdMLz6888G8yaIkxi6kD5ZkroiC4ah91azKVlsKePl+EnIW8ujLrTwmcu0PxHN4vsh
/8bQ5FbOTNccZK2vSJvrTL5aYgryXOiPs2UKKK66mJd3A4qbCqrrw0c3AMV65XiR5fvV
1GvZu+RsxneEh26BjX/1ph1bgZqlgqGbVvoySvY+tkYgAVud0IuNCBMllXAINyj/SY2d
yEoA==
X-Gm-Message-State: AOJu0YzNEMCb+IkilQ4A1dim+HzCEe+vV7l5J0A6biCxtIN2on2nGJ7I
1lZPn4yqN6GxIEsMRd+bbETnQ8d04ts0lNTr8oYldmPddNs=
X-Google-Smtp-Source: AGHT+IH0Jn9RIQLTCklmFCrrMePwXM0ys6RJRmNnjFOnGawkW0O+GS5AfBa72MTNj2N/5DzBtNk7JkbNYuJ6hGCA7V4=
X-Received: by 2002:a17:906:3088:b0:9a1:ddb9:654f with SMTP id
8-20020a170906308800b009a1ddb9654fmr11858198ejv.55.1693251591461; Mon, 28 Aug
2023 12:39:51 -0700 (PDT)
In-Reply-To: <CANy1k1hh+z61DtrYUfZbtsYRdXTZmJ=hLqprfbd-mrEjM=NtNA@mail.gmail.com>
X-Content-Filtered-By: Mailman/MimeDel 2.1.39
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: General discussion list for the Python programming language
<python-list.python.org>
List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>,
<mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive: <https://mail.python.org/pipermail/python-list/>
List-Post: <mailto:python-list@python.org>
List-Help: <mailto:python-list-request@python.org?subject=help>
List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>,
<mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID: <CANy1k1j9dm+tr29MuyuUR67oTbu3w8wZD=taCjLfJtY1AoSB0A@mail.gmail.com>
X-Mailman-Original-References: <CANy1k1hh+z61DtrYUfZbtsYRdXTZmJ=hLqprfbd-mrEjM=NtNA@mail.gmail.com>
 by: Jason Friedman - Mon, 28 Aug 2023 19:39 UTC

>
> def construct_response(exit_code: int, message: str) -> Response:
> """
> Construct a Flask-suitable response
>
> :param exit_code: 0 or something else
> :param message: something useful
> :return: a Flask-suitable response
> """
>
>
> @app.route(f"/{version}/<page>", methods=[GET, POST])
> def serve(page) -> Response:
> """
> Do some stuff and return 200 or 500
>
> :param page: this is a REST endpoint we are advertising to callers
> :return: a Flask Response generated by construct_response
> """
>
>
> Question 1: how do I embed in the serve function docstring a link to the
> construct_response function?
>
>
> Question 2: how do I embed in, for example, lib/stuff3.py, a link to the
> construct_response function?
>
>
> I tried:
> :ref:`my_project/api/stuff1:construct_response`
>
> but that gives an undefined label warning.
>

I can answer my own Question 1:
:func:`construct_response`

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor