Notice: Over the next few months, we're reorganizing the App Engine documentation site to make it easier to find content and better align with the rest of Google Cloud products. The same content will be available, but the navigation will now match the rest of the Cloud products.

Python 3.10 is now generally available.


Determines if a file name is valid.

filename The file name to validate. The file name must be a valid file name:

- It must only contain letters, numbers, and the following special
  characters:  `@`, `_`, `+`, `/` `$`, `.`, `-`, or '~'.
- It must be less than 256 characters.
- It must not contain `/./`, `/../`, or `//`.
- It must not end in `/`.
- All spaces must be in the middle of a directory or file name.

An error string if the file name is invalid. '' is returned if the file name is valid.