Python 2.7 has reached end of support and will be deprecated on January 31, 2026. After deprecation, you won't be able to deploy Python 2.7 applications, even if your organization previously used an organization policy to re-enable deployments of legacy runtimes. Your existing Python 2.7 applications will continue to run and receive traffic after their deprecation date. We recommend that you migrate 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

class google.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>}
class google.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.

exception google.appengine.api.dosinfo.MalformedDosConfigurationsource

Bases: exceptions.Exception

Configuration file for DOS API is malformed.

class google.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 the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年06月16日 UTC.