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.
Arisu W a7a20222a6
Update README.md
11 months ago
.github/workflows Remove pytest dublicate 11 months ago
gophient Fix flake8 and pytest errors 11 months ago
tests Add download file test 11 months ago
.gitignore Update .gitignore 11 months ago
LICENSE Initial commit 11 months ago
README.md Update README.md 11 months ago
conftest.py Fix flake8 and pytest errors 11 months ago
setup.py Gophient 0.3 11 months ago

README.md

Gophient

Downloads counter Stars counter Latest release version License

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.