Compare commits

...

2 Commits

Author SHA1 Message Date
9ab9bcfc96 Форматирование 2025-10-27 22:06:00 +03:00
33f25c799c Версия 1.0.0 2025-10-27 22:05:46 +03:00
5 changed files with 69 additions and 3 deletions

View File

@ -0,0 +1,9 @@
# aiohttpx
aiohttpx is a HTTP client built on top of the [httpx](https://github.com/encode/httpx) and [aiohttp](https://github.com/aio-libs/aiohttp) libraries.
## Features
* Fully asynchronous using aiohttp as the transport
* Supports caching using Redis as the backend
* Supports rate limiting using Redis as the backend

View File

@ -1,6 +1,6 @@
[project] [project]
name = "aiohttpx" name = "aiohttpx"
version = "0.3.0" version = "1.0.0"
description = "Custom HTTPX client with aiohttp transport, rate limiter and caching" description = "Custom HTTPX client with aiohttp transport, rate limiter and caching"
readme = "README.md" readme = "README.md"
authors = [ authors = [

View File

@ -1 +1 @@
__version__: str = '0.3.0' __version__: str = '1.0.0'

View File

@ -33,6 +33,7 @@ class AioHTTPXClient(AsyncHTTPXClient):
redis_url: str | None = None, redis_url: str | None = None,
key: str | None = None, key: str | None = None,
limit: int | None = None, limit: int | None = None,
logger: str | None = __name__,
) -> None: ) -> None:
super().__init__( super().__init__(
auth=auth, auth=auth,
@ -56,7 +57,7 @@ class AioHTTPXClient(AsyncHTTPXClient):
default_encoding=default_encoding, default_encoding=default_encoding,
) )
self.logger = getLogger(__name__) self.logger = getLogger(logger)
__all__ = ['AioHTTPXClient'] __all__ = ['AioHTTPXClient']

56
src/aiohttpx/status.py Normal file
View File

@ -0,0 +1,56 @@
CONTINUE = 100
SWITCHING_PROTOCOLS = 101
OK = 200
CREATED = 201
ACCEPTED = 202
NON_AUTHORITATIVE_INFORMATION = 203
NO_CONTENT = 204
RESET_CONTENT = 205
PARTIAL_CONTENT = 206
MULTIPLE_CHOICES = 300
MOVED_PERMANENTLY = 301
FOUND = 302
SEE_OTHER = 303
NOT_MODIFIED = 304
USE_PROXY = 305
SWITCH_PROXY = 306
TEMPORARY_REDIRECT = 307
PERMANENT_REDIRECT = 308
BAD_REQUEST = 400
UNAUTHORIZED = 401
PAYMENT_REQUIRED = 402
FORBIDDEN = 403
NOT_FOUND = 404
METHOD_NOT_ALLOWED = 405
NOT_ACCEPTABLE = 406
PROXY_AUTHENTICATION_REQUIRED = 407
REQUEST_TIMEOUT = 408
CONFLICT = 409
GONE = 410
LENGTH_REQUIRED = 411
PRECONDITION_FAILED = 412
REQUEST_ENTITY_TOO_LARGE = 413
REQUEST_URI_TOO_LONG = 414
UNSUPPORTED_MEDIA_TYPE = 415
REQUESTED_RANGE_NOT_SATISFIABLE = 416
EXPECTATION_FAILED = 417
IM_A_TEAPOT = 418
MISDIRECTED_REQUEST = 422
UNPROCESSABLE_ENTITY = 422
LOCKED = 423
FAILED_DEPENDENCY = 424
UPGRADE_REQUIRED = 426
PRECONDITION_REQUIRED = 428
TOO_MANY_REQUESTS = 429
REQUEST_HEADER_FIELDS_TOO_LARGE = 431
INTERNAL_SERVER_ERROR = 500
NOT_IMPLEMENTED = 501
BAD_GATEWAY = 502
SERVICE_UNAVAILABLE = 503
GATEWAY_TIMEOUT = 504
HTTP_VERSION_NOT_SUPPORTED = 505
VARIANT_ALSO_NEGOTIATES = 506
INSUFFICIENT_STORAGE = 507
LOOP_DETECTED = 508
NOT_EXTENDED = 510
NETWORK_AUTHENTICATION_REQUIRED = 511