The argument module

The argument module contains the Argument class which provides the ability to create and manage arguments that can be passed through HTTP requests.

The BoolArgument class

Inheritance diagram of pyamp.web.http.argument.BoolArgument

class pyamp.web.http.argument.BoolArgument(required=False, default=None)[source]

The BoolArgument class provides a class to easily create an boolean argument.

  • required – True if the argument is required, False otherwise
  • default – The default value for optional Arguments

The FloatArgument class

Inheritance diagram of pyamp.web.http.argument.FloatArgument

class pyamp.web.http.argument.FloatArgument(required=False, default=None)[source]

The FloatArgument class provides a class to easily create an float argument.

  • required – True if the argument is required, False otherwise
  • default – The default value for optional Arguments

The StrArgument class

Inheritance diagram of pyamp.web.http.argument.StrArgument

class pyamp.web.http.argument.StrArgument(required=False, default=None)[source]

The StrArgument class provides a class to easily create a string argument.

  • required – True if the argument is required, False otherwise
  • default – The default value for optional Arguments

The Argument class

Inheritance diagram of pyamp.web.http.argument.Argument

class pyamp.web.http.argument.Argument(argumentType, required=False, default=None)[source]

The Argument class encapsulates the concept of an HTTP argument passed through a URL request.

Arguments can have a specific type, can be required or optional, and can have a default value if they are optional and not passed in the request.

  • argumentType – The type of the argument
  • required – True if the argument is required, False otherwise
  • default – The default value for optional Arguments
convertValue(value)[source]

Convert the given value to the expected type of the Argument.

  • value – The value of the argument passed in the request
getDefaultValue()[source]

Return the default value for this Argument.

isRequired()[source]

Determine if this is a required Argument or an optional Argument.

The IntArgument class

Inheritance diagram of pyamp.web.http.argument.IntArgument

class pyamp.web.http.argument.IntArgument(required=False, default=None)[source]

The IntArgument class provides a class to easily create an integer argument.

  • required – True if the argument is required, False otherwise
  • default – The default value for optional Arguments

Table Of Contents

Previous topic

The errorPages module

Next topic

The hacking module

This Page