All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Ability to specify
proxies
for aService
definition so all calls to the service use the defined proxies - Ability to specify
auth
for aService
definition so all calls to the service use the defined authentication - Ability to specify
return_raw_response_object
at the endpoint level, overridden by any value specified at call time
- Support for Python 3.4 and 3.5 has been removed based on official Python support timelines and usage statistics
- Ability to pass dict to
files
keyword argument for file-like-objects for multipart encoding upload
- Ability to run linting and build docs using
tox
- Ability to access raw response object when making a call using
return_raw_response_object=True
. Useful for accessing things like response cookies or headers.
- Moved implementation to
src/
directory for improved end-to-end testing with packaging.
- An
endpoints
attribute onService
classes returns a list of that service's configured endpoints Endpoint
classes now have a useful__repr__
implementation, e.g."JsonEndpoint(path='/foo')"
.
StubEndpoint
now inherits fromEndpoint
and as a result does not accept arbitrary keyword arguments- Use
setup.cfg
for most project metadata and tool configuration, aside fromblack
.
- More testing for the bug fixed in v2.6.1
- Extract
ServiceCaller
behaviors to module level and remove class - Remove
path_kwargs
argument from thecall
function (previously aServiceCaller
method)
- Backwards compatibility to allow
ServiceCaller.call()
to use endpoints that live in an instantiatedService
- Ability to pass optional parameter
allow_redirects
to enable/disable HTTP redirection when calling an endpoint
- Move to the descriptor protocol from metaclassing under the hood for turning an endpoint into a callable
- Ability to pass dict to
json
keyword argument for raw POST body instead of form-encoded data - Ability to use regular keyword arguments when calling an endpoint (instead of
path_kwargs
)
DiscoverableService
now inherits fromServiceBase
, an ancestor common withService
, instead ofService
itself
- Simplify imports so that all commonly-used classes can be imported with
from apiron import <class>
- Error in calling a dynamic stub endpoint
pytest.ini
forpytest
configuration- Syntax sugar for calling endpoints
- Update tests to use
pytest
-styleassert
s and fixtures (unittest.mock
usage is still in place, for now) - Make
--cov=apiron
the default when runningpytest
- Make test output terse by default (
-v
when running restores previous behavior;-vv
gives explicit test list) - An endpoint's
stub_response
can optionally be a callable, for returning dynamic values in response to parameters
- End PyPI server URL with a slash to avoid a redirect, allowing deployment of build artifacts during release
- Automated release artifact deployment via Travis CI's
providers
feature
- The
endpoint
module has been split up into a module for each endpoint type, still importable as before
- Added the missing
wheel
dependency todev-requirements.txt
for creating a wheel distribution during release
- Added ability to create a
StubEndpoint
for stubs
- The
check_for_trailing_slash
argument and default behavior has been removed
- Service domains and endpoint paths were previously joined per IETF RCF 1808, which has surprising edge cases. These are now always joined by appending the endpoint path; the previous behavior can be achieved with multiple services or endpoints as needed.
- Exposed ability to explicitly set the response encoding
- Expose pass-through
auth
argument torequests
- Moved all tests to a top-level
tests
package and switched to using thepytest
runner - Added missing parameter in docstring for
apiron.client.ServiceCaller.call
- Removed unused imports from
apiron.client
- Initial open source release of this package!
- Documentation on use and development of this package
- Code of conduct, contribution guide, and issue templates for contributors