Module restx_parameter
source code
RESTx: Sane, simple and effective data publishing and integration.
Copyright (C) 2010 MuleSoft Inc. http://www.mulesoft.com
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by the
Free Software Foundation, either version 3 of the License, or (at your
option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see
<http://www.gnu.org/licenses/>.
|
|
RestxParameter
Represents a parameter for a RESTx resource or service.
|
|
|
__package__ = 'restxclient'
|
Imports:
RestxClientException
|
Translate a string to a numeric value.
This sort of translation function is necessary to be more flexible in
handling the type of input for parameter values.
- Parameters:
x (string or number type) - String representing a number or a number type.
- Returns: Integer or Float
- Numeric value
|
|
Translate a string to a boolean value.
This sort of translation function is necessary to be more flexible in
handling the type of input for parameter values.
Strings like 'y', 'yes', 'true', 't', '1' are interpreted as True, all
other strings are considered to mean False.
It works for upper and lower-case strings.
- Parameters:
x (string or boolean) - String representation of a boolean value or a boolean.
- Returns: boolean
- Boolean value.
|