Skip to main content

All functions that assist in standardising development approaches.

Project description

Purpose

Abstracting message construction and deconstruction to achieve consistency

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

Section types

1. 

Appendix

Appendix A

  1. 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:

  1. Init: initialisation of custom logger
  2. multipart: added .store_log into construct image section method fixed: others:
  3. 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:

  1. Multipart: new header added called boundaries fixed: others:
  2. 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:

  1. back_end context error when importing: Remove class initialisation and execution at the bottom.
  2. 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:
  3. fixed_1: I forgot to remove the test code at the bottom of the script when I upload it to pip
  4. 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:

  1. multipart: A class used to construct multipart message response
  2. set_multipart_message_config: Set multipart message headers (e.g. content-type)
  3. 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.
  4. construct_text_section: Create the text section of the message.
  5. construct_encoded_multipart_message: Fill in the parts and metadata of the entire message, then return a response object. fixed: others:
  6. Usage context: Can only be used within the context of a backend server.
  7. 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
  8. Image metadata: number system, name, data-type
  9. Text metadata: name, data-type
  10. Image data should be in binary, converted to base64 version, then decode to utf8, before embedding into message part.

Project details


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

File hashes

Hashes for personalWebbingCommunication-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 e6448ceb6a4fad786ccba180223c4347ed3e8c4a37e8530aa2af025ea0478923
MD5 42ebc7db553f15b40070e726766bc46a
BLAKE2b-256 b16fd7b0eced33ac9229e45df820b02fe4fd0769910d2085a5eb85c0e630d686

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page