arichr / gophient

Lightweight Gopher library for Python

Home Page:https://pypi.org/project/gophient/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Gophient

PyPI Maintainability

Python library to browse the Gopherspace

Read documentation

Features:

  • Light
  • Easy to use
  • Comes without dependencies

Getting started

  1. Install Gophient:
pip install gophient
  1. Create a gophient.Gopher instance and make requests (see examples below)

Examples

Get weather from Floodgap

import gophient

client = gophient.Gopher()
weather = client.request('gopher.floodgap.com', 'groundhog/ws')
print(weather)

Search on Veronica

import gophient

client = gophient.Gopher()
results = client.request('gopher.floodgap.com', 'v2/vs', query='plan 9')
print(results)

Download files

import gophient

client = gophient.Gopher()
apk = client.request('gopher.floodgap.com', 'overbite/files/OverbiteAndroid025.apk')
with open('app.apk', 'wb') as apk_file:
  apk_file.write(apk)

About

Lightweight Gopher library for Python

https://pypi.org/project/gophient/

License:MIT License


Languages

Language:Python 100.0%