Library for spartan protocol
Project description
spartan-py
Basic spartan protocol implementation as a python library.
import spartan
res = spartan.get("spartan://mozz.us/echo", "hi")
while True:
buf = res.read()
if not buf:
break
sys.stdout.buffer.write(buf)
res.close()
Try it in the REPL:
>>> import spartan
>>> req = spartan.Request("spartan.mozz.us")
>>> req
>>> <Request spartan.mozz.us:300 / 0>
>>> res = req.send()
>>> res
>>> 2 text/gemini
>>> res.read()
>>> [...]
>>> res.close()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
spartan-py-0.2.1.tar.gz
(2.3 kB
view hashes)
Built Distribution
Close
Hashes for spartan_py-0.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2f9123b1b9dbd9db922c6d965584586b1ca2de7cdd034993454ca7cc23527cec |
|
MD5 | e2d10f5013551aa2350cc1a70b01c163 |
|
BLAKE2b-256 | 9aa12d6b1dd7176c3a2d95c32332af357e9be03a23d556439861a5b2dc7eb81e |