personalWebbingCommunication 1.0.3

Creator: railscoder56

Last updated:

Add to Cart

Description:

personalWebbingCommunication 1.0.3

Purpose
Abstracting message construction and deconstruction to achieve consistency

Multipart

Structure of message (see Appendix A, Figure 1)
Current data types (see Appendix A, Figure 2)



Section types
1.

Appendix
Appendix A

Multipart
Figure 1: Structure of the message from top (left) to bottom (right).

graph TD
subgraph one[Cover]
metadata_0[Content-Type: hello; Separator_string: separator text]
a{{separator text}}
subgraph comp_1
metadata_1.1
metadata_1.2
data1
end
b{{separator text}}
subgraph comp_2
metadata_2.1
metadata_2.2
data2
end
c{{separator text}}
subgraph comp_3
metadata_3.1
metadata_3.2
data3
end
end

Table 1: Current data types
|data type|metadata|Specifics|
|-|-|-|
|text|data_type,name||
|image|data_type||

Change log
[1.0.3] - 2024-06-30
add:

Init: initialisation of custom logger
multipart: added .store_log into construct image section method
fixed:
others:
Reason: I am currently executing upon a project to measure how effective the approach of creating custom function is to my development productivity. So I need to log all function usage as usage is an indicator of productivity due to the reduction in the lines of code when I use those custom packages in my projects.

[1.0.2] - 2024-06-30
add:

Multipart: new header added called boundaries
fixed:
others:
Keep the boundaries and the content type for the entire response separate, to make code dependent on it neat.

[1.0.1] - 2024-06-28
add:
fixed:

back_end context error when importing: Remove class initialisation and execution at the bottom.
set_multipart_message_config: Removed new line characters when assigning self.bounary variable with boundary text to stop the new line character in header error.
others:
fixed_1: I forgot to remove the test code at the bottom of the script when I upload it to pip
fixed_2: When I generate the response object, I pass the content of self.boundary into the header of the response object. Since during initialisation, I added new line characters beside boundary parameter content (--{boundary}--[new line char]), that content caused the error.

[1.0.0] - 2024-06-28
add:

multipart: A class used to construct multipart message response
set_multipart_message_config: Set multipart message headers (e.g. content-type)
construct_image_section: Create the section of the message that holds image data, where image is either received as a binary or a file path.
construct_text_section: Create the text section of the message.
construct_encoded_multipart_message: Fill in the parts and metadata of the entire message, then return a response object.
fixed:
others:
Usage context: Can only be used within the context of a backend server.
Process of message construction: Store all message parts and meta data for the entire message in variables and arrays, then when you run the function(see above at add 5), fill in the make_response with these data
Image metadata: number system, name, data-type
Text metadata: name, data-type
Image data should be in binary, converted to base64 version, then decode to utf8, before embedding into message part.

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.