Name | gemi-python JSON |
Version |
0.1.4
JSON |
| download |
home_page | None |
Summary | Utilities for the Gemini protocol |
upload_time | 2024-08-07 16:14:35 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.10 |
license | CNPL 7+ |
keywords |
gemini
gemtext
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Gemi
Utilities for the Gemini protocol
## Client Example
import asyncio
import gemi
async def main():
client = gemi.AsyncClient()
response = await client.request("geminiprotocol.net")
for element in (await response.document()):
print(repr(element))
asyncio.run(main())
## Server Example
import gemi
@gemi.route("Default", "/")
async def home(request: gemi.Request) -> gemi.Response:
return gemi.Response(20, "UvU", "text/plain")
server = gemi.AsyncServer("Default")
server.run()
## Document Example
import gemi
doc = gemi.Document([
gemi.Header("Hewwo!", 1),
gemi.Text(""),
gemi.Text("im gay"),
gemi.Text(""),
gemi.Link("https://git.barkshark.xyz/barkshark/gemi", "Gemi")
])
doc.dump("/var/lib/gemi-server/static/text.gmi", gemi.OutputFormat.GEMTEXT)
[Documentation](https://docs.barkshark.xyz/gemi)
[Gemini Protocol](https://geminiprotocol.net/)
Raw data
{
"_id": null,
"home_page": null,
"name": "gemi-python",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "gemini, gemtext",
"author": null,
"author_email": "Zoey Mae <admin@barkshark.xyz>",
"download_url": "https://files.pythonhosted.org/packages/58/0c/68ae72b65b8d59ec9c43e97591648ee423d4f6be6a8aedee0629f1d9ebc6/gemi_python-0.1.4.tar.gz",
"platform": "any",
"description": "# Gemi\n\nUtilities for the Gemini protocol\n\n## Client Example\n\n\timport asyncio\n\timport gemi\n\n\tasync def main():\n\t\tclient = gemi.AsyncClient()\n\t\tresponse = await client.request(\"geminiprotocol.net\")\n\n\t\tfor element in (await response.document()):\n\t\t\tprint(repr(element))\n\n\tasyncio.run(main())\n\n## Server Example\n\n\timport gemi\n\n\t@gemi.route(\"Default\", \"/\")\n\tasync def home(request: gemi.Request) -> gemi.Response:\n\t\treturn gemi.Response(20, \"UvU\", \"text/plain\")\n\n\tserver = gemi.AsyncServer(\"Default\")\n\tserver.run()\n\n## Document Example\n\n\timport gemi\n\n\tdoc = gemi.Document([\n\t\tgemi.Header(\"Hewwo!\", 1),\n\t\tgemi.Text(\"\"),\n\t\tgemi.Text(\"im gay\"),\n\t\tgemi.Text(\"\"),\n\t\tgemi.Link(\"https://git.barkshark.xyz/barkshark/gemi\", \"Gemi\")\n\t])\n\n\tdoc.dump(\"/var/lib/gemi-server/static/text.gmi\", gemi.OutputFormat.GEMTEXT)\n\n[Documentation](https://docs.barkshark.xyz/gemi)\n\n[Gemini Protocol](https://geminiprotocol.net/)\n",
"bugtrack_url": null,
"license": "CNPL 7+",
"summary": "Utilities for the Gemini protocol",
"version": "0.1.4",
"project_urls": {
"Bug Tracker": "https://git.barkshark.xyz/barkshark/gemi/issues",
"Documentation": "https://docs.barkshark.xyz/gemi",
"Homepage": "https://git.barkshark.xyz/barkshark/gemi",
"Source Code": "https://git.barkshark.xyz/barkshark/gemi"
},
"split_keywords": [
"gemini",
" gemtext"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "15855dd8964db76dabb4049ebdb5e7f00091e4bf12b6e9dfd2baa762f7bc6bde",
"md5": "9e0a1597f6e74793c2c1ab5cd54f2758",
"sha256": "a2d200404e841641972838bf583f389abc336729e95f54a9f6700475c82103f1"
},
"downloads": -1,
"filename": "gemi_python-0.1.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "9e0a1597f6e74793c2c1ab5cd54f2758",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 30334,
"upload_time": "2024-08-07T16:14:34",
"upload_time_iso_8601": "2024-08-07T16:14:34.278031Z",
"url": "https://files.pythonhosted.org/packages/15/85/5dd8964db76dabb4049ebdb5e7f00091e4bf12b6e9dfd2baa762f7bc6bde/gemi_python-0.1.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "580c68ae72b65b8d59ec9c43e97591648ee423d4f6be6a8aedee0629f1d9ebc6",
"md5": "becc90d45add7896a601303437c6099e",
"sha256": "e98d69aadca4fc77529bf3ecddbf2abbfa67c89f18f9451e2f20879d345d6683"
},
"downloads": -1,
"filename": "gemi_python-0.1.4.tar.gz",
"has_sig": false,
"md5_digest": "becc90d45add7896a601303437c6099e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 26969,
"upload_time": "2024-08-07T16:14:35",
"upload_time_iso_8601": "2024-08-07T16:14:35.685552Z",
"url": "https://files.pythonhosted.org/packages/58/0c/68ae72b65b8d59ec9c43e97591648ee423d4f6be6a8aedee0629f1d9ebc6/gemi_python-0.1.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-08-07 16:14:35",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "gemi-python"
}