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.0.tar.gz
(2.3 kB
view hashes)
Built Distribution
Close
Hashes for spartan_py-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fe360914396cb471a15e1749bd11d52be3b4ba4b7a4ec2e26fe86623516df0fd |
|
MD5 | 31760af7a60b97a9619610c570ba8fa9 |
|
BLAKE2b-256 | d613205048a8180f6c090d0157b0ec77a7e1c56ec36ed598f65a8e9724c48772 |