Name | gemi-python JSON |
Version |
0.1.2
JSON |
| download |
home_page | None |
Summary | Utilities for the Gemini protocol |
upload_time | 2024-04-23 04:09:26 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.9 |
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.9",
"maintainer_email": null,
"keywords": "gemini, gemtext",
"author": null,
"author_email": "Zoey Mae <admin@barkshark.xyz>",
"download_url": "https://files.pythonhosted.org/packages/a8/0c/08fbe40cd48082f279f3d78dd81a16c779713639fce0baf6e4805911e5c6/gemi_python-0.1.2.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.2",
"project_urls": {
"Bug Tracker": "https://git.barkshark.xyz/barkshark/gemi/issues",
"Documentation": "https://git.barkshark.xyz/barkshark/gemi/wiki",
"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": "7ab4abc6101ec38aa76bd8de355aa537a61c285d5f4e6f67341554330f036380",
"md5": "1ac26ba8e788ec074566abe169b5fa87",
"sha256": "28386cdb7687c587dcf325a874c79c428bec5bdc7495e719f013930072337aee"
},
"downloads": -1,
"filename": "gemi_python-0.1.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "1ac26ba8e788ec074566abe169b5fa87",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 29015,
"upload_time": "2024-04-23T04:09:24",
"upload_time_iso_8601": "2024-04-23T04:09:24.518381Z",
"url": "https://files.pythonhosted.org/packages/7a/b4/abc6101ec38aa76bd8de355aa537a61c285d5f4e6f67341554330f036380/gemi_python-0.1.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "a80c08fbe40cd48082f279f3d78dd81a16c779713639fce0baf6e4805911e5c6",
"md5": "1d2c9c8d16df1dda7a69684f70c31c59",
"sha256": "309a0df2cd650b1848238a87be356590b9392246b3cbe338554aee66e2282e20"
},
"downloads": -1,
"filename": "gemi_python-0.1.2.tar.gz",
"has_sig": false,
"md5_digest": "1d2c9c8d16df1dda7a69684f70c31c59",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 25958,
"upload_time": "2024-04-23T04:09:26",
"upload_time_iso_8601": "2024-04-23T04:09:26.066084Z",
"url": "https://files.pythonhosted.org/packages/a8/0c/08fbe40cd48082f279f3d78dd81a16c779713639fce0baf6e4805911e5c6/gemi_python-0.1.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-04-23 04:09:26",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "gemi-python"
}