All functions that assist in standardising development approaches.
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
File details
Details for the file personalWebbingCommunication-1.0.3-py3-none-any.whl
.
File metadata
- Download URL: personalWebbingCommunication-1.0.3-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e6448ceb6a4fad786ccba180223c4347ed3e8c4a37e8530aa2af025ea0478923 |
|
MD5 | 42ebc7db553f15b40070e726766bc46a |
|
BLAKE2b-256 | b16fd7b0eced33ac9229e45df820b02fe4fd0769910d2085a5eb85c0e630d686 |