- Added new
RawResponseClass
which returns rawaiohttp.ClientResponse
instance with no modification and parsing
-
All types moved from
client
to separatetypes
module -
Removed unused
error_response_class
fromClient
constructur parameters
- Added custom
url_compatible_encoder
for params, cookies and headers because Aiohttp expects their values to beint
,float
orstr
instances
-
model_to_dict
now accepts allpydantic.BaseModel.dict
parameters -
utils
module added to package export -
encoders
module added to package export -
All absolute package path exports replaced with relative
- Upgraded dependencies
- Using custom json requests serializer for better pydantic model serialization
Code of such json encoder was taken from https://github.com/tiangolo/fastapi. Thanks to @tiangolo for implementing it
- Hotfixes
-
Removed
content_type
attribute in ResponseClass -
Ignore content type in
response.json()
when parsing response
- Common params between all requests
- Client response parsing customization
- Client now can be used as context manager:
async with Client("https://api.example.com") as client:
response = await client.get("/hello")
-
Fixed null pointer when bearer_token passed to Client
-
Bump JRubics/poetry-publish from 1.11 to 1.12 by @dependabot in #6
-
base_url parameter of Client is optional now
-
Added Client.download_file method for downloading files
-
Renamed misleading filename parameter to form_key in Client.upload_file
Allow to set custom filename in Client.upload_file
Removed status
module. Native Python http.HTTPStatus
is used instead (#1)
Some code cleanups
Unset fields now excluded by default from pydantic models passed to Client