Skip to main content

ReQBodyMan to easily manage body data received with Request

Project description

ReQBodyMan

BrainyTechLogo

Project Description

ReQBodyMan is a package that you can use to manage the validations of body data coming with Request more effectively.

Installation

1 Install to Package

For Windows

pip install ReQBodyMan

For Linux/MacOs

pip3 install ReQBodyMan

2 Dependencies Package

flask

Usege

1 Import the package

from ReQBodyMan.ReQBodyMan import ReQBodyMan

Note: Boolean values have a return value of 1 if True and a return value of 0 if False.

2 Get Form Data

If the data comes from the request with a form, you can get the data as follows.

Data : string, int, float, boolean, list, dict,  
Parameters : contextName, variableType
Return: data

data = self.ReQBodyMans.form("data_name", "str")
data = self.ReQBodyMans.form("data_name", "int")
data = self.ReQBodyMans.form("data_name", "float")
data = self.ReQBodyMans.form("data_name", "bool")
data = self.ReQBodyMans.form("data_name", "list")
data = self.ReQBodyMans.form("data_name", "dict")

If Variable Type is sent outside the specified format, data is received according to the str format.

3 Get Json Data

Data : string, int, float, boolean, list, dict,  
Parameters : contextName, variableType
Return : Data

data = self.ReQBodyMans.json("data_name", "str")
data = self.ReQBodyMans.json("data_name", "int")
data = self.ReQBodyMans.json("data_name", "float")
data = self.ReQBodyMans.json("data_name", "bool")
data = self.ReQBodyMans.json("data_name", "list")
data = self.ReQBodyMans.json("data_name", "dict")

If Variable Type is sent outside the specified format, data is received according to the str format.

4 Get File

Data : file
Parameters : fileName
Return: file

file = self.ReQBodyMans.file("fileName")

If FileName is not in request.file, the value "The {fileName} is not in request.files" is returned.

5 Get Params

Data : string, int, float, boolean, list,  
Parameters : variableName, variableType
Return : data

data = self.ReQBodyMans.params("data_name", "str")
data = self.ReQBodyMans.params("data_name", "int")
data = self.ReQBodyMans.params("data_name", "float")
data = self.ReQBodyMans.params("data_name", "bool")
data = self.ReQBodyMans.params("data_name", "list")

If variablename is sent outside the specified format,

variableType : str return : "" variableType : int return : 0 variableType : float return : 0.0 variableType : bool return : 0 variableType : list return : []

Release Note

v.1.0.1

  1. ReadMe file updated

v.1.0.0

  1. Project published.

ReQBodyMan is a BrainyTech Product.

Developer : Murat Bilginer

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ReQBodyMan-1.0.1.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ReQBodyMan-1.0.1-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

Details for the file ReQBodyMan-1.0.1.tar.gz.

File metadata

  • Download URL: ReQBodyMan-1.0.1.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.13

File hashes

Hashes for ReQBodyMan-1.0.1.tar.gz
Algorithm Hash digest
SHA256 71618312b32577552b2b2fd324e30531f4e33de76ddfc433e28468abc084b841
MD5 598b81f0f160ed40f4c591c4eed7e160
BLAKE2b-256 9eb90642334a07d3d5b17a9b2fe59ed6f411b2839a083d86293d7a2823e38917

See more details on using hashes here.

File details

Details for the file ReQBodyMan-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: ReQBodyMan-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.13

File hashes

Hashes for ReQBodyMan-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5b763ea878eb3fb657119d87e4be69243ba1716ac576db271f2675ef1fde85d3
MD5 11b1078e6ea7ef9fb2c689f9d8f41a51
BLAKE2b-256 8a9ee2c7ecfb32ee28ec7047defa5e79a31c88301897a29403d608d28a793c05

See more details on using hashes here.

Supported by

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