This page permanently redirects to gemini://gemini.bortzmeyer.org/software/agunua/.

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

Proxy Information
Original URL
gemini://gemini.bortzmeyer.org/software/agunua
Status Code
Success (20)
Meta
text/gemini; lang=en
Capsule Response Time
331.195037 milliseconds
Gemini-to-HTML Time
2.099969 milliseconds

This content has been proxied by September (ba2dc).