CurryProxy
A fast and performant proxy and aggregator for querying multiple instances of an API spread across globally distributed data centers.
Capabilities
CurryProxy can handle multiple routes for use against different revisions of an API or for use against completely unrelated APIs. See etc/routes.sample.yaml for an example configuration.
Simple request forwarding (useful for preserving backwards compatability with pre-CurryProxy versions of an API hosted in a single datacenter)
Example: GET https://api.example.com/v1.0/foo/bar forwarded to GET https://1.api.example.com/v1.0/foo/bar
Advanced request forwarding to multiple endpoints
Example: GET https://api.example.com/1,2/v1.0/foo/bar forwarded to the following:
GET https://1.api.example.com/v1.0/foo/bar
GET https://2.api.example.com/v1.0/foo/bar
Requests are made in parallel
JSON responses received from multiple endpoints are aggregated and returned to the client
Example: {"foo": 1} received from 1 and {"bar": 2} received from 2 are aggregated to [{"foo": 1}, {"bar": 2}] and returned to the client
Rich, meaningful errors logged and returned to the client when a proxied request fails
Installation
pip install curryproxy will do what you expect.
There are a couple of extra options:
pip install curryproxy[tests]. This will install any packages required to run the tests.
pip install curryproxy[frozen]. This will install curryproxy with explicitly pinned dependencies, as generated by pip freeze. This is intended as a convenience for those who want the package to provide a reproducible environment. The versions used will be the latest working ones at the time the given Curry version was released.
You will need to provide configuration files before starting Curry.
NOTE: The configuration files have changed in v2.x. routes.json and logging.conf have become routes.yaml and logging.yaml respectively. See the sample files for examples.
Limitations
Merging responses from multiple endpoints together occurs only under certain conditions outlined on the Multiple Endpoints Aggregation wiki page.
Testing
Tests are set up to run with tox.
The default tox setup creates environments for each known-usable version of each of our dependencies, and runs the tests in each of them. That amounts to around a dozen environments at the moment, so you’ll probably want to run them in parallel with tox -p auto.
If you don’t want to be that thorough (perhaps you’re smoke testing a work in progress), you can run against only the most recent supported versions of dependencies with tox -e py36.
You can test against specific dependency versions like this:
tox -e py36-requests2.{2,3,4,5,6,7} -p auto
tox -e py36-webob1.{2,3,4,5} -p auto
tox -e py36-grequests0.{2,3} -p auto
tox -e py36-requests.latest
tox -e lint is also available, and will run various linting checks.
Roadmap
OData support for server-side ordering and paging
Response caching for a specified time
Metadata
Release files for curryproxy 2.1.1
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 |
|---|---|---|---|---|
| curryproxy-2.1.1.tar.gz | 38.3 kB | Without provenance | Details for curryproxy-2.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| curryproxy-2.1.1-py3-none-any.whl | Python 3 | none | any | Details for curryproxy-2.1.1-py3-none-any.whl |
Total release size: 67.1 kB
Release files / curryproxy-2.1.1.tar.gz
| Download URL | curryproxy-2.1.1.tar.gz |
|---|---|
| Size | 38.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f9b18607f5496dc004f80d5b4a1a538ed81202029d63a489c5b07c6926d65ef2
|
|
BLAKE2b-256 checksum How to use checksums |
3e0404568f6ba991023c919302b95afdaaa2729c04a822486b3c8c87c0ed9438
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.10
|
Release files / curryproxy-2.1.1-py3-none-any.whl
| Download URL | curryproxy-2.1.1-py3-none-any.whl |
|---|---|
| Size | 28.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f4d8e6a560b7c601c19c3de4d36bab6143962e39921487e0cee2cd45b3e60ff0
|
|
BLAKE2b-256 checksum How to use checksums |
0d59d76c3d0b68a1a3754aa46054c9adc689068d4de3b82eb062001735919488
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.10
|
Security for curryproxy 2.1.1
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.