Skip to main content

Simple generic REST API client.

Project description

PyHole provides an easy to use generic REST API client. It has object oriented style of calling and supports GET and POST connection methods. Connections are based on urllib and supports all protocols supported by urllib.

With PyHole you can create a call to any legacy REST API just in seconds!

Quickstart

A simple example will illustrate the powerful idea of PyHole calls:

>>> from pyhole import PyHole
>>> proxy = PyHole('http://domain.ltd/rest_api')
>>> proxy.category[123]('get_items', item_id=34)
http://domain.ltd/rest_api/category/123/get_items?item_id=34
>>> proxy.category[123]('get_item', item_id=34).get()
#this will actually make HTTP GET Request on the given URL and prints the response.

Lazy evaluation of a proxy object ensures that a real HTTP connection is not made until get() or post() method is called.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

PyHole-1.1.tar.gz (3.7 kB view details)

Uploaded Source

File details

Details for the file PyHole-1.1.tar.gz.

File metadata

  • Download URL: PyHole-1.1.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for PyHole-1.1.tar.gz
Algorithm Hash digest
SHA256 bc46ae7defd468175963ecffcfdc77a013d6e04973c06806f11d2db9123f170a
MD5 53a960f626c9155ea6a990986960e73a
BLAKE2b-256 0040d40b73809296cca7e3f469fdc8f607bf9f8d69a8d6613c41080feec5d99b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page