💾 Archived View for gemini.bortzmeyer.org › software › agunua captured on 2023-03-20 at 17:52:57. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2021-11-30)

-=-=-=-=-=-=-

Agunua

Agunua is a Python library for the development of Gemini clients.

Installation

You need Python 3, PySocks, PyOpenSSL and netaddr. You can install the dependencies with pip `pip3 install agunua`.

PyOpenSSL

PySocks

netaddr

Usage

u = agunua.GeminiUri(url)
print(u)

Parameters in the `GeminiUri()` constructor (you can find their

default values at the beginning of the file `Agunua/__init__.py`):

If the URL is invalid (wrong syntax), you won't get a `GeminiUri` object. If you get one, it does not mean the resource has been retrieved successfully. See the attribute `network_success` for that, and then the attribute `status_code` (that you have to interpret yourself, in most cases).

Attributes of `GeminiUri` objects (not all of them will always be present; for instance, if you did not ask to get content, you won't have an attribute `size`; if the status code is not 20 - OK - you won't get a mediatype; etc):

BCP 47 (RFC on codes for languages)

See `sample-client.py`. (In the source code, the test suite under `tests/` is also a good way to learn about how to use the library.) Agunua is used in the Manisha monitoring tool and in the Lupa crawler.

Manisha

Lupa

Command-line client

`agunua` is a simple Gemini command-line client, a bit like curl. Most parameters of the library `GeminiUri()` constructor can be set via options. Important: the default value is not always the same with the command-line tool. For instance, it defaults to actually retrieving the content.

Details on the command-line client

Download an entire capsule

Another command-line client, `geminitrack`, allows you to retrieve an entire capsule, for instance for backups.

Details on geminitrack

Name

Agunua is a melanesian serpent god. Caduceus would have been better for a Python + Gemini project since there are two snakes on a caduceus but it was already used.

License

GPL. See LICENSE.

Authors

Stéphane Bortzmeyer <stephane+framagit@bortzmeyer.org>.

Reference site

Gitlab site on the Web.

Use the Gitlab issue tracker to report bugs or wishes.

Reference site on Gemini

Other Gemini clients in Python

Ignition

Gemini-demo

Gusmobile

Picross

PyGemini

gcat