Skip to main content

Restypy

Pythonic REST client

The code interacting with the remote API reads just like standard Python!

Restypy uses the awesome ‘requests’ library under the hood

NOTE

Since REST APIs may contain URLs that may be invalid method names in Python, you will have to use the path=’1nvalidpath’ workaround to build the path. This approach is shown in the following example.

Examples

from restypy import API github = API(’https://api.github.com’) # GET : https://api.github.com/users/simula67/events response = github.users(path=’simula67’).events() # Response is a simple ‘requests’ response print response.json() # For HTTP methods other than GET, add a keyword argument ‘method’. Rest of the arguments are passed to ‘requests’ httpbin = API(’http://httpbin.org’) print httpbin.post(method=’post’, data={‘test’: ‘hi’}).text

Download files

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

Source Distribution

restypy-0.5.tar.gz (1.8 kB view details)

Uploaded Source

File details

Details for the file restypy-0.5.tar.gz.

File metadata

  • Download URL: restypy-0.5.tar.gz
  • Upload date:
  • Size: 1.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for restypy-0.5.tar.gz
Algorithm Hash digest
SHA256 46f78494e05aca80f8279d6722aea480ee2792d39476c9e9a98a27de56fe7695
MD5 015834def70e241d7225884e81384241
BLAKE2b-256 652685794128d04773d5b625531112c74670ef63eb41609467ae05ae1013bc2f

See more details on using hashes here.

Release history Release notifications | RSS feed

0.7

1 file

0.6

1 file

This release

0.5 This release

1 file

0.4

1 file

0.3

1 file

0.2

1 file

0.1

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page