Universal Client
Python 2 and Python 3 Compatible
Universal Client is an Apache 2 licensed client for quickly and easily interacting with any REST api.
You want to use a cool api, but the python client doesn’t exist, or is out of date, or doesn’t support the feature you want to use. So you start making raw HTTP requests. But, even with the best http library, passing in the right URL and options for every call is error prone and quickly becomes cumbersome for anything more than trivial scenarios.
The Universal Client is a wrapper around the excellent Requests HTTP library. A Client instance corresponds to a single endpoint in the api. Use dot notation to navigate the api paths. You can set any Requests parameters on a client instance and all child instances will inherit those parameters.
Installation:
pip install universalclient
A quick example:
>>> from universalclient import Client
# create a client pointing to google
>>> google = Client("http://google.com")
# set a google cookie so we get "personalized" results (Yay!)
>>> google = google.setArgs(cookies={"gv": "5d41402abc4b2a76b9719d911017c592"})
# get the google home page at http://google.com
>>> resp = google.get()
# create an end point to google images, which inherits the cookies
>>> images = google.images
# get google site at http://google.com/images
>>> resp = images.get()
The Client stores a complete api call. It is immutable - any modification returns a new client. This allows you to reuse endpoints over and over.
- Universal Client features:
oauth support through rauth
string formatting for URLs
supports every argument supported by Requests
custom data formatting for POST requests
Metadata
Release files for UniversalClient 0.6.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| UniversalClient-0.6.4.tar.gz | 7.0 kB | Without provenance | Details for UniversalClient-0.6.4.tar.gz |
Release files / UniversalClient-0.6.4.tar.gz
| Download URL | UniversalClient-0.6.4.tar.gz |
|---|---|
| Size | 7.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fdcaa58fc215c3a4ddde496e06b3ef1d594146aecb159a397c7317b3e6cf65cd
|
|
BLAKE2b-256 checksum How to use checksums |
3fff146c1b876aebf0f227871784d6e42fe5e79ce7f2ea16d7835d41fab76cef
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for UniversalClient 0.6.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.