Python 2.7 has reached end of supportand will bedeprecatedon January 31, 2026. After deprecation, you won't be able to deploy Python 2.7applications, even if your organization previously used an organization policy tore-enable deployments of legacy runtimes. Your existing Python2.7 applications will continue to run and receive traffic after theirdeprecation date. We recommend thatyoumigrate to the latest supported version of Python.

google.appengine.api.dosinfo module

Summary

DOS configuration tools.

Library for parsing dos.yaml files and working with these in memory.

Contents

classgoogle.appengine.api.dosinfo.BlacklistEntry(**attributes)source

Bases:google.appengine.api.validation.Validated

A blacklist entry describes a blocked IP address or subnet.

ATTRIBUTES = {u'subnet': <google.appengine.api.dosinfo.SubnetValidator object>, u'description': <google.appengine.api.validation.Optional object>}
classgoogle.appengine.api.dosinfo.DosInfoExternal(**attributes)source

Bases:google.appengine.api.validation.Validated

Describes the format of a dos.yaml file.

ATTRIBUTES = {u'blacklist': <google.appengine.api.validation.Optional object>, 'application': <google.appengine.api.validation.Optional object>}
google.appengine.api.dosinfo.LoadSingleDos(dos_info, open_fn=None)source

Load a dos.yaml file or string and return a DosInfoExternal object.

Parameters
  • dos_info – The contents of a dos.yaml file as a string, or an open file object.

  • open_fn – Function for opening files. Unused.

Returns

A DosInfoExternal instance which represents the contents of the parsed yaml file.

Raises
  • MalformedDosConfiguration – The yaml file contains multiple blacklist sections.

  • yaml_errors.EventError – An error occured while parsing the yaml file.

exceptiongoogle.appengine.api.dosinfo.MalformedDosConfigurationsource

Bases: exceptions.Exception

Configuration file for DOS API is malformed.

classgoogle.appengine.api.dosinfo.SubnetValidator(default=None)source

Bases:google.appengine.api.validation.Validator

Checks that a subnet can be parsed and is a valid IPv4 or IPv6 subnet.

Validate(value, unused_key=None)source

Validates a subnet.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-06-16 UTC.