⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.144
Server IP:
157.245.143.252
Server:
Linux www 6.11.0-9-generic #9-Ubuntu SMP PREEMPT_DYNAMIC Mon Oct 14 13:19:59 UTC 2024 x86_64
Server Software:
nginx/1.26.0
PHP Version:
8.3.11
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
lib
/
python3
/
dist-packages
/
botocore
/
__pycache__
/
View File Name :
serialize.cpython-312.pyc
Peb Z d Z ddlZddlZddlZddlZddlZddlmZ ddlm Z ddl mZ ddlm Z ddlmZmZmZmZ dZd Zd Z ej, d ZddZ G d d Z G d de Z G d de Z G d de Z G d de Z G d dee Z G d de ZeeeeedZ y)a Protocol input serializes. This module contains classes that implement input serialization for the various AWS protocol types. These classes essentially take user input, a model object that represents what the expected input should look like, and it returns a dictionary that contains the various parts of a request. A few high level design decisions: * Each protocol type maps to a separate class, all inherit from ``Serializer``. * The return value for ``serialize_to_request`` (the main entry point) returns a dictionary that represents a request. This will have keys like ``url_path``, ``query_string``, etc. This is done so that it's a) easy to test and b) not tied to a particular HTTP library. See the ``serialize_to_request`` docstring for more details. Unicode ------- The input to the serializers should be text (str/unicode), not bytes, with the exception of blob types. Those are assumed to be binary, and if a str/unicode type is passed in, it will be encoded as utf-8. N)ElementTree)validate) formatdate)ParamValidationError) has_headeris_json_value_headerparse_to_aware_datetimepercent_encodeiso8601z%Y-%m-%dT%H:%M:%SZz%Y-%m-%dT%H:%M:%S.%fZz^[A-Za-z0-9\.\-]+$c x t | }|r*t j }t j || }|S N)SERIALIZERSr ParamValidatorParamValidationDecorator) protocol_nameinclude_validation serializer validators 4/usr/lib/python3/dist-packages/botocore/serialize.pycreate_serializerr A s8 ]+-J++- 66y*M c P e Zd ZdZeZdZd Zd Zd Z d Z d Zd d Zd Z d Zd Zy) SerializerPOSTzutf-8c t d )a Serialize parameters into an HTTP request. This method takes user provided parameters and a shape model and serializes the parameters to an HTTP request. More specifically, this method returns information about parts of the HTTP request, it does not enforce a particular interface or standard for an HTTP request. It instead returns a dictionary of: * 'url_path' * 'host_prefix' * 'query_string' * 'headers' * 'body' * 'method' It is then up to consumers to decide how to map this to a Request object of their HTTP library of choice. Below is an example return value:: {'body': {'Action': 'OperationName', 'Bar': 'val2', 'Foo': 'val1', 'Version': '2014-01-01'}, 'headers': {}, 'method': 'POST', 'query_string': '', 'host_prefix': 'value.', 'url_path': '/'} :param parameters: The dictionary input parameters for the operation (i.e the user input). :param operation_model: The OperationModel object that describes the operation. serialize_to_requestNotImplementedError)self parametersoperation_models r r zSerializer.serialize_to_requestS s H ""899r c * dd| j i dd}|S )N/ r )url_pathquery_stringmethodheadersbody)DEFAULT_METHOD)r serializeds r _create_default_requestz"Serializer._create_default_requesty s( )) r c \ |j dkD rt }nt }|j | S )Nr )microsecond ISO8601_MICROISO8601strftime)r valuetimestamp_formats r _timestamp_iso8601zSerializer._timestamp_iso8601 s, q ,&~~.//r c Z t t j |j S r )intcalendartimegm timetupler r2 s r _timestamp_unixtimestampz#Serializer._timestamp_unixtimestamp s 8??5??#4566r c r t |t j r| j | }t |d S )NT)usegmt) isinstancedatetimer; r r: s r _timestamp_rfc822zSerializer._timestamp_rfc822 s/ eX../11%8E%--r Nc || j }|j }t | }t | d| } || }|S )N_timestamp_)TIMESTAMP_FORMATlowerr getattr)r r2 r3 datetime_obj converterfinal_values r _convert_timestamp_to_strz$Serializer._convert_timestamp_to_str sR ##44+113.u5DK0@/A"BC -r c : |j j d| S Nname serializationget)r shapedefault_names r _get_serialized_namezSerializer._get_serialized_name s ""&&v|<