Skip to content
module

spf2acl.spf

Classes
  • Qualifier An enumeration.</>
  • Mechanism() Helper class that provides a standard way to create an ABC using inheritance.</>
  • All Helper class that provides a standard way to create an ABC using inheritance.</>
  • Include Helper class that provides a standard way to create an ABC using inheritance.</>
  • Exists Helper class that provides a standard way to create an ABC using inheritance.</>
  • A Helper class that provides a standard way to create an ABC using inheritance.</>
  • MX Helper class that provides a standard way to create an ABC using inheritance.</>
  • IPNetwork Helper class that provides a standard way to create an ABC using inheritance.</>
  • Modifier(domain) Helper class that provides a standard way to create an ABC using inheritance.</>
  • Redirect Helper class that provides a standard way to create an ABC using inheritance.</>
  • Exp Helper class that provides a standard way to create an ABC using inheritance.</>
class

spf2acl.spf.Qualifier(value, names=None, module=None, qualname=None, type=None, start=1)

Bases
str enum.Enum

An enumeration.

Parameters
  • value
  • names (optional)
  • module (optional)
  • qualname (optional)
  • type (optional)
  • start (optional)
Classes
class

enum.EnumMeta(cls, bases, classdict)

Metaclass for Enum

Parameters
  • cls
  • bases
  • classdict
Attributes
  • __members__ Returns a mapping of member name->value.
    This mapping lists all enum members, including aliases. Note that this is a read-only view of the internal mapping.</>
Methods
  • __bool__() classes/types should always be True.</>
  • __call__(cls, value, names, module, qualname, type, start) Either returns an existing member, or creates a new enum class.</>
  • __dir__() Specialized dir implementation for types.</>
  • __getattr__(cls, name) Return the enum member matching name</>
  • __iter__(cls) Returns members in definition order.</>
  • __reversed__(cls) Returns members in reverse definition order.</>
  • __setattr__(cls, name, value) Block attempts to reassign Enum members.</>
method
__bool__()

classes/types should always be True.

staticmethod
__call__(cls, value, names=None, module=None, qualname=None, type=None, start=1)

Either returns an existing member, or creates a new enum class.

This method is used both when an enum class is given a value to match to an enumeration member (i.e. Color(3)) and for the functional API (i.e. Color = Enum('Color', names='RED GREEN BLUE')).

When used for the functional API:

value will be the name of the new class.

names should be either a string of white-space/comma delimited names (values will start at start), or an iterator/mapping of name, value pairs.

module should be set to the module this class is being created in; if it is not set, an attempt to find that module will be made, but if it fails the class will not be picklable.

qualname should be set to the actual location this class can be found at in its module; by default it is set to the global scope. If this is not correct, unpickling will fail in some circumstances.

type, if set, will be mixed in as the first base class.

Parameters
  • cls
  • value
  • names (optional)
  • module (optional)
  • qualname (optional)
  • type (optional)
  • start (optional)
method
__dir__()

Specialized dir implementation for types.

staticmethod
__getattr__(cls, name)

Return the enum member matching name

We use getattr instead of descriptors or inserting into the enum class' dict in order to support name and value being both properties for enum members (which live in the class' dict) and enum members themselves.

Parameters
  • cls
  • name
staticmethod
__iter__(cls)

Returns members in definition order.

Parameters
  • cls
staticmethod
__reversed__(cls)

Returns members in reverse definition order.

Parameters
  • cls
staticmethod
__setattr__(cls, name, value)

Block attempts to reassign Enum members.

A simple assignment to the class namespace only changes one of the several possible ways to get an Enum member from the Enum class, resulting in an inconsistent Enumeration.

Parameters
  • cls
  • name
  • value
abstract class

spf2acl.spf.Mechanism()

Helper class that provides a standard way to create an ABC using inheritance.

class

spf2acl.spf.All()

Helper class that provides a standard way to create an ABC using inheritance.

class

spf2acl.spf.Include(domain)

Bases
spf2acl.spf.__DomainMechanism spf2acl.spf.Mechanism

Helper class that provides a standard way to create an ABC using inheritance.

Parameters
  • domain
Attributes
  • __domain
class

spf2acl.spf.Exists(domain)

Bases
spf2acl.spf.__DomainMechanism spf2acl.spf.Mechanism

Helper class that provides a standard way to create an ABC using inheritance.

Parameters
  • domain
Attributes
  • __domain
class

spf2acl.spf.A(domain=None, ipv4_prefix_length=32, ipv6_prefix_length=128)

Bases
spf2acl.spf.__Cidr spf2acl.spf.Mechanism

Helper class that provides a standard way to create an ABC using inheritance.

Parameters
  • domain (optional)
  • ipv4_prefix_length (optional)
  • ipv6_prefix_length (optional)
Attributes
  • __domain
  • __ipv4_prefix_length
  • __ipv6_prefix_length
class

spf2acl.spf.MX(domain=None, ipv4_prefix_length=32, ipv6_prefix_length=128)

Bases
spf2acl.spf.__Cidr spf2acl.spf.Mechanism

Helper class that provides a standard way to create an ABC using inheritance.

Parameters
  • domain (optional)
  • ipv4_prefix_length (optional)
  • ipv6_prefix_length (optional)
Attributes
  • __domain
  • __ipv4_prefix_length
  • __ipv6_prefix_length
class

spf2acl.spf.IPNetwork(network)

Helper class that provides a standard way to create an ABC using inheritance.

Parameters
  • network
Attributes
  • __network
abstract class

spf2acl.spf.Modifier(domain)

Helper class that provides a standard way to create an ABC using inheritance.

Parameters
  • domain
Attributes
  • __domain
class

spf2acl.spf.Redirect(domain)

Helper class that provides a standard way to create an ABC using inheritance.

Parameters
  • domain
Attributes
  • __domain
class

spf2acl.spf.Exp(domain)

Helper class that provides a standard way to create an ABC using inheritance.

Parameters
  • domain
Attributes
  • __domain