Gopher library for Python
https://github.com/arichr/gophient
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
![]() |
11 months ago | |
---|---|---|
.github/workflows | 11 months ago | |
gophient | 11 months ago | |
tests | 11 months ago | |
.gitignore | 11 months ago | |
LICENSE | 11 months ago | |
README.md | 11 months ago | |
conftest.py | 11 months ago | |
setup.py | 11 months ago |
README.md
Gophient
Gophient is a library, that adds Gopher support for Python. You can browse the Gopherspace, follow links, download content by writing less code for your application.
Dependencies
None! All library, that were used, are already a part of Python.
Examples
Get weather from Floodgap Gopher
import gophient
client = gophient.Gopher()
weather = client.request('groundhog/ws', 'gopher.floodgap.com')
print(weather)
Search by using Veronica
import gophient
client = gophient.Gopher()
results = client.request('v2/vs', 'gopher.floodgap.com',
inputs={'q': 'plan 9'})
print(results)
Download files from Gopher
import gophient
client = gophient.Gopher()
apk = client.request('overbite/files/OverbiteAndroid025.apk', 'gopher.floodgap.com')
with open('app.apk', 'wb') as apk_file:
apk_file.write(apk)
License
Licensed by MIT.